forked from bartvdbraak/blender
Fix T38209: Curve's didn't account for negative scale
Would use the face winding from the previously drawn mesh
This commit is contained in:
parent
1fb9bb815a
commit
54e56cd309
@ -3802,16 +3802,9 @@ static void drawDispListsolid(ListBase *lb, Object *ob, const short dflag,
|
|||||||
glEnable(GL_LIGHTING);
|
glEnable(GL_LIGHTING);
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
|
|
||||||
|
|
||||||
if (ob->type == OB_MBALL) { /* mball always smooth shaded */
|
if (ob->type == OB_MBALL) { /* mball always smooth shaded */
|
||||||
if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW);
|
|
||||||
else glFrontFace(GL_CCW);
|
|
||||||
glShadeModel(GL_SMOOTH);
|
glShadeModel(GL_SMOOTH);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CCW);
|
|
||||||
else glFrontFace(GL_CW);
|
|
||||||
}
|
|
||||||
|
|
||||||
dl = lb->first;
|
dl = lb->first;
|
||||||
while (dl) {
|
while (dl) {
|
||||||
@ -3929,6 +3922,8 @@ static bool drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW);
|
||||||
|
|
||||||
if (dt > OB_WIRE && dm->getNumTessFaces(dm)) {
|
if (dt > OB_WIRE && dm->getNumTessFaces(dm)) {
|
||||||
int glsl = draw_glsl_material(scene, ob, v3d, dt);
|
int glsl = draw_glsl_material(scene, ob, v3d, dt);
|
||||||
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
|
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
|
||||||
@ -3969,6 +3964,13 @@ static bool drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ob->type == OB_MBALL) {
|
||||||
|
glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CCW : GL_CW);
|
||||||
|
}
|
||||||
|
|
||||||
switch (ob->type) {
|
switch (ob->type) {
|
||||||
case OB_FONT:
|
case OB_FONT:
|
||||||
case OB_CURVE:
|
case OB_CURVE:
|
||||||
|
Loading…
Reference in New Issue
Block a user