0

Ok so I have this program and Im using 2 functions that both use "buffer" to move the images to the front screen. Well I used create_bitmap(800,600) to make the buffer, but im using that in both functions so, they both are diffrent buffers! So when I run the program it flashes back in forth between both, and I want it to use ONLY ONE BUFFER! So, I decided to make a global buffer. Well. It wont accpt. making a new bitmap as a global. Im stuck and I really need help! I want 2 functions that in no possible way can I make one to run off of one global buffer! Is there any way to make a global buffer, or make a buffer in the main be able to send out to all of my functions.

Thanks!

3
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by Dave Sinkula
0

Ok so I have this program and Im using 2 functions that both use "buffer" to move the images to the front screen. Well I used create_bitmap(800,600) to make the buffer, but im using that in both functions so, they both are diffrent buffers! So when I run the program it flashes back in forth between both, and I want it to use ONLY ONE BUFFER! So, I decided to make a global buffer. Well. It wont accpt. making a new bitmap as a global. Im stuck and I really need help! I want 2 functions that in no possible way can I make one to run off of one global buffer! Is there any way to make a global buffer, or make a buffer in the main be able to send out to all of my functions.

I'm not familiar with that function, but I'll assume it's this. If so, are you passing the pointer as a parameter to each function?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.