diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-26 00:27:40 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-30 14:11:02 +0300 |
commit | 6e901fd8fc5b89e52dc44fd87a782c4f47c9c3f5 (patch) | |
tree | 1a683645a8628b00326f662b61958c1cf786d50b /source/blender/gpu/intern/gpu_context.cc | |
parent | ed7dbaa5a7246d72cc9bc2b59667d9a784c4c28d (diff) |
GPUFramebuffer: Make GPUFrameBuffer an opaque type
This is in preparation of the Framebuffer GL backend.
This is a just changing types and moving some code.
No logic is changed... almost... it just removes the context attach.
i.e: `gpu_context_add/remove_framebuffer()`
This is not needed for now and was even disabled in release.
This is part of T68990.
Diffstat (limited to 'source/blender/gpu/intern/gpu_context.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_context.cc | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc index ef02ec24a00..9b4705ae6a3 100644 --- a/source/blender/gpu/intern/gpu_context.cc +++ b/source/blender/gpu/intern/gpu_context.cc @@ -185,40 +185,6 @@ void GPU_tex_free(GLuint tex_id) static_cast<GLBackend *>(backend)->tex_free(tex_id); } -/* GPUBatch & GPUFrameBuffer contains respectively VAO & FBO indices - * which are not shared across contexts. So we need to keep track of - * ownership. */ - -void gpu_context_add_framebuffer(GPUContext *ctx, GPUFrameBuffer *fb) -{ -#ifdef DEBUG - BLI_assert(ctx); - static_cast<GLContext *>(ctx)->framebuffer_register(fb); -#else - UNUSED_VARS(ctx, fb); -#endif -} - -void gpu_context_remove_framebuffer(GPUContext *ctx, GPUFrameBuffer *fb) -{ -#ifdef DEBUG - BLI_assert(ctx); - static_cast<GLContext *>(ctx)->framebuffer_unregister(fb); -#else - UNUSED_VARS(ctx, fb); -#endif -} - -void gpu_context_active_framebuffer_set(GPUContext *ctx, GPUFrameBuffer *fb) -{ - ctx->current_fbo = fb; -} - -GPUFrameBuffer *gpu_context_active_framebuffer_get(GPUContext *ctx) -{ - return ctx->current_fbo; -} - struct GPUMatrixState *gpu_context_active_matrix_state_get() { BLI_assert(active_ctx); |