MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ApplyVsync

Function ApplyVsync

Source/Graphics/graphics.cpp:756–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754}
755
756static void ApplyVsync(bool val) {
757 // Set VSync
758 if (val) {
759 /* try late-swap-tearing first. If not supported, try normal vsync. */
760 if (SDL_GL_SetSwapInterval(-1) == -1) {
761 SDL_GL_SetSwapInterval(1);
762 }
763 } else {
764 SDL_GL_SetSwapInterval(0); /* disable vsync. */
765 }
766}
767
768void Graphics::SetAnisotropy(float val) {
769 if (GLAD_GL_EXT_texture_filter_anisotropic) {

Callers 2

InitScreenMethod · 0.85
SetVsyncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected