Make image drawing code working with core profile
[blender.git] / source / blender / windowmanager / intern / wm_dragdrop.c
index 0402a528e8d0fe08914fb07cb4c2547ebd1259fd..40a2bf42a28cc180ecc46d4b8e72995ed7b76909 100644 (file)
@@ -335,8 +335,8 @@ void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect)
                                drag_rect_minmax(rect, x, y, x + drag->sx, y + drag->sy);
                        else {
                                float col[4] = {1.0f, 1.0f, 1.0f, 0.65f}; /* this blends texture */
-                               immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
-                               immDrawPixelsTexScaled(x, y, drag->imb->x, drag->imb->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST,
+                               IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
+                               immDrawPixelsTexScaled(&state, x, y, drag->imb->x, drag->imb->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST,
                                                       drag->imb->rect, drag->scale, drag->scale, 1.0f, 1.0f, col);
                        }
                }