Jump to content
  • Advertisement
Sign in to follow this  
grasshop

OpenGL SwapBuffers issue

This topic is 2028 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys.

 

I'm using double buffering with the flags:

 

void EnableDrawing (HGLRC *hRC)
{
    PIXELFORMATDESCRIPTOR pfd;
    int iFormat;

    window_hDC = GetDC (hWnd);
    ZeroMemory (&pfd, sizeof (pfd));
    pfd.nSize = sizeof (pfd);
    pfd.nVersion = 1;
    pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
    pfd.iPixelType = PFD_TYPE_RGBA;
    pfd.cColorBits = 24;
    pfd.cDepthBits = 16;
    pfd.iLayerType = PFD_MAIN_PLANE;
    iFormat = ChoosePixelFormat (enigma::window_hDC, &pfd);

    if (iFormat==0) { show_error("Total failure. Abort.",1); }

    SetPixelFormat (window_hDC, iFormat, &pfd);
    *hRC = wglCreateContext(window_hDC );
    wglMakeCurrent(window_hDC, *hRC );
}

Then I'm trying to use SwapBuffers(window_hDC); to update a rending scene at certain intervals, but there is a problem with it just switching between buffer images instead of keeping a solid image on the screen. So it winds up looking like this:

 

Qjd44TQ.png

 

Alternating between the two buffers instead of displaying a solid image.

 

Is this an issue caused by my card driver? Because I think this behaviour has actually changed, I never remember it doing this before - and I think I might have updated my driver at some point. In any case does anybody please know a way of possibly resolving or working around this? I need to keep a double buffer mechanism though.

 

Thanks for any help.

 

-

System Info:

http://pastebin.com/S2neAq4S

 

ps. I know this isn't directly OpenGL but I thought it fitted best here, please move it if it's in the wrong forum sorry.

Edited by grasshop

Share this post


Link to post
Share on other sites
Advertisement

Ok I've found out what changed on my system. It's because I turned off Vista Aero that this started to happen. Turning it back on it works properly. So what is it about Aero being off that makes it work differently?

 

EDIT: More specifically it is the "enable desktop composition" effect.

Edited by grasshop

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!