im developing a programing called crazypaint and i need a cursor so you can see where you are when your not drawing. right now i tryed making a cursor with the blit code from shines pg.h and you have to refresh the screen so the cursor doesnt duplicate its self. which causes my picture to be erased before it can even draw 2 pixels. so... is there any way arround this drawing a cursor with out refreshing maybe some form of layers etc. this would be very helpful
thanks in advance
Cursor Without Refreshing the screen
-
- Posts: 22
- Joined: Sat Sep 10, 2005 6:45 am
Create a temporary buffer that is 512*4*272 (the absolute biggest back buffer you can have).
Draw directly to it. (access it just like VRAM)
Every frame, copy (memcpy) this buffer to VRAM, and then blit your cursor to VRAM.
Note: This is slow and horrible, but you'll understand it all instead of using magic. :)
Draw directly to it. (access it just like VRAM)
Every frame, copy (memcpy) this buffer to VRAM, and then blit your cursor to VRAM.
Note: This is slow and horrible, but you'll understand it all instead of using magic. :)