Results 1 to 6 of 6

Thread: Having Issues with black flickering?

  1. #1
    Member Contributor
    Join Date
    Oct 2011
    Posts
    67

    Having Issues with black flickering?

    When I run my game and SDL_GL_SwapBuffers(); every frame of mario sprite which you can see in this the hole video

    <object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/XjJWidr3pBY"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/XjJWidr3pBY" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"> </embed></object>

    the screen flickers black and I really need that to stop and I don't know how too keep redrawing the scene without it crashing the application because of a While Loop

    I have ideas to use another thread and put a while loop in there maybe that may stop the crashing but cause a crash because of too much of the same thing happening I don't know but I really need someone to help me out here please

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Karachi, Pakistan
    Posts
    810

    Re: Having Issues with black flickering?

    Seems like you are not using double buffering or you are clearing screen after drawing the background which removes it before Mario is rendered.

    Without any more info. I am afraid none of us can help you.
    Regards,
    Mobeen

  3. #3
    Member Contributor
    Join Date
    Oct 2011
    Posts
    67

    Re: Having Issues with black flickering?

    I'm using OpenGL 3.3 , SDL 1.2 I'm using SDL_GL_SwapBuffers(); to swap the buffers every frame of texture on the quad that's whats causing the flickering but if I remove that opengl doesn't update the animation every frame it doesn't show anything but If I use SDL_GL_SwapBuffers(); then it does the black flickering and shows the animation but the background textured quad goes black every swapbuffer

    what more information do you need

    SDL is used then after the titlescreen everything is done in opengl accept the textures themselfs which are image loaded into sdl surfaces and then through opengl there loaded onto quads.


  4. #4
    Member Contributor
    Join Date
    Oct 2011
    Posts
    67

    Re: Having Issues with black flickering?

    anyone?

  5. #5
    Senior Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    458

    Re: Having Issues with black flickering?

    From this and other topics you made, I highly suggest you to read some OpenGL tutorials. Nehe was and is very well known (http://nehe.gamedev.net/), but there are others, like the one Alfonse makes (AFAIK it only covers GL 3+).

  6. #6
    Member Contributor
    Join Date
    Oct 2011
    Posts
    67

    Re: Having Issues with black flickering?

    the book has to be read damit I really wish it didn't have to be the book reading ahh man oh well

Similar Threads

  1. Still flickering
    By art-ganseforth in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-04-2016, 12:25 AM
  2. some help regarding flickering
    By ankur bansal in forum OpenGL: Basic Coding
    Replies: 46
    Last Post: 01-23-2011, 06:33 PM
  3. These "Black screen" issues on ATI HD 4870....
    By nystep in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 11-23-2009, 09:26 AM
  4. flickering
    By stranimondi in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-17-2006, 11:41 PM
  5. Flickering OGL
    By M/\dm/\n in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 04-08-2003, 05:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean