Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010
    Posts
    472

    SDL Displaying Menu - Flicker Disabler?

    I've run into a slight problem that occurs when moving through a menu. When you navigate the menu, it currently has to refresh all the menu options, though the only thing that really needs to be updated would be the text coloring, and occasionally the text itself.

    The problem that occurs is that it seems to 'flicker' when you move through the menu fast enough. Unfortunately, you don't have to be all that fast in order to see it occur.

    How it's set up is that I've re-used a single image and just placed it as many times as I needed buttons, and used TTF_Font structures to actually label each button.

    So! The bottom line is basically... how do you prevent a flickering menu?

    Thanks!
    "It's most impressive when it's least expected."

  2. #2
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    usually that kind of stuff is handled by double-buffering.
    if you do the it right, all drawing updates get applied to the backbuffer before presenting the next frame, so each update should be atomic on screen. flickering is really only a problem of immediate drawing apis like gdi.

    read the documentation on SDL_SetVideoMode (SDL_CreateRenderer in SDL 1.3) to learn about SDL's support for double buffering.

  3. #3
    Join Date
    Jul 2010
    Posts
    472
    Alrighty, thanks!

    Will take a look.
    "It's most impressive when it's least expected."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •