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 

what is a display list?

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



Joined: 12 Dec 2005
Posts: 48

PostPosted: Sat Jan 07, 2006 1:27 pm    Post subject: what is a display list? Reply with quote

considering sceGuStart(GU_DIRECT, disp_list); what is a display list?

________________________________________________________
finally, i have one more question...


Im very new to psp development, so ive never used these two macros that are used everywhere in the examples. Im assuming that they're pretty important, but im not sure why?

typedef struct
{
float x,y,z;
float u, v;
unsigned int color;
} Vertex;

So what makes this

Vertex __attribute__((aligned(16))) aligned_vtx;

different from this

Vertex vertice;
________________________________________________________

as a quick study, i did a sizeof comparison, ( wasnt sure of the sizeof's in a psp environment ).

sizeof( float ) = 4 bytes
sizeof( unsigned int ) = 4 bytes
sizeof( Vertex ) = 24 bytes
sizeof( aligned_vtx) = 24 bytes;


thx again,
sorry for the noobish questions, but we all gotta start somewhere :/
_________________


Last edited by Stellar on Sun Jan 08, 2006 10:36 am; edited 2 times in total
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Sat Jan 07, 2006 3:43 pm    Post subject: Reply with quote

__attribute__((aligned(16))) is used to, surprisingly enough, cause variables to be aligned on at least a certain boundry. In other words, that particular piece of code is making sure it's aligned to at least a 16byte boundry.

Why? Well, the hardware needs certain things to be aligned by certain amounts.
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
Stellar



Joined: 12 Dec 2005
Posts: 48

PostPosted: Sun Jan 08, 2006 10:35 am    Post subject: Reply with quote

thx Drakonite, i did got more detailed explanation for byte alignment here but im still drawing a blank about the psp display list?
_________________
Back to top
View user's profile Send private message
ufoz



Joined: 10 Nov 2005
Posts: 86
Location: Tokyo

PostPosted: Sun Jan 08, 2006 1:05 pm    Post subject: Reply with quote

It's just an area in memory that stores commands for the 3D hardware. When you're issuing rendering commands you're basically filling this buffer with various commands and parameters, then telling the GU to execute it all. I suppose it's actually more complicated than that but that's basically it.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Tue Jan 10, 2006 10:49 am    Post subject: Reply with quote

The interesting thing about display lists is that you can keep them around and use them over and over. So, for example, you can have a display list with all the commands to draw your main character, etc.

Lists can also call other lists too (though with a fairly shallow stack: 2 or 4 levels?).
Back to top
View user's profile Send private message Visit poster's website
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Tue Jan 10, 2006 5:44 pm    Post subject: Reply with quote

I would suspect at most 2 levels of stack, first from the PS2 heritage (ASR0/ASR1), and second that it wouldn't make sense to have more than 2 levels of calls. I don't have my PSP to test this with though, but it shouldn't be too hard to throw together a small test probably. :)
_________________
GE Dominator
Back to top
View user's profile Send private message
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