Merge branch 'blender-v4.5-release'
This commit is contained in:
@@ -2028,17 +2028,10 @@ void DRW_module_init()
|
||||
|
||||
void DRW_module_exit()
|
||||
{
|
||||
if (DRW_gpu_context_try_enable() == false) {
|
||||
/* Nothing has been setup. Nothing to clear. */
|
||||
return;
|
||||
}
|
||||
|
||||
GPU_TEXTURE_FREE_SAFE(g_select_buffer.texture_depth);
|
||||
GPU_FRAMEBUFFER_FREE_SAFE(g_select_buffer.framebuffer_depth_only);
|
||||
|
||||
DRW_shaders_free();
|
||||
|
||||
DRW_gpu_context_disable();
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
@@ -63,8 +63,14 @@ void RE_engines_exit()
|
||||
{
|
||||
RenderEngineType *type, *next;
|
||||
|
||||
DRW_engines_free();
|
||||
DRW_module_exit();
|
||||
if (DRW_gpu_context_try_enable()) {
|
||||
/* Clean resources if the DRW context exists.
|
||||
* We need a context bound even when dealing with non context dependent GPU resources,
|
||||
* since GL functions may be null otherwise (See #141233). */
|
||||
DRW_engines_free();
|
||||
DRW_module_exit();
|
||||
DRW_gpu_context_disable();
|
||||
}
|
||||
|
||||
for (type = static_cast<RenderEngineType *>(R_engines.first); type; type = next) {
|
||||
next = type->next;
|
||||
|
||||
Reference in New Issue
Block a user