Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager.c
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "wm_window.h" | #include "wm_window.h" | ||||
| #include "draw_color_management.h" | #include "draw_color_management.h" | ||||
| #include "draw_manager_profiling.h" | #include "draw_manager_profiling.h" | ||||
| #include "draw_manager_testing.h" | |||||
| #include "draw_manager_text.h" | #include "draw_manager_text.h" | ||||
| /* only for callbacks */ | /* only for callbacks */ | ||||
| #include "draw_cache_impl.h" | #include "draw_cache_impl.h" | ||||
| #include "engines/basic/basic_engine.h" | #include "engines/basic/basic_engine.h" | ||||
| #include "engines/eevee/eevee_engine.h" | #include "engines/eevee/eevee_engine.h" | ||||
| #include "engines/external/external_engine.h" | #include "engines/external/external_engine.h" | ||||
| ▲ Show 20 Lines • Show All 2,787 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /* Needs to be called BEFORE DRW_opengl_render_context_disable() */ | /* Needs to be called BEFORE DRW_opengl_render_context_disable() */ | ||||
| void DRW_gpu_render_context_disable(void *UNUSED(re_gpu_context)) | void DRW_gpu_render_context_disable(void *UNUSED(re_gpu_context)) | ||||
| { | { | ||||
| GPU_context_active_set(NULL); | GPU_context_active_set(NULL); | ||||
| } | } | ||||
| /** \} */ | |||||
| #ifdef WITH_XR_OPENXR | #ifdef WITH_XR_OPENXR | ||||
| /* XXX | /* XXX | ||||
| * There should really be no such getter, but for VR we currently can't easily avoid it. OpenXR | * There should really be no such getter, but for VR we currently can't easily avoid it. OpenXR | ||||
| * needs some low level info for the OpenGL context that will be used for submitting the | * needs some low level info for the OpenGL context that will be used for submitting the | ||||
| * final framebuffer. VR could in theory create its own context, but that would mean we have to | * final framebuffer. VR could in theory create its own context, but that would mean we have to | ||||
| * switch to it just to submit the final frame, which has notable performance impact. | * switch to it just to submit the final frame, which has notable performance impact. | ||||
| * | * | ||||
| Show All 19 Lines | |||||
| /* XXX See comment on DRW_xr_opengl_context_get(). */ | /* XXX See comment on DRW_xr_opengl_context_get(). */ | ||||
| void DRW_xr_drawing_end(void) | void DRW_xr_drawing_end(void) | ||||
| { | { | ||||
| BLI_ticket_mutex_unlock(DST.gl_context_mutex); | BLI_ticket_mutex_unlock(DST.gl_context_mutex); | ||||
| } | } | ||||
| #endif | #endif | ||||
| /** \name Internal testing API for gtests | |||||
| * \{ */ | |||||
| #ifdef WITH_OPENGL_DRAW_TESTS | |||||
| void DRW_draw_state_init_gtests(eGPUShaderConfig sh_cfg) | |||||
| { | |||||
| DST.draw_ctx.sh_cfg = sh_cfg; | |||||
| } | |||||
| #endif | |||||
| /** \} */ | /** \} */ | ||||