fix for editmode opengl drawing (bug from own recent optimization), need to set glShadeModel() outside glBegin(GL_QUADS / GL_TRIANGLES).
This commit is contained in:
@@ -697,9 +697,11 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
|
|||||||
else {
|
else {
|
||||||
const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
|
const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
|
||||||
if (shade_type != shade_prev) {
|
if (shade_type != shade_prev) {
|
||||||
glShadeModel((shade_prev= shade_type));
|
if(poly_prev != GL_ZERO) glEnd();
|
||||||
|
glShadeModel((shade_prev= shade_type)); /* same as below but switch shading */
|
||||||
|
glBegin((poly_prev= poly_type));
|
||||||
}
|
}
|
||||||
if(poly_type != poly_prev) {
|
else if(poly_type != poly_prev) {
|
||||||
if(poly_prev != GL_ZERO) glEnd();
|
if(poly_prev != GL_ZERO) glEnd();
|
||||||
glBegin((poly_prev= poly_type));
|
glBegin((poly_prev= poly_type));
|
||||||
}
|
}
|
||||||
@@ -762,9 +764,11 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
|
|||||||
else {
|
else {
|
||||||
const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
|
const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
|
||||||
if (shade_type != shade_prev) {
|
if (shade_type != shade_prev) {
|
||||||
glShadeModel((shade_prev= shade_type));
|
if(poly_prev != GL_ZERO) glEnd();
|
||||||
|
glShadeModel((shade_prev= shade_type)); /* same as below but switch shading */
|
||||||
|
glBegin((poly_prev= poly_type));
|
||||||
}
|
}
|
||||||
if(poly_type != poly_prev) {
|
else if(poly_type != poly_prev) {
|
||||||
if(poly_prev != GL_ZERO) glEnd();
|
if(poly_prev != GL_ZERO) glEnd();
|
||||||
glBegin((poly_prev= poly_type));
|
glBegin((poly_prev= poly_type));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user