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/windowmanager/intern/wm_playanim.c')
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 948e8d9fb74..d0a70596957 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -58,6 +58,7 @@
#include "BIF_glutil.h"
#include "GPU_context.h"
+#include "GPU_framebuffer.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_init_exit.h"
@@ -309,13 +310,14 @@ static void playanim_toscreen(
CLAMP(offs_x, 0.0f, 1.0f);
CLAMP(offs_y, 0.0f, 1.0f);
- glClearColor(0.1, 0.1, 0.1, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
+ GPU_clear_color(0.1, 0.1, 0.1, 0.0);
+ GPU_clear(GPU_COLOR_BIT);
/* checkerboard for case alpha */
if (ibuf->planes == 32) {
GPU_blend(true);
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ GPU_blend_set_func_separate(
+ GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
imm_draw_box_checker_2d_ex(offs_x,
offs_y,
@@ -333,9 +335,8 @@ static void playanim_toscreen(
offs_y + (ps->draw_flip[1] ? span_y : 0.0f),
ibuf->x,
ibuf->y,
- GL_RGBA,
- GL_UNSIGNED_BYTE,
- GL_NEAREST,
+ GPU_RGBA8,
+ false,
ibuf->rect,
((ps->draw_flip[0] ? -1.0f : 1.0f)) * (ps->zoom / (float)ps->win_x),
((ps->draw_flip[1] ? -1.0f : 1.0f)) * (ps->zoom / (float)ps->win_y),
@@ -542,7 +543,6 @@ static void build_pict_list_ex(
totframes--;
}
}
- return;
}
static void build_pict_list(PlayState *ps, const char *first, int totframes, int fstep, int fontid)
@@ -1059,8 +1059,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
/* zoom always show entire image */
ps->zoom = MIN2(zoomx, zoomy);
- glViewport(0, 0, ps->win_x, ps->win_y);
- glScissor(0, 0, ps->win_x, ps->win_y);
+ GPU_viewport(0, 0, ps->win_x, ps->win_y);
+ GPU_scissor(0, 0, ps->win_x, ps->win_y);
playanim_gl_matrix();
@@ -1316,13 +1316,13 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
maxwiny = ibuf->y * (1 + (maxwiny / ibuf->y));
}
- glClearColor(0.1, 0.1, 0.1, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
+ GPU_clear_color(0.1, 0.1, 0.1, 0.0);
+ GPU_clear(GPU_COLOR_BIT);
int win_x, win_y;
playanim_window_get_size(&win_x, &win_y);
- glViewport(0, 0, win_x, win_y);
- glScissor(0, 0, win_x, win_y);
+ GPU_viewport(0, 0, win_x, win_y);
+ GPU_scissor(0, 0, win_x, win_y);
playanim_gl_matrix();
GHOST_SwapWindowBuffers(g_WS.ghost_window);