VertexLoader: fix position offset bug

This commit is contained in:
Tillmann Karras 2015-01-19 17:38:40 +01:00
parent 4b323096ec
commit 804341d4fe
1 changed files with 2 additions and 3 deletions

View File

@ -145,7 +145,6 @@ void VertexLoader::CompileVertexTranslator()
m_VertexSize += 1;
}
if (m_VtxDesc.Tex0MatIdx) {m_VertexSize += 1; components |= VB_HAS_TEXMTXIDX0; WriteCall(TexMtx_ReadDirect_UByte); }
if (m_VtxDesc.Tex1MatIdx) {m_VertexSize += 1; components |= VB_HAS_TEXMTXIDX1; WriteCall(TexMtx_ReadDirect_UByte); }
if (m_VtxDesc.Tex2MatIdx) {m_VertexSize += 1; components |= VB_HAS_TEXMTXIDX2; WriteCall(TexMtx_ReadDirect_UByte); }
@ -159,12 +158,12 @@ void VertexLoader::CompileVertexTranslator()
WriteCall(VertexLoader_Position::GetFunction(m_VtxDesc.Position, m_VtxAttr.PosFormat, m_VtxAttr.PosElements));
m_VertexSize += VertexLoader_Position::GetSize(m_VtxDesc.Position, m_VtxAttr.PosFormat, m_VtxAttr.PosElements);
nat_offset += 12;
m_native_vtx_decl.position.components = 3;
m_native_vtx_decl.position.enable = true;
m_native_vtx_decl.position.offset = 0;
m_native_vtx_decl.position.offset = nat_offset;
m_native_vtx_decl.position.type = VAR_FLOAT;
m_native_vtx_decl.position.integer = false;
nat_offset += 12;
// Normals
if (m_VtxDesc.Normal != NOT_PRESENT)