about FPS
my program's fps cannot be 80. Because it waits for monitor's frame rate(70). how can i solve this? how can i know the real fps? i mean the fps when if program does not wait for the monitor..
thank you, i found a code for this:
typedef BOOL (APIENTRY *PFNWGLSWAPINTERVALFARPROC)( int );
PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT = 0;
void setVSync(int interval=1)
{
const unsigned char *extensions = glGetString( GL_EXTENSIONS );
if( strstr( (const char *)extensions, "WGL_EXT_swap_control" ) == 0 )
return; // Error: WGL_EXT_swap_control extension not supported on your computer.\n");
else
{
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress( "wglSwapIntervalEXT" );
if( wglSwapIntervalEXT )
wglSwapIntervalEXT(interval);
}
}
it uses the extension that you said...
typedef BOOL (APIENTRY *PFNWGLSWAPINTERVALFARPROC)( int );
PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT = 0;
void setVSync(int interval=1)
{
const unsigned char *extensions = glGetString( GL_EXTENSIONS );
if( strstr( (const char *)extensions, "WGL_EXT_swap_control" ) == 0 )
return; // Error: WGL_EXT_swap_control extension not supported on your computer.\n");
else
{
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress( "wglSwapIntervalEXT" );
if( wglSwapIntervalEXT )
wglSwapIntervalEXT(interval);
}
}
it uses the extension that you said...
Quote:Original post by stroma
it uses the extension that you said...
but keep in mind that forcing vsync off for anything but benchmarking is a great way to piss off the user ,-)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement