Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-10 04:01:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-10 04:01:44 +0400
commit7b3ea6cc2caf1df9c510a97a3272924f1a51a768 (patch)
tree8e51ede796703ec141340403cb6b95c0b7a2cc5a /source/blender/blenkernel
parent39c4e3ae3c9668f8d5b3ba1e901b824a747db02e (diff)
mesh VBO drawing code was swapping red/blue vertex colors - this is confusing because MCol.r is blue and MCol.b is red but not excuse! (and how come nobody noticed this?).
- fixed this error in 4 places.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 707bf95f9c3..0b5fd939580 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -756,9 +756,10 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
unsigned char *colors = MEM_mallocN(dm->getNumFaces(dm)*4*3*sizeof(unsigned char), "cdDM_drawFacesTex_common");
for( i=0; i < dm->getNumFaces(dm); i++ ) {
for( j=0; j < 4; j++ ) {
- colors[i*12+j*3] = col[i*4+j].r;
+ /* bgr -> rgb is intentional (and stupid), but how its stored internally */
+ colors[i*12+j*3] = col[i*4+j].b;
colors[i*12+j*3+1] = col[i*4+j].g;
- colors[i*12+j*3+2] = col[i*4+j].b;
+ colors[i*12+j*3+2] = col[i*4+j].r;
}
}
GPU_color3_upload(dm,colors);