aboutsummaryrefslogtreecommitdiff
path: root/ui/sdl2-gl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-10-10 15:54:49 +0200
committerGerd Hoffmann <kraxel@redhat.com>2017-10-17 10:25:42 +0200
commit46e19e149f3b129a22c440caba853188df67deab (patch)
tree4c3b53e551e8f69b3762f5961551594ca72ee9d7 /ui/sdl2-gl.c
parent4133fa711f37f0db303bf5aac03ea31b5be6ac1d (diff)
downloadqemu-46e19e149f3b129a22c440caba853188df67deab.zip
qemu-46e19e149f3b129a22c440caba853188df67deab.tar.gz
qemu-46e19e149f3b129a22c440caba853188df67deab.tar.bz2
opengl: move shader init from console-gl.c to shader.c
With the upcoming dmabuf support in qemu there will be more users of the shaders than just console-gl.c. So rename ConsoleGLState to QemuGLShader, rename some functions too, move code from console-gl.c to shaders.c. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20171010135453.6704-3-kraxel@redhat.com
Diffstat (limited to 'ui/sdl2-gl.c')
-rw-r--r--ui/sdl2-gl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c
index 9110491..5e1073a 100644
--- a/ui/sdl2-gl.c
+++ b/ui/sdl2-gl.c
@@ -90,7 +90,7 @@ void sdl2_gl_switch(DisplayChangeListener *dcl,
scon->surface = new_surface;
if (!new_surface) {
- console_gl_fini_context(scon->gls);
+ qemu_gl_fini_shader(scon->gls);
scon->gls = NULL;
sdl2_window_destroy(scon);
return;
@@ -98,7 +98,7 @@ void sdl2_gl_switch(DisplayChangeListener *dcl,
if (!scon->real_window) {
sdl2_window_create(scon);
- scon->gls = console_gl_init_context();
+ scon->gls = qemu_gl_init_shader();
} else if (old_surface &&
((surface_width(old_surface) != surface_width(new_surface)) ||
(surface_height(old_surface) != surface_height(new_surface)))) {