diff options
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_state.cc | 18 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_state_private.hh | 1 |
2 files changed, 13 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc index a3d07b1e1db..b63abb3d57f 100644 --- a/source/blender/gpu/intern/gpu_state.cc +++ b/source/blender/gpu/intern/gpu_state.cc @@ -305,6 +305,17 @@ void GPU_finish(void) Context::get()->finish(); } +void GPU_apply_state(void) +{ + Context::get()->state_manager->apply_state(); +} + +/* Will set all the states regardless of the current ones. */ +void GPU_force_state(void) +{ + Context::get()->state_manager->force_state(); +} + /** \} */ /* -------------------------------------------------------------------- */ @@ -319,12 +330,7 @@ void GPU_memory_barrier(eGPUBarrier barrier) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Default OpenGL State - * - * This is called on startup, for opengl offscreen render. - * Generally we should always return to this state when - * temporarily modifying the state for drawing, though that are (undocumented) - * exceptions that we should try to get rid of. +/** \name Default State * \{ */ StateManager::StateManager(void) diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh index d85375a85bb..b8d247ec175 100644 --- a/source/blender/gpu/intern/gpu_state_private.hh +++ b/source/blender/gpu/intern/gpu_state_private.hh @@ -159,6 +159,7 @@ class StateManager { virtual ~StateManager(){}; virtual void apply_state(void) = 0; + virtual void force_state(void) = 0; virtual void issue_barrier(eGPUBarrier barrier_bits) = 0; |