• Advertisement
Sign in to follow this  

about FPS

This topic is 4890 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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..

Share this post


Link to post
Share on other sites
Advertisement
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...

Share this post


Link to post
Share on other sites
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 ,-)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement