Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


SwapBuffers issue


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 grasshop   Members   -  Reputation: 120

Like
0Likes
Like

Posted 25 May 2013 - 02:39 PM

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, 26 May 2013 - 05:25 AM.


Sponsor:

#2 grasshop   Members   -  Reputation: 120

Like
0Likes
Like

Posted 27 May 2013 - 07:08 AM

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, 27 May 2013 - 09:30 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS