summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2015-01-19 17:38:40 +0100
committerTillmann Karras <tilkax@gmail.com>2015-01-19 17:38:40 +0100
commit804341d4fe871f5c92d3c32a73e7df2a6c6c14fb (patch)
tree35c9a6181eef601ed89be4b679d32d551afb07b3 /Source/Core/VideoCommon/VertexLoader.cpp
parent4b323096ec688f1623d0a5a784e7441d98b71e3a (diff)
VertexLoader: fix position offset bug
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index 734ea9a4a6..1122a04f72 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -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)