francis77

Black stripes flashing in OpenGL

Discussion created by francis77 on Sep 27, 2011
Latest reply on Oct 19, 2011 by francis77

When I run my program, I get black stripes flashing on the screen.  Can someone tell me what may be wrong ? 

If you need some code, tell me.  This is how I initialize my pixel format :

 

BOOL InitPixelFormatARB(HDC hDC, int iBPP, PIXELFORMATDESCRIPTOR *pfd)
{

    BOOL Result;
    int accumBits = 0;

    int iAttribs[17] = {
        WGL_DRAW_TO_WINDOW_ARB, GL_TRUE,
        WGL_ACCELERATION_ARB,   WGL_FULL_ACCELERATION_ARB,
        WGL_DOUBLE_BUFFER_ARB,  GL_TRUE,
        WGL_COLOR_BITS_ARB,     pfd->cColorBits,
        WGL_DEPTH_BITS_ARB,     pfd->cDepthBits,
        WGL_STENCIL_BITS_ARB,   pfd->cStencilBits,
        WGL_ACCUM_BITS_ARB,     accumBits
    };

    int formats[256];
    unsigned int nformats;
    wglChoosePixelFormatARB(hDC, iAttribs, NULL, sizeof(formats) / sizeof(int), formats, &nformats);
    Result = SetPixelFormat(hDC, formats[0], pfd);

 

    return Result;
}

 

 

Outcomes