PDA

View Full Version : DOUBLEBUFFER



07-01-2003, 07:25 AM
i wrote a small program (from a tutorial) and when i request double buffer it cant make a rendering context!
i sent my program to a friend and it works ok there!
i have geforce3 on pentium3 550
any ideas?
thanks

Sourpotato
07-01-2003, 09:37 PM
don't know what os are running? On win32,

the PIXELFORMATDESCRIPTOR dwFlags field should be set as PFD_DOUBLEBUFFER for swapbuffer

07-01-2003, 10:24 PM
its win XP,
it is PFD....
the program works on other computers!

Sourpotato
07-01-2003, 11:43 PM
Please search the forum, there are some previous posts talk about opengl app on winxp is abnormally slow comparing win2k and 98 .I don't remember exactly. It looks like the pixelformat on XP need different setting ,something like that.

Deiussum
07-02-2003, 04:58 AM
Post some code for how you setup your PIXELFORMATDESCRIPTOR...

One common things to forget that can cause mixed results include things like not clearing out the memory of the PIXELFORMATDESCRIPTOR before setting the members you care about.

e.g.
memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));

pfd.whatever = whatever;

Also, make sure you use DescribePixelFormat before SetPixelFormat. Some systems it appears to work w/o doing that, some don't. It doesn't hurt to add it just to ensure that your PIXELFORMATDESCRIPTOR is correctly filled in, though.

[This message has been edited by Deiussum (edited 07-02-2003).]