Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-29 16:17:13 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-30 14:11:03 +0300
commit8527d84d3588563123bfad7ccbdeeff62ee90bdb (patch)
tree51ccbaa3c129c62a54af5aed43b55b9c89b901e6 /source/blender/gpu/GPU_framebuffer.h
parent4f395c84fe9f05b59b81be36b464521bcf92331e (diff)
GPUState: Move Scissor and Viewport state to framebuffer
This way it is way clearer what each viewport state is. There is no more save and reset. The scissor test is also saved per framebuffer. The only rule to remember is that the viewport state (size and origin) is reset for both the viewport and scissor when a texture is attached or detached from an attachment slot.
Diffstat (limited to 'source/blender/gpu/GPU_framebuffer.h')
-rw-r--r--source/blender/gpu/GPU_framebuffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h
index aa89b29f767..a52cdea5167 100644
--- a/source/blender/gpu/GPU_framebuffer.h
+++ b/source/blender/gpu/GPU_framebuffer.h
@@ -163,6 +163,8 @@ void GPU_framebuffer_config_array(GPUFrameBuffer *fb, const GPUAttachment *confi
/* Framebuffer operations */
void GPU_framebuffer_viewport_set(GPUFrameBuffer *fb, int x, int y, int w, int h);
+void GPU_framebuffer_viewport_get(GPUFrameBuffer *fb, int r_viewport[4]);
+void GPU_framebuffer_viewport_reset(GPUFrameBuffer *fb);
void GPU_framebuffer_clear(GPUFrameBuffer *fb,
eGPUFrameBufferBits buffers,