OGL initialization not correct?

Started by
10 comments, last by Caesar 22 years, 1 month ago
wanna show us your SetupPixelFormat function?
Advertisement
with that glFlush, just an language mistake (see to code below).

setpixel func:


  int vgSetupPixelFormat(HDC hDC){	int pixel_format;	static PIXELFORMATDESCRIPTOR pfd = {                sizeof(PIXELFORMATDESCRIPTOR),  // Size of this structure                1,                              // Version of this                                                //    structure                PFD_DRAW_TO_WINDOW |            // Draw to window                                                  //  (not bitmap)                PFD_SUPPORT_OPENGL |            // Support OpenGL calls                PFD_DOUBLEBUFFER,               // Double-buffered mode                PFD_TYPE_RGBA,                  // RGBA Color mode                32,                             // Want 24bit color                0,0,0,0,0,0,                    // Not used to select mode                0,0,                            // Not used to select mode                0,0,0,0,0,                      // Not used to select mode                32,                             // Size of depth buffer                0,                              // Not used to select mode                0,                              // Not used to select mode                PFD_MAIN_PLANE,                 // Draw in main plane                0,                              // Not used to select mode                0,0,0 };                   // Not used to select mode	pixel_format=ChoosePixelFormat(hDC, &pfd);	SetPixelFormat(hDC,pixel_format, &pfd);	return pixel_format;}  


it draw the things now, just need to rewrite the WM_SIZE handling code...

Thanks in advance

This topic is closed to new replies.

Advertisement