Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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, as it keeps flashing and doesn't seem to be responding very well.

It's the rectangle I am drawing on screen line 62.

I know I am drawing every Frame but I am not sure 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 it's on other websites.

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

What I have tried:

I am not sure where to go. I am an xtream Noob but I did hear about Double Buffering. However, I am not exactly sure how to implement that.
Posted
Updated 6-Oct-23 9:21am
v3

1 solution

I did a bit of searching and there really wasn't very much to be found and what there was seemed to be at least ten years old. Anyway, after exhausting DDG I went to google and ran across something that looks promising : GitHub - Trying different approaches to Double Buffering in Pure X11 applications on Linux[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900