diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-04-04 19:38:26 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-04 19:43:01 +0300 |
commit | f10219a9772c948ecddfa486ba591952d3caafdc (patch) | |
tree | 93b9961ca0489bc1ee9c6a7813fd373a77c8d367 /source/blender/editors | |
parent | fa317eb69c6e7f83cac329f209d7a76916754e76 (diff) |
Immediate Mode: handle other cases of glPop/glPushClientAttrib
Those cases were not using ClientAttrib but they should :)
Rather use a OpenGL3.3 alternative anyways.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 3108f965075..5a011db6090 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -411,6 +411,9 @@ void immDrawPixelsTexScaled_clipping(float x, float y, int img_w, int img_h, const bool use_clipping = ((clip_min_x < clip_max_x) && (clip_min_y < clip_max_y)); float white[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + GLint unpack_row_length; + glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpack_row_length); + glPixelStorei(GL_UNPACK_ROW_LENGTH, img_w); glBindTexture(GL_TEXTURE_2D, texid); @@ -546,7 +549,7 @@ void immDrawPixelsTexScaled_clipping(float x, float y, int img_w, int img_h, immUnbindProgram(); glBindTexture(GL_TEXTURE_2D, 0); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_ROW_LENGTH, unpack_row_length); } void immDrawPixelsTexScaled(float x, float y, int img_w, int img_h, |