diff options
author | Ton Roosendaal <ton@blender.org> | 2010-11-20 22:20:27 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-11-20 22:20:27 +0300 |
commit | 06fdd5b95df436d2b9dc158a0e36e8e357f8538d (patch) | |
tree | ce7d1e54d91fa50cdccdcadef6af4d1acde7d39f /source/blender/editors/space_view3d/view3d_draw.c | |
parent | bf14b214813c48beea1c9ca50e58b6002ec869a6 (diff) |
Bugfix #24792
On file save, the 3d view thumbnail creation caused changes in lighting
enables. Solved with a glPushAttrib() and pop.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 9765c740698..bdc79e4f0f3 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2138,6 +2138,9 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in RegionView3D *rv3d= ar->regiondata; ImBuf *ibuf; GPUOffScreen *ofs; + + /* state changes make normal drawing go weird otherwise */ + glPushAttrib(GL_LIGHTING_BIT); /* bind */ ofs= GPU_offscreen_create(&sizex, &sizey); @@ -2175,6 +2178,8 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in GPU_offscreen_unbind(ofs); GPU_offscreen_free(ofs); + glPopAttrib(); + if(ibuf->rect_float && ibuf->rect) IMB_rect_from_float(ibuf); |