mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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
This commit is contained in:
parent
4133fa711f
commit
46e19e149f
12 changed files with 68 additions and 72 deletions
|
@ -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)))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue