Configure SDL2 to use OpenGL #4

Merged
paoda merged 7 commits from opengl into main 2022-10-20 01:41:51 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit eff52ac1bb - Show all commits

View File

@ -65,7 +65,7 @@ pub const Gui = struct {
if (SDL.SDL_GL_MakeCurrent(window, ctx) < 0) panic();
gl.load(ctx, Self.glGetProcAddress) catch @panic("gl.load failed");
if (config.config().host.vsync) if (SDL.SDL_GL_SetSwapInterval(1) < 0) panic();
if (SDL.SDL_GL_SetSwapInterval(@boolToInt(config.config().host.vsync)) < 0) panic();
const program_id = compileShaders();