Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw.c
| Context not available. | |||||
| static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const char **grid_unit) | static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const char **grid_unit) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| World *world = scene->world; | |||||
| View3D *v3d = CTX_wm_view3d(C); | View3D *v3d = CTX_wm_view3d(C); | ||||
| RegionView3D *rv3d = CTX_wm_region_view3d(C); | RegionView3D *rv3d = CTX_wm_region_view3d(C); | ||||
| Base *base; | Base *base; | ||||
| unsigned int lay_used; | unsigned int lay_used; | ||||
| float mistcolor[3]; | |||||
| /* shadow buffers, before we setup matrices */ | /* shadow buffers, before we setup matrices */ | ||||
| if (draw_glsl_material(scene, NULL, v3d, v3d->drawtype)) | if (draw_glsl_material(scene, NULL, v3d, v3d->drawtype)) | ||||
| Context not available. | |||||
| glEnable(GL_MULTISAMPLE_ARB); | glEnable(GL_MULTISAMPLE_ARB); | ||||
| } | } | ||||
| /* update world values */ | |||||
| if (world && scene->gm.matmode == GAME_MAT_MULTITEX) { | |||||
| IMB_colormanagement_pixel_to_display_space_v3(mistcolor, &world->horr, &scene->view_settings, | |||||
| &scene->display_settings); | |||||
| GPU_set_fog(world->mistype, world->miststa, world->mistdist, world->misi, mistcolor); | |||||
| } | |||||
| /* needs to be done always, gridview is adjusted in drawgrid() now */ | /* needs to be done always, gridview is adjusted in drawgrid() now */ | ||||
| rv3d->gridview = v3d->grid; | rv3d->gridview = v3d->grid; | ||||
| Context not available. | |||||