diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-04-14 15:13:38 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-14 19:07:16 +0300 |
commit | cb2c4bfb74ca7f385bbd8d7c3445a49a2d1b7b8d (patch) | |
tree | 516eb56f5d9247784a94f6d02d91ad247040f6a5 /source/blender/gpu/intern/gpu_framebuffer.c | |
parent | e7c4eddace27272ba4d14f7e2fd0a39256e3c656 (diff) |
GPU Matrix API refactor: Stick to a single 4x4 stack for 2D and 3D
* Brings us closer to core profile, all matrices are working, and apart
from a problem with text drawing, Blender is working fine.
* Reduce the coding overhead of having to setup/teardown when
alternating between 2D and 3D drawing sessions.
* Gives us fewer modes and states we need to keep track of.
Unfortunatelly this also "rejects a fundamental change" the original
design was trying to make - that 2D is different from 3D and
deserves its own best implementation.
That said, it is still aligned with the function API design as
originally implemented (i.e., it still uses gpuTranslate2D, ...).
Finally, if you build with core profile and this patch you get:
https://developer.blender.org/F545352
[The text glitch is an unrelated issue].
Reviewers: merwin, sergey, brecht
Differential Revision: https://developer.blender.org/D2626
Diffstat (limited to 'source/blender/gpu/intern/gpu_framebuffer.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c index 5e66c691f37..fc6eb6baf51 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.c +++ b/source/blender/gpu/intern/gpu_framebuffer.c @@ -415,9 +415,6 @@ void GPU_framebuffer_blur( glDisable(GL_DEPTH_TEST); - /* Load fresh matrices */ - gpuMatrixBegin3D(); /* TODO: finish 2D API */ - /* Blurring horizontally */ /* We do the bind ourselves rather than using GPU_framebuffer_texture_bind() to avoid * pushing unnecessary matrices onto the OpenGL stack. */ @@ -451,8 +448,6 @@ void GPU_framebuffer_blur( Batch_Uniform2f(&batch, "ScaleU", scalev[0], scalev[1]); Batch_Uniform1i(&batch, "textureSource", GL_TEXTURE0); Batch_draw(&batch); - - gpuMatrixEnd(); } void GPU_framebuffer_blit(GPUFrameBuffer *fb_read, int read_slot, GPUFrameBuffer *fb_write, int write_slot, bool use_depth) |