* [PATCH] SDL: enable OpenGL context creation
@ 2020-10-04 10:42 Jan Henrik Weinstock
2020-10-13 12:51 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Jan Henrik Weinstock @ 2020-10-04 10:42 UTC (permalink / raw)
To: qemu-devel; +Cc: kraxel
We need to specify SDL_WINDOW_OPENGL if we want to create an OpenGL
context on it, i.e. when using '-device virtio-gpu-pci,virgl=on'
Signed-off-by: Jan Henrik Weinstock <jan.weinstock@rwth-aachen.de>
---
ui/sdl2.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/sdl2.c b/ui/sdl2.c
index abad7f981e..189d26e2a9 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -84,6 +84,11 @@ void sdl2_window_create(struct sdl2_console *scon)
if (scon->hidden) {
flags |= SDL_WINDOW_HIDDEN;
}
+#ifdef CONFIG_OPENGL
+ if (scon->opengl) {
+ flags |= SDL_WINDOW_OPENGL;
+ }
+#endif
scon->real_window = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] SDL: enable OpenGL context creation
2020-10-04 10:42 [PATCH] SDL: enable OpenGL context creation Jan Henrik Weinstock
@ 2020-10-13 12:51 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2020-10-13 12:51 UTC (permalink / raw)
To: Jan Henrik Weinstock; +Cc: qemu-devel
On Sun, Oct 04, 2020 at 12:42:21PM +0200, Jan Henrik Weinstock wrote:
> We need to specify SDL_WINDOW_OPENGL if we want to create an OpenGL context
> on it, i.e. when using '-device virtio-gpu-pci,virgl=on'
>
> Signed-off-by: Jan Henrik Weinstock <jan.weinstock@rwth-aachen.de>
Added to ui patch queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-13 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-04 10:42 [PATCH] SDL: enable OpenGL context creation Jan Henrik Weinstock
2020-10-13 12:51 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).