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>2012-03-18 00:39:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-18 00:39:28 +0400
commit91580c0929f96562895d262d621745956c3ad35e (patch)
tree7338f08f832189bca3b98e8e6308a0115b475de5 /source/blender/blenkernel/intern/editderivedmesh.c
parent8b7ea6fc90c43a7d2b04a5ced81614776bbba77c (diff)
swap BMLoopCol r/b color, requires subversion bump.
old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol. Loading old files works, saving legacy format works too. What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge. (it wont crash but the blue and red will be swapped on vertex color layers).
Diffstat (limited to 'source/blender/blenkernel/intern/editderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 3f4ca1b00a2..4c3e92027e8 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -803,7 +803,7 @@ static void emDM_drawFacesTex_common(
luv[0] = luv[1] = luv[2] = &dummyluv;
- dummylcol.a = dummylcol.r = dummylcol.g = dummylcol.b = 255;
+ dummylcol.r = dummylcol.g = dummylcol.b = dummylcol.a = 255;
/* always use smooth shading even for flat faces, else vertex colors wont interpolate */
glShadeModel(GL_SMOOTH);
@@ -844,17 +844,17 @@ static void emDM_drawFacesTex_common(
glTexCoord2fv(luv[0]->uv);
if (lcol[0])
- glColor3ub(lcol[0]->b, lcol[0]->g, lcol[0]->r);
+ glColor3ubv((const GLubyte *)&(lcol[0]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ls[0]->v)]);
glTexCoord2fv(luv[1]->uv);
if (lcol[1])
- glColor3ub(lcol[1]->b, lcol[1]->g, lcol[1]->r);
+ glColor3ubv((const GLubyte *)&(lcol[1]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ls[1]->v)]);
glTexCoord2fv(luv[2]->uv);
if (lcol[2])
- glColor3ub(lcol[2]->b, lcol[2]->g, lcol[2]->r);
+ glColor3ubv((const GLubyte *)&(lcol[2]->r));
glVertex3fv(vertexCos[BM_elem_index_get(ls[2]->v)]);
}
else {
@@ -862,19 +862,19 @@ static void emDM_drawFacesTex_common(
glTexCoord2fv(luv[0]->uv);
if (lcol[0])
- glColor3ub(lcol[0]->b, lcol[0]->g, lcol[0]->r);
+ glColor3ubv((const GLubyte *)&(lcol[0]->r));
glNormal3fv(vertexNos[BM_elem_index_get(ls[0]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ls[0]->v)]);
glTexCoord2fv(luv[1]->uv);
if (lcol[1])
- glColor3ub(lcol[1]->b, lcol[1]->g, lcol[1]->r);
+ glColor3ubv((const GLubyte *)&(lcol[1]->r));
glNormal3fv(vertexNos[BM_elem_index_get(ls[1]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ls[1]->v)]);
glTexCoord2fv(luv[2]->uv);
if (lcol[2])
- glColor3ub(lcol[2]->b, lcol[2]->g, lcol[2]->r);
+ glColor3ubv((const GLubyte *)&(lcol[2]->r));
glNormal3fv(vertexNos[BM_elem_index_get(ls[2]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ls[2]->v)]);
}
@@ -917,19 +917,19 @@ static void emDM_drawFacesTex_common(
if (luv[0])
glTexCoord2fv(luv[0]->uv);
if (lcol[0])
- glColor3ub(lcol[0]->b, lcol[0]->g, lcol[0]->r);
+ glColor3ubv((const GLubyte *)&(lcol[0]->r));
glVertex3fv(ls[0]->v->co);
if (luv[1])
glTexCoord2fv(luv[1]->uv);
if (lcol[1])
- glColor3ub(lcol[1]->b, lcol[1]->g, lcol[1]->r);
+ glColor3ubv((const GLubyte *)&(lcol[1]->r));
glVertex3fv(ls[1]->v->co);
if (luv[2])
glTexCoord2fv(luv[2]->uv);
if (lcol[2])
- glColor3ub(lcol[2]->b, lcol[2]->g, lcol[2]->r);
+ glColor3ubv((const GLubyte *)&(lcol[2]->r));
glVertex3fv(ls[2]->v->co);
}
else {
@@ -938,21 +938,21 @@ static void emDM_drawFacesTex_common(
if (luv[0])
glTexCoord2fv(luv[0]->uv);
if (lcol[0])
- glColor3ub(lcol[0]->b, lcol[0]->g, lcol[0]->r);
+ glColor3ubv((const GLubyte *)&(lcol[0]->r));
glNormal3fv(ls[0]->v->no);
glVertex3fv(ls[0]->v->co);
if (luv[1])
glTexCoord2fv(luv[1]->uv);
if (lcol[1])
- glColor3ub(lcol[1]->b, lcol[1]->g, lcol[1]->r);
+ glColor3ubv((const GLubyte *)&(lcol[1]->r));
glNormal3fv(ls[1]->v->no);
glVertex3fv(ls[1]->v->co);
if (luv[2])
glTexCoord2fv(luv[2]->uv);
if (lcol[2])
- glColor3ub(lcol[2]->b, lcol[2]->g, lcol[2]->r);
+ glColor3ubv((const GLubyte *)&(lcol[2]->r));
glNormal3fv(ls[2]->v->no);
glVertex3fv(ls[2]->v->co);
}