Opened 14 years ago

Closed 13 years ago

#523 closed task (fixed)

Implement SDL_GL_SWAP_CONTROL on Windows

Reported by: Philip Taylor Owned by: janwas
Priority: If Time Permits Milestone: Alpha 2
Component: Core engine Keywords: simple
Cc: Andrew Patch:

Description

ps/VideoMode.cpp does SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, ...) to set vsync.

On Windows we emulate the SDL API, and don't support that attribute. ps/GameSetup/GameSetup.cpp uses WGL_EXT_swap_control instead. That OS-specific code ought to be moved into lib/sysdep/os/win/wsdl.cpp to implement the standard SDL attribute.

Attachments (1)

SDLGLSWAPCONTROLWIN.patch (1.3 KB ) - added by Andrew 14 years ago.
Patch for enable disable VSync Windows

Download all attachments as: .zip

Change History (8)

by Andrew, 14 years ago

Attachment: SDLGLSWAPCONTROLWIN.patch added

Patch for enable disable VSync Windows

comment:1 by Andrew, 14 years ago

Attached a patch to imp this.

comment:2 by Philip Taylor, 14 years ago

A few things:

Rather than using the low-level GL APIs, this should just use the existing ogl_HaveExtension/pwglSwapIntervalEXT like GameSetup.cpp does. Also the patch should remove that code from GameSetup.cpp.

The "// not implemented yet" comment in wsdl.h should be removed.

What does the comment

    // We should not have to call this here but since our code is not really friendly 
    // this will have to do!. 

mean?

comment:3 by Philip Taylor, 14 years ago

Cc: Andrew added

(Adding CC since I just realised you might not be notified of changes here)

comment:4 by (none), 13 years ago

Milestone: Unclassified

Milestone Unclassified deleted

comment:5 by Andrew, 13 years ago

Milestone: OS Alpha 2
Owner: set to Andrew

comment:6 by Kieran P, 13 years ago

Owner: changed from Andrew to janwas

comment:7 by Jan Wassenberg, 13 years ago

Resolution: fixed
Status: newclosed

(In [8399]) move support for GL swap control into wsdl (based on patch from wacko) fixes #523

Note: See TracTickets for help on using tickets.