From 6e901fd8fc5b89e52dc44fd87a782c4f47c9c3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 25 Aug 2020 23:27:40 +0200 Subject: 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. --- source/blender/gpu/intern/gpu_context.cc | 34 -------------------------------- 1 file changed, 34 deletions(-) (limited to 'source/blender/gpu/intern/gpu_context.cc') 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(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(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(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); -- cgit v1.2.3