SDL double buffering not working in Linux
For the life of me, I can't figure out how to get double buffering to work in Linux. I am using SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); before SDL_SetVideoMode, but double buffering doesn't seem to be on. If it do glClear(GL_COLOR_BUFFER_BIT) before rendering, I get terrible flicker (there's flicker anyway, but less noticeable without this). If I put a large empty loop after the clear, it will show the blank screen for a while before rendering for a split second and then goes back to the blank screen for the next frame, so that is the basis of my assumption that double buffering is not working.
Oh, and I'm using OpenGL.
Any tips? I don't particularly need glClear (I was just testing something), but the flicker needs to be fixed somehow.
Nevermind, I'm stupid. It was an "optimization" that was leading me to think that double buffering wasn't on (sometimes it wasn't drawing the screen, even when it was being cleared).
However, it's still tearing. I tried this:
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
But it doesn't seem to help.
However, it's still tearing. I tried this:
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
But it doesn't seem to help.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement