PDA

View Full Version : Full-Screen slow



joeyTR
03-22-2003, 10:25 AM
Hi http://www.opengl.org/discussion_boards/ubb/smile.gif

I have just finished a small (and very basic) OpenGL demo and while it runs very fast in window mode, it is quite slow (almost half-speed) in Full-Screen.

I'm very new at this and there's a very good chance I might have done something fundamentally wrong, so please post ANY suggestions. http://www.opengl.org/discussion_boards/ubb/wink.gif

I use OpenGL32 and the GLu32 Library (no glut) and VC++ 6.0.

Thank you all. http://www.opengl.org/discussion_boards/ubb/smile.gif

[This message has been edited by joeyTR (edited 03-22-2003).]

Soulreaver
03-22-2003, 02:01 PM
You have to disable vsync from opengl settings.

joeyTR
03-22-2003, 04:33 PM
Thanks, but this is not the case.

Only MY program slows down when in full-screen. I haven't written any code to control vsync. The program should always be running in full speed.

Please help! Any takers?

Thanks http://www.opengl.org/discussion_boards/ubb/smile.gif


[This message has been edited by joeyTR (edited 03-22-2003).]

Soulreaver
03-22-2003, 11:53 PM
You can use these code to disable vsync from
your progarm:

PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = 0;
PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = 0;

wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)
wglGetProcAddress("wglSwapIntervalEXT");
wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)
wglGetProcAddress("wglGetSwapIntervalEXT");
wglSwapIntervalEXT(0);

0=Off;
1=1*Vsync;
2=2*Vsync;
.
.
.

If i didnt confuse you may use above code.

Soulreaver
03-22-2003, 11:57 PM
Sorry i forget the header.You have to include wglext.h

joeyTR
03-23-2003, 07:31 AM
It worked! Soulreaver thank you very much! http://www.opengl.org/discussion_boards/ubb/smile.gif

Still, would you happen to know why this was necessary? I mean, I run other programs from tutorials, etc much more advanced than the program that I did, and they run fine, without vsync control. http://www.opengl.org/discussion_boards/ubb/confused.gif

Is it something that I might do that causes the need for disabling vsync?

Again thanks so much for helping me out! http://www.opengl.org/discussion_boards/ubb/smile.gif (and how come no one else is joining in - esp the old members of the forum? http://www.opengl.org/discussion_boards/ubb/frown.gif )