I have used wglSwapIntervalEXT in my previous win32 project and it has worked correctly( it disabled the VSync )
But now, In my MFC project it doesn’t disable VSync:
if( WGLEW_EXT_swap_control )
Note that I have used GLEW library, It has been initialized and I can recognize the OpenGL extensions( For example I’m currently using multisampling ). wglSwapIntervalEXT(0) is executed, but it doesn’t change anything.
I have used MFC timer, I have set the timer with the following function:
SetTimer( 1, 1, 0 );
My application runs about 65 FPS, but my GPU supports this extension.I render simple objects with only 2000-3000 vertices. I don’t use GLSL or any special effects.So something is going wrong…
BTW, my graphics card is Geforce 7300 GT
Vsync can be overrided on or off in the driver.
For example nvidia control panel has this option. You may want to check if this somthing like “force vsync”, whereas it should be “application default”.
Edit: But if this is a win32 versus MFC problem, I don’t have any clue…
Yes, I had checked those settings before.
It seems that it’s a question about MFC. the problem is that MFC timer loops about 65 times a second and its not like a while command which tries to loop as much as it can. I have discovered the problem, but I couldn’t find a solution yet
MFC is just a wrapper for Win32. If you are using SetTimer, then it has a resolution of about 50 ms or something like that. It generate WM_TIMER which takes time to process. You need to render in a loop just like you do in your non-MFC code.
Maybe the OnIdle handler is what you need.