GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


A Paste by Anonymous
/* put all of the following inside a header file */

// opengl header files
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glext.h>

// wgl function pointer for vsync
typedef bool (APIENTRY *PFNWGLSWAPINTERVALEXTPROC)        (int interval);
extern PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;

/* put all of the following inside the cpp file */

// extension function pointers
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;

void loadallpointers()
{
    wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)      wglGetProcAddress ("wglSwapIntervalEXT");  
}