SDL Flickering

Post: #1
I have code refreshing at roughly 60frames per second (little bit more then that since floats arent perfect) and i notice some bad flickering SDL video has been inited with SDL_SWSURFACE | SDL_ANYFORMAT. I only call SDL_Flip() once per frame and i sleep directly after the line. (Then poll the SDL events). The windows version doesnt flicker at all. Did anyone else get that problem? i am on an intel mini using the curent CVS source (i dont know how to make a framework, so i directly include headers and libs with xcode).
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
Use OpenGL and manually turn on vsync.
Quote this message in a reply
Posts: 776
Joined: 2003.04
Post: #3
#include <OpenGL/OpenGL.h>
    // Call this once, after you have already have a valid OpenGL context.
    long swapInterval = 1;
    CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &swapInterval);
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  GLUT Flickering mikey 5 5,557 May 28, 2009 12:06 PM
Last Post: mikey
  SDL: Why is my sprite flickering? Snibril 10 8,320 Aug 27, 2003 07:11 PM
Last Post: belboz