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 

Double Buffering

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



Joined: 16 Aug 2006
Posts: 7

PostPosted: Mon Aug 21, 2006 5:25 am    Post subject: Double Buffering Reply with quote

Hi everyone,

My question is simple : how do you do double buffering??

i see that with sceDisplayWaitVblankStart() i can refresh the sreen or something like that ... if you have more informations on it !!

So if you have a simple example on how i can do double buffering it would be great !!!

i have search but i don't find a such example !!

thank you in advance
Back to top
View user's profile Send private message
Aion



Joined: 24 Jul 2006
Posts: 40
Location: Montreal

PostPosted: Mon Aug 21, 2006 5:48 am    Post subject: Reply with quote

Look at "cube.c" example that comes with the Sdk.
Back to top
View user's profile Send private message
baallrog



Joined: 16 Aug 2006
Posts: 7

PostPosted: Mon Aug 21, 2006 9:25 am    Post subject: Reply with quote

i see that, but it's in 3D, i hope this work in 2D mode .

The "sprites.c" use the double buffering ??

thank you !!
Back to top
View user's profile Send private message
Aion



Joined: 24 Jul 2006
Posts: 40
Location: Montreal

PostPosted: Mon Aug 21, 2006 9:47 am    Post subject: Reply with quote

It's always double-buffered, no matter that you're only doing 2d blitting, or 3d, so yes, sprites.c is double-buffered.

The only way I can see not having doublebuffer would be to point the display/draw at the same memory location.
Back to top
View user's profile Send private message
baallrog



Joined: 16 Aug 2006
Posts: 7

PostPosted: Mon Aug 21, 2006 4:53 pm    Post subject: Reply with quote

i begin to code for the psp with this tutorials. And i think they're not double buffering ...
Even, they doesn't use the GU .

So now i have a project in mind (a little shoot game) i want more fcuntionnalities.

I have seen how i can do double duffering but there is always some thing obscur to me. Is there any tutorial about that? o some documentation who explain what function do thaht or that thing ??

thank you very much !!


ps : sceDisplayWaitVblankStart() is still very strange, what does this ???
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Mon Aug 21, 2006 5:58 pm    Post subject: Reply with quote

baallrog wrote:
i begin to code for the psp with this tutorials. And i think they're not double buffering ...
Even, they doesn't use the GU .

The sprite.c sdk sample uses both double buffering and the GU

Quote:

I have seen how i can do double duffering but there is always some thing obscur to me. Is there any tutorial about that? o some documentation who explain what function do thaht or that thing ??

thank you very much !!

I think you don't have the right impression of what doublebuffering actually is yet.
Doublebuffering just means you draw/render to one buffer in the background, while another one is being displayed, then when the backbuffer is completed, you switch both buffers. There's nothing more to it.

Quote:

ps : sceDisplayWaitVblankStart() is still very strange, what does this ???

It waits for the refresh of the LCD to happen before continuing execution. This is needed to avoid tearing artifacts when switching the buffers. Since the PSP LCD runs at 60Hz, it will at most delay 1/60s and make your program not run at more than 60fps.
_________________
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
Back to top
View user's profile Send private message Visit poster's website
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