Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/drawobject.c
| Context not available. | |||||
| return (base->object->dtx & OB_DRAWTRANSP); | return (base->object->dtx & OB_DRAWTRANSP); | ||||
| } | } | ||||
| /* check for multitexture mist */ | |||||
| bool draw_mt_mist(Scene *scene, View3D *v3d) | |||||
| { | |||||
| if (!scene->world) | |||||
| return false; | |||||
| if (!(scene->world->mode & WO_MIST)) | |||||
| return false; | |||||
| if (BKE_scene_use_new_shading_nodes(scene)) | |||||
| return false; | |||||
| if (!ELEM(v3d->drawtype, OB_SOLID, OB_TEXTURE)) | |||||
| return false; | |||||
| if (scene->gm.matmode == GAME_MAT_GLSL) | |||||
| return false; | |||||
| return true; | |||||
| } | |||||
| /***/ | /***/ | ||||
| static const unsigned int colortab[] = { | static const unsigned int colortab[] = { | ||||
| 0x0, 0x403000, 0xFFFF88 | 0x0, 0x403000, 0xFFFF88 | ||||
| Context not available. | |||||
| int i; | int i; | ||||
| bool do_alpha_after = false, drawlinked = false, retval = false; | bool do_alpha_after = false, drawlinked = false, retval = false; | ||||
| /* render mist */ | |||||
| if (draw_mt_mist(scene, v3d)) { | |||||
| glEnable(GL_FOG); | |||||
| } | |||||
| /* If we are drawing shadows and any of the materials don't cast a shadow, | /* If we are drawing shadows and any of the materials don't cast a shadow, | ||||
| * then don't draw the object */ | * then don't draw the object */ | ||||
| if (v3d->flag2 & V3D_RENDER_SHADOW) { | if (v3d->flag2 & V3D_RENDER_SHADOW) { | ||||
| Context not available. | |||||
| if (v3d->flag2 & V3D_BACKFACE_CULLING) | if (v3d->flag2 & V3D_BACKFACE_CULLING) | ||||
| glDisable(GL_CULL_FACE); | glDisable(GL_CULL_FACE); | ||||
| glDisable(GL_FOG); | |||||
| return retval; | return retval; | ||||
| } | } | ||||
| Context not available. | |||||
| const short render_only = (v3d->flag2 & V3D_RENDER_OVERRIDE); | const short render_only = (v3d->flag2 & V3D_RENDER_OVERRIDE); | ||||
| const short solid = (dt > OB_WIRE); | const short solid = (dt > OB_WIRE); | ||||
| /* render mist */ | |||||
| if (draw_mt_mist(scene, v3d)) { | |||||
| glEnable(GL_FOG); | |||||
| } | |||||
| if (drawCurveDerivedMesh(scene, v3d, rv3d, base, dt) == false) { | if (drawCurveDerivedMesh(scene, v3d, rv3d, base, dt) == false) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| Context not available. | |||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| glDisable(GL_FOG); | |||||
| return FALSE; | return FALSE; | ||||
| } | } | ||||
| Context not available. | |||||