Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager.c
| Show First 20 Lines • Show All 1,542 Lines • ▼ Show 20 Lines | void DRW_render_to_image(RenderEngine *engine, struct Depsgraph *depsgraph) | ||||
| /* Force cache to reset. */ | /* Force cache to reset. */ | ||||
| drw_viewport_cache_resize(); | drw_viewport_cache_resize(); | ||||
| /* TODO grease pencil */ | /* TODO grease pencil */ | ||||
| GPU_viewport_free(DST.viewport); | GPU_viewport_free(DST.viewport); | ||||
| GPU_framebuffer_restore(); | GPU_framebuffer_restore(); | ||||
| #ifdef DEBUG | |||||
| /* Avoid accidental reuse. */ | |||||
| drw_state_ensure_not_reused(&DST); | |||||
| #endif | |||||
| /* Changing Context */ | /* Changing Context */ | ||||
| if (re_gl_context != NULL) { | if (re_gl_context != NULL) { | ||||
| DRW_shape_cache_reset(); /* XXX fix that too. */ | DRW_shape_cache_reset(); /* XXX fix that too. */ | ||||
| glFlush(); | glFlush(); | ||||
| GWN_context_active_set(NULL); | GWN_context_active_set(NULL); | ||||
| WM_opengl_context_release(re_gl_context); | WM_opengl_context_release(re_gl_context); | ||||
| /* TODO get rid of the blocking. */ | /* TODO get rid of the blocking. */ | ||||
| BLI_mutex_unlock(&DST.gl_context_mutex); | BLI_mutex_unlock(&DST.gl_context_mutex); | ||||
| } | } | ||||
| else { | else { | ||||
| DRW_opengl_context_disable(); | DRW_opengl_context_disable(); | ||||
| } | } | ||||
| #ifdef DEBUG | |||||
| /* Avoid accidental reuse. */ | |||||
| drw_state_ensure_not_reused(&DST); | |||||
| #endif | |||||
| } | } | ||||
| void DRW_render_object_iter( | void DRW_render_object_iter( | ||||
| void *vedata, RenderEngine *engine, struct Depsgraph *depsgraph, | void *vedata, RenderEngine *engine, struct Depsgraph *depsgraph, | ||||
| void (*callback)(void *vedata, Object *ob, RenderEngine *engine, struct Depsgraph *depsgraph)) | void (*callback)(void *vedata, Object *ob, RenderEngine *engine, struct Depsgraph *depsgraph)) | ||||
| { | { | ||||
| DRW_hair_init(); | DRW_hair_init(); | ||||
| ▲ Show 20 Lines • Show All 677 Lines • Show Last 20 Lines | |||||