forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cursor Without Refreshing the screen

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
elevationsnow



Joined: 10 Sep 2005
Posts: 22

PostPosted: Thu Sep 29, 2005 12:39 pm    Post subject: Cursor Without Refreshing the screen Reply with quote

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
Back to top
View user's profile Send private message
CyberBill



Joined: 26 Jul 2005
Posts: 86
Location: Redmond, WA

PostPosted: Thu Sep 29, 2005 12:53 pm    Post subject: Reply with quote

Dont draw directly to the back buffer. Draw to a texture that is blit to the screen, and then the cursor is blit on top of this.
Back to top
View user's profile Send private message AIM Address MSN Messenger
elevationsnow



Joined: 10 Sep 2005
Posts: 22

PostPosted: Thu Sep 29, 2005 1:10 pm    Post subject: Reply with quote

im kinda a newbie how would you do that?
cause right now im ploting pixels directly to the vram and then trying to blit a cursor over it
could you perhaps paste some sample code or atleast how to plot pixels to a texture
Back to top
View user's profile Send private message
CyberBill



Joined: 26 Jul 2005
Posts: 86
Location: Redmond, WA

PostPosted: Thu Sep 29, 2005 1:54 pm    Post subject: Reply with quote

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. :)
Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group