Rectangle keeps flashing in window

Started by
1 comment, last by scott8 7 months ago

I am trying to make a flappy bird clone using xlib and I have an XSendEvent inside a function and that function is inside a while loop i am thinking that that is the issue so is there a better way to update the screen? I just need it to stop flashing.

its the rectangle i am drawing on screen line 62

I Know I am drawing every Frame but I am not sure about how else to go about it. Any Great Code Examples Would be great and any Code Examples for Double Buffering would be great even if its on other websites.

here is my code - https://paste.myst.rs/u6ykgg7v

None

Advertisement

@1negroup Is the whole screen flashing? I'm not familiar with xlib, but problems with flashing/flickering make me think you're not using double buffering or if you are using DB, you have an erase screen flag set as true when it should be false.

This topic is closed to new replies.

Advertisement