Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/screen/screen_draw.c')
-rw-r--r--source/blender/editors/screen/screen_draw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c
index 2452302561b..40a452a5363 100644
--- a/source/blender/editors/screen/screen_draw.c
+++ b/source/blender/editors/screen/screen_draw.c
@@ -404,7 +404,7 @@ void ED_screen_draw_edges(wmWindow *win)
/* It seems that all areas gets smaller when pixelsize is > 1.
* So in order to avoid missing pixels we just disable de scissors. */
if (U.pixelsize <= 1.0f) {
- glEnable(GL_SCISSOR_TEST);
+ GPU_scissor_test(true);
}
UI_GetThemeColor4fv(TH_EDITOR_OUTLINE, col);
@@ -429,7 +429,7 @@ void ED_screen_draw_edges(wmWindow *win)
GPU_blend(false);
if (U.pixelsize <= 1.0f) {
- glDisable(GL_SCISSOR_TEST);
+ GPU_scissor_test(false);
}
}
@@ -611,7 +611,7 @@ static void screen_preview_draw(const bScreen *screen, int size_x, int size_y)
void ED_screen_preview_render(const bScreen *screen, int size_x, int size_y, uint *r_rect)
{
char err_out[256] = "unknown";
- GPUOffScreen *offscreen = GPU_offscreen_create(size_x, size_y, 0, true, false, err_out);
+ GPUOffScreen *offscreen = GPU_offscreen_create(size_x, size_y, true, false, err_out);
GPU_offscreen_bind(offscreen, true);
GPU_clear_color(0.0, 0.0, 0.0, 0.0);
@@ -619,7 +619,7 @@ void ED_screen_preview_render(const bScreen *screen, int size_x, int size_y, uin
screen_preview_draw(screen, size_x, size_y);
- GPU_offscreen_read_pixels(offscreen, GL_UNSIGNED_BYTE, r_rect);
+ GPU_offscreen_read_pixels(offscreen, GPU_DATA_UNSIGNED_BYTE, r_rect);
GPU_offscreen_unbind(offscreen, true);
GPU_offscreen_free(offscreen);