diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2015-03-17 07:05:19 +0100 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2015-03-18 12:09:06 +0100 |
| commit | 8d90ecda7f8e08a37964f8664aed571dbc6e9051 (patch) | |
| tree | df4931e65ef328137a180e8b23f815faace06ec3 /Source/Core/VideoCommon/VertexLoader.cpp | |
| parent | 5a51bc10e56c8709b55fe53cb438f7a42ac09ad4 (diff) | |
VertexLoaders: make positions more compact
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index d27d5287ad..49b6d23e1a 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -131,12 +131,13 @@ 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); - m_native_vtx_decl.position.components = 3; + int pos_elements = m_VtxAttr.PosElements + 2; + m_native_vtx_decl.position.components = pos_elements; m_native_vtx_decl.position.enable = true; 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; + nat_offset += pos_elements * sizeof(float); // Normals if (m_VtxDesc.Normal != NOT_PRESENT) |
