summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2014-01-24 15:23:50 +0100
committerdegasus <wickmarkus@web.de>2014-01-31 07:19:34 +0100
commitef2d6e7d530c2f61360d370f3b98bba7989ada6e (patch)
tree535c4c6361408a07d86eb11f9a7986cae6f3fcca /Source/Core/VideoCommon/VertexLoader.cpp
parentb38ef39ab7b88eb7e4fa253deec64cecb72508aa (diff)
PortableVertexFormat: use AttributeFormat for color attribute format
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index 42fa6a7b0c..8251f76bf1 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -627,17 +627,14 @@ void VertexLoader::CompileVertexTranslator()
components |= VB_HAS_NRM1 | VB_HAS_NRM2;
}
- vtx_decl.color_gl_type = VAR_UNSIGNED_BYTE;
- vtx_decl.color_offset[0] = -1;
- vtx_decl.color_offset[1] = -1;
for (int i = 0; i < 2; i++)
{
- components |= VB_HAS_COL0 << i;
+ vtx_decl.colors[i].components = 4;
+ vtx_decl.colors[i].type = VAR_UNSIGNED_BYTE;
+ vtx_decl.colors[i].integer = false;
switch (col[i])
{
case NOT_PRESENT:
- components &= ~(VB_HAS_COL0 << i);
- vtx_decl.color_offset[i] = -1;
break;
case DIRECT:
switch (m_VtxAttr.color[i].Comp)
@@ -681,7 +678,9 @@ void VertexLoader::CompileVertexTranslator()
// Common for the three bottom cases
if (col[i] != NOT_PRESENT)
{
- vtx_decl.color_offset[i] = nat_offset;
+ components |= VB_HAS_COL0 << i;
+ vtx_decl.colors[i].offset = nat_offset;
+ vtx_decl.colors[i].enable = true;
nat_offset += 4;
}
}