Don't call most SDL_GL_xxx functions when using WebGPU API
This commit is contained in:
parent
7c5062e081
commit
8d25721d35
1 changed files with 5 additions and 1 deletions
|
|
@ -201,7 +201,9 @@ namespace psemek::sdl2
|
|||
|
||||
void window::swap()
|
||||
{
|
||||
#if defined(PSEMEK_GRAPHICS_API_OPENGL)
|
||||
SDL_GL_SwapWindow(window_);
|
||||
#endif
|
||||
}
|
||||
|
||||
void window::show_cursor(bool show)
|
||||
|
|
@ -215,8 +217,9 @@ namespace psemek::sdl2
|
|||
SDL_SetRelativeMouseMode(mode ? SDL_TRUE: SDL_FALSE);
|
||||
}
|
||||
|
||||
void window::vsync(bool on)
|
||||
void window::vsync([[maybe_unused]] bool on)
|
||||
{
|
||||
#if defined(PSEMEK_GRAPHICS_API_OPENGL)
|
||||
log::info() << "Turning VSync " << (on ? "on" : "off");
|
||||
if (on)
|
||||
{
|
||||
|
|
@ -231,6 +234,7 @@ namespace psemek::sdl2
|
|||
{
|
||||
SDL_GL_SetSwapInterval(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void window::windowed(bool on)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue