diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-04-04 21:33:23 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-05 16:02:31 +0300 |
commit | cbd78c81268f06e7b658ae042f3ab6a3816149b0 (patch) | |
tree | d5740e2643a7c42185ae94bc04575223c1af9045 /source/blender/gpu/intern/gpu_viewport.c | |
parent | bbfa1a8639114d66ed0c4971a1996e08e520bd06 (diff) |
Immediate Mode: replacing glPushAttrib/glPopAttrib
Reference document: http://docs.gl/gl3/glPushAttrib
This patch only tackles the bits that are set by Blender with the
following exceptions:
1) Deprecated states (e.g., GL_STIPPLE) are not saved/restored
2) The exception being GL_ALPHA_TEST, which will be removed, but it may
affect drawing too much now. To be removed once we no longer set GL_ALPHA_TEST
elsewhere.
3) paint_cursor will be tackled separated, since it was abusing
glPush/PopAttrib in the first place.
4) Despite what the glPushAttrib page above may suggest, GL_DEPTH_WRITEMASK needs glGet, not glIsEnabled
5) BGE is still a problem since it relies on GL_ALL_ATTRIB_BITS which
would lead to a way more complete/lenghty solution. Since the BGE has
other (OpenGL deprecated) problems anyways, it can be handled on its own
time.
Finally, the original design for 2.8 was to implement a proper stack
system. However we need to move to core profile sooner than later. So
this is a pragmatic temporary (that may be permanent) solution.
Reviewers: merwin, campbellbarton
Differential Revision: https://developer.blender.org/D2600
Diffstat (limited to 'source/blender/gpu/intern/gpu_viewport.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_viewport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index 7c2cb8cd4bb..bcfe4f38f3e 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -285,7 +285,7 @@ void GPU_viewport_unbind(GPUViewport *viewport) DefaultFramebufferList *dfbl = (DefaultFramebufferList *)viewport->fbl; if (dfbl->default_fb) { - GPU_framebuffer_texture_unbind(NULL, NULL); + GPU_framebuffer_texture_unbind(dfbl->default_fb, NULL); GPU_framebuffer_restore(); glEnable(GL_SCISSOR_TEST); |