用了glDrawBuffer(GL_BACK);      
glPushMatrix(); 
glPopMatrix();     
SwapBuffers(dc.m_ps.hdc);  图形稍大,就闪得厉害。3X

解决方案 »

  1.   

    在pixelDesc设置中,不能添加参数PFD_SUPPORT_GDI。PIXELFORMATDESCRIPTOR pixelDesc=
    {
    sizeof(PIXELFORMATDESCRIPTOR),                               // size of this pfd
    1,                                                       // version number
    PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|                   // support window, support OpenGL, double buffered, RGBA type.
    PFD_DOUBLEBUFFER,
    //|PFD_SUPPORT_GDI,
    PFD_TYPE_RGBA,
    24,                                                      // 24-bit color depth
    0,0,0,0,0,0,                                             // color bits ignored
    0,                                                       // no alpha buffer 
    0,                                                       // shift bit ignored
    0,                                                       // no accumulation buffer
    0,0,0,0,                                                 // accum bits ignored
    32,                                                      // 32-bit z-buffer
    0,                                                       // no stencil buffer
    0,                                                       // no auxiliary buffer
    PFD_MAIN_PLANE,                                          // main layer    
    0,                                                       // reserved 
    0,0,0                                                    // layer masks ignored
    };