diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-07 22:39:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-07 22:40:21 +0300 |
commit | 5bd9e832898221e5363150ee108655fd7f9c08a0 (patch) | |
tree | 80b71df4f7e358de302c304e04eb8708cbf2ee49 /source/blender/windowmanager/intern/wm_draw.c | |
parent | 91c146c42e51676c71eea39342be932c150d5d45 (diff) |
GPU: Fix triple buffer w/ basic glsl shader
Needed to add GL_TEXTURE_RECTANGLE support to basic-shader.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 8f15d94f538..962ed3c040d 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -437,8 +437,6 @@ void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha) float halfx, halfy, ratiox, ratioy; - glEnable(triple->target); - /* wmOrtho for the screen has this same offset */ ratiox = sizex; ratioy = sizey; @@ -453,6 +451,8 @@ void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha) halfy /= triple->y; } + GPU_basic_shader_bind((triple->target == GL_TEXTURE_2D) ? GPU_SHADER_TEXTURE_2D : GPU_SHADER_TEXTURE_RECT); + glBindTexture(triple->target, triple->bind); glColor4f(1.0f, 1.0f, 1.0f, alpha); @@ -471,7 +471,8 @@ void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha) glEnd(); glBindTexture(triple->target, 0); - glDisable(triple->target); + + GPU_basic_shader_bind(GPU_SHADER_USE_COLOR); } static void wm_triple_copy_textures(wmWindow *win, wmDrawTriple *triple) |