Make image drawing code working with core profile
[blender.git] / source / blender / editors / space_node / node_draw.c
index 3e0adb3243f50750a4c38fa4c435a4becd407712..cb5f434849ef93dc1cc7443103952f56e64ef904 100644 (file)
@@ -706,8 +706,8 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);  /* premul graphics */
        
-       immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
-       immDrawPixelsTex(draw_rect.xmin, draw_rect.ymin, preview->xsize, preview->ysize, GL_RGBA, GL_UNSIGNED_BYTE, GL_LINEAR, preview->rect,
+       IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
+       immDrawPixelsTex(&state, draw_rect.xmin, draw_rect.ymin, preview->xsize, preview->ysize, GL_RGBA, GL_UNSIGNED_BYTE, GL_LINEAR, preview->rect,
                         scale, scale, NULL);
        
        glDisable(GL_BLEND);