-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
bugsome feature is brokensome feature is broken
Milestone
Description
Tested with OpenSpades 0.1.2 and latest master
in Windows 10.
I still get 300+ fps even when r_vsync
is set.
Relevant piece of code:
openspades/Sources/Gui/SDLRunner.cpp
Lines 430 to 438 in b4a3837
switch (rtype) { | |
case RendererType::GL: | |
sdlFlags = SDL_WINDOW_OPENGL; | |
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); | |
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0); | |
SDL_GL_SetSwapInterval(r_vsync); | |
if (!r_allowSoftwareRendering) | |
SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1); | |
"No OpenGL context has been made current" is returned by SDL_GetError()
when I used the following code to debug this problem:
if (SDL_GL_SetSwapInterval(r_vsync) != 0) {
SPRaise(SDL_GetError());
}
Perhaps SDL_GL_SetSwapInterval
has to be called at a later time?
As a workaround, I'm using cl_fps
to limit the FPS to the same as my screen refresh rate.
Metadata
Metadata
Assignees
Labels
bugsome feature is brokensome feature is broken