Make image drawing code working with core profile
[blender.git] / source / blender / editors / render / render_preview.c
index 3fb09123131a5def1cb450a2b2c426aeba4b8de4..9a8e5631b7f3ff298d13280a98e4af5733496e0b 100644 (file)
@@ -600,8 +600,8 @@ static bool ed_preview_draw_rect(ScrArea *sa, int split, int first, rcti *rect,
                                if (re)
                                        RE_AcquiredResultGet32(re, &rres, (unsigned int *)rect_byte, 0);
 
                                if (re)
                                        RE_AcquiredResultGet32(re, &rres, (unsigned int *)rect_byte, 0);
 
-                               immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
-                               immDrawPixelsTex(fx, fy, rres.rectx, rres.recty, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, rect_byte,
+                               IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
+                               immDrawPixelsTex(&state, fx, fy, rres.rectx, rres.recty, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, rect_byte,
                                                 1.0f, 1.0f, NULL);
                                
                                MEM_freeN(rect_byte);
                                                 1.0f, 1.0f, NULL);
                                
                                MEM_freeN(rect_byte);