#include "SDLApplication.h"
#include <windows.h>
Include dependency graph for SDLApplication.cpp:
Go to the source code of this file.
Namespaces | |
namespace | pge |
Typedefs | |
typedef int(* | PFNWGLEXTGETSWAPINTERVALPROC )(void) |
Functions | |
typedef | void (APIENTRY *PFNWGLEXTSWAPCONTROLPROC)(int) |
bool | initVSync () |
bool | vsyncEnabled () |
void | setVSyncEnabled (bool enable) |
Variables | |
PFNWGLEXTSWAPCONTROLPROC | wglSwapIntervalEXT = NULL |
PFNWGLEXTGETSWAPINTERVALPROC | wglGetSwapIntervalEXT = NULL |
|
Definition at line 8 of file SDLApplication.cpp. Referenced by initVSync(). |
|
Definition at line 13 of file SDLApplication.cpp. References PFNWGLEXTGETSWAPINTERVALPROC, wglGetSwapIntervalEXT, and wglSwapIntervalEXT. Referenced by pge::SDLApplication::openWindow().
00013 { 00014 char* extensions = (char*)glGetString(GL_EXTENSIONS); 00015 00016 if (strstr(extensions,"WGL_EXT_swap_control")) { 00017 wglSwapIntervalEXT = (PFNWGLEXTSWAPCONTROLPROC)wglGetProcAddress("wglSwapIntervalEXT"); 00018 wglGetSwapIntervalEXT = (PFNWGLEXTGETSWAPINTERVALPROC)wglGetProcAddress("wglGetSwapIntervalEXT"); 00019 return true; 00020 } else { 00021 return false; 00022 } 00023 } |
|
Definition at line 29 of file SDLApplication.cpp. References wglSwapIntervalEXT. Referenced by pge::SDLApplication::openWindow().
00029 { 00030 if (enable) { 00031 wglSwapIntervalEXT(1); 00032 } else { 00033 wglSwapIntervalEXT(0); 00034 } 00035 } |
|
|
|
Definition at line 25 of file SDLApplication.cpp. References wglGetSwapIntervalEXT.
00025 { 00026 return (wglGetSwapIntervalEXT() > 0); 00027 } |
|
Definition at line 11 of file SDLApplication.cpp. Referenced by initVSync(), and vsyncEnabled(). |
|
Definition at line 10 of file SDLApplication.cpp. Referenced by initVSync(), and setVSyncEnabled(). |