Skip to main content
GameDev.net gamedev.net
🔒 Locked

PixelFormatDescriptor Question.

Started by ChacaL Apr 9, 2002 at 6:57 PM 1 replies 750+ views
Original Post
ChacaL
ChacaL
What differ between these two PixelFormat codes: ----------------PixelFormat 1---------------- PIXELFORMATDESCRIPTOR pfd; pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); pfd.nVersion = 1 pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.dwLayerMask = PFD_MAIN_PLANE; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = SCREEN_DEPTH; pfd.cDepthBits = SCREEN_DEPTH; pfd.cAccumBits = 0; pfd.cStencilBits = 0; --------------------------------------------- ----------------PixelFormat 2---------------- PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), 1, PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER, PFD_TYPE_RGBA, SCREEN_DEPTH, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, PFD_MAIN_PLANE, 0, 0, 0, 0, }; --------------------------------------------- With ''PixelFormat 2'' I get 40 FPS at my proggie with windowed mode, but I can''t use texture masking in ortho mode to draw a crosshair. The program crashes when binding the mask texture before the crosshair texture. If I swith to #1 I can bind the two textures (mask, and crosshair), but the FPS drops down to less than 10 at windowed mode. At fullscreen mode the performance is the same with the two PixelFormats, but I still cannot bind the mask with #2. Also, the graphics quality is the same in both PixelFormats. Why this? Anyone who could help me? I just can''t understand all this PixelFormatDescriptor paramethers. Thank you mates! See you. P.S.: Sorry about any English errors!
ChacaL
ChacaL
Ok, but I''m still not undertanding what makes the #2 reach 40 FPS at Window and crash when trying to bind the mask texture.

Any ideas?

Thank you!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.