View Full Version : using wglChoosePixelFormat

08-11-2002, 04:45 PM
i'm trying to implement wglChoosePixelFormat but i'm a little confused. How do i actually set the pixel format. with SetPixelFormat? it still requires a PFD which i don't need any longer. someone help!

08-13-2002, 12:44 AM
First you have to call ChoosePixelFormat with the parameters of your desired pixel format. [Ensure that those members of the pixel format descriptor structure that you are not using are set to zero or you may not get a hardware accelerated format.] This function returns a pixel format index and also updates the pixel format descriptor that is passed to the ChoosePixelFormat function. These in turn are then passed to SetPixelFormat, along with handle to your display context. Lastly create your opengl rendering context from your display context. Voila!

Good luck

[This message has been edited by kevinhoque (edited 08-13-2002).]