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_private.hh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source/blender/gpu/intern/gpu_context_private.hh') diff --git a/source/blender/gpu/intern/gpu_context_private.hh b/source/blender/gpu/intern/gpu_context_private.hh index e8c9c976e9a..d18d18dc97b 100644 --- a/source/blender/gpu/intern/gpu_context_private.hh +++ b/source/blender/gpu/intern/gpu_context_private.hh @@ -29,6 +29,7 @@ #include "GPU_context.h" +#include "gpu_framebuffer_private.hh" #include "gpu_shader_private.hh" #include "gpu_state_private.hh" @@ -38,14 +39,13 @@ #include #include -struct GPUFrameBuffer; struct GPUMatrixState; struct GPUContext { public: /** State managment */ blender::gpu::Shader *shader = NULL; - GPUFrameBuffer *current_fbo = NULL; + blender::gpu::FrameBuffer *active_fb = NULL; GPUMatrixState *matrix_state = NULL; blender::gpu::GPUStateManager *state_manager = NULL; @@ -82,9 +82,6 @@ void GPU_tex_free(GLuint tex_id); void GPU_vao_free(GLuint vao_id, GPUContext *ctx); void GPU_fbo_free(GLuint fbo_id, GPUContext *ctx); -void gpu_context_add_framebuffer(GPUContext *ctx, struct GPUFrameBuffer *fb); -void gpu_context_remove_framebuffer(GPUContext *ctx, struct GPUFrameBuffer *fb); - void gpu_context_active_framebuffer_set(GPUContext *ctx, struct GPUFrameBuffer *fb); struct GPUFrameBuffer *gpu_context_active_framebuffer_get(GPUContext *ctx); -- cgit v1.2.3