mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
BGRA color order fix for Cg on Windows
This commit is contained in:
parent
ef9908c277
commit
7ce2a97bef
@ -172,7 +172,7 @@ CLP(CgShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderConte
|
||||
// can only ever be sure that vtx_position is bound.
|
||||
GLCAT.warning()
|
||||
<< "CG varying vtx_position is bound to generic attribute " << loc
|
||||
<< "instead of 0. Use ATTR0 semantic to prevent this.\n";
|
||||
<< " instead of 0. Use ATTR0 semantic to prevent this.\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -816,7 +816,11 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) {
|
||||
break;
|
||||
|
||||
case CA_color:
|
||||
glColorPointer(num_values, type, stride, client_pointer);
|
||||
if (numeric_type == GeomEnums::NT_packed_dabc) {
|
||||
glColorPointer(GL_BGRA, GL_UNSIGNED_BYTE, stride, client_pointer);
|
||||
} else {
|
||||
glColorPointer(num_values, type, stride, client_pointer);
|
||||
}
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user