diff options
author | Dalai Felinto <dalai@blender.org> | 2020-08-06 15:29:33 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2020-08-06 17:44:03 +0300 |
commit | bc8168f4a2795d65cbe3afc02e09582d43e337c5 (patch) | |
tree | 6cbba44af6701b6c75c79b4fca09511aad50f08a /source/blender/gpu | |
parent | 45e6ca36615fe9a720c9f25343556326fcbd5952 (diff) |
Cleanup: Remove bad level calls from space image
Groundwork for upcoming fix (D8472)
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_viewport.h | 5 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_viewport.c | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_viewport.h b/source/blender/gpu/GPU_viewport.h index 50d265feaad..878e7e3e9a8 100644 --- a/source/blender/gpu/GPU_viewport.h +++ b/source/blender/gpu/GPU_viewport.h @@ -41,6 +41,8 @@ extern "C" { typedef struct GPUViewport GPUViewport; +struct GPUFrameBuffer; + /* Contains memory pools information */ typedef struct ViewportMemoryPool { struct BLI_memblock *commands; @@ -151,6 +153,9 @@ GPUTexture *GPU_viewport_texture_pool_query( bool GPU_viewport_engines_data_validate(GPUViewport *viewport, void **engine_handle_array); void GPU_viewport_cache_release(GPUViewport *viewport); +struct GPUFrameBuffer *GPU_viewport_framebuffer_default_get(GPUViewport *viewport); +struct GPUFrameBuffer *GPU_viewport_framebuffer_overlay_get(GPUViewport *viewport); + #ifdef __cplusplus } #endif diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index 4d31366f53f..7f133ca626d 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -1036,3 +1036,15 @@ void GPU_viewport_free(GPUViewport *viewport) MEM_freeN(viewport); } + +GPUFrameBuffer *GPU_viewport_framebuffer_default_get(GPUViewport *viewport) +{ + DefaultFramebufferList *fbl = GPU_viewport_framebuffer_list_get(viewport); + return fbl->default_fb; +} + +GPUFrameBuffer *GPU_viewport_framebuffer_overlay_get(GPUViewport *viewport) +{ + DefaultFramebufferList *fbl = GPU_viewport_framebuffer_list_get(viewport); + return fbl->overlay_fb; +} |