diff options
author | Jan Henrik Weinstock <jan.weinstock@rwth-aachen.de> | 2020-10-04 12:42:21 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-10-14 06:05:56 +0200 |
commit | 67c6f1dbb708f4cf0edc18d427f694654999b4b2 (patch) | |
tree | c40879a705864bce2f00a0032c11796c2b2d87f0 /ui | |
parent | db88404a4e0f1cc1d2f26ed8187690088ba38a2b (diff) |
SDL: enable OpenGL context creation
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>
Message-id: b2ba98b3-2975-0d4d-1c56-f659923c714d@rwth-aachen.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/sdl2.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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, |