about FPS

Started by
3 comments, last by Trienco 19 years, 6 months ago
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..
+-+-+-+-+-STR
Advertisement
i found it in faq, but i must do turning off with codes...
+-+-+-+-+-STR
Look up this extension: wglSwapIntervalEXT
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...
+-+-+-+-+-STR
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 ,-)
f@dzhttp://festini.device-zero.de

This topic is closed to new replies.

Advertisement