what is a display list?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Stellar
Posts: 48
Joined: Mon Dec 12, 2005 9:13 am

what is a display list?

Post by Stellar »

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.
Image
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

__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
User avatar
Stellar
Posts: 48
Joined: Mon Dec 12, 2005 9:13 am

Post by Stellar »

thx Drakonite, i did got more detailed explanation for byte alignment here but im still drawing a blank about the psp display list?
Image
ufoz
Posts: 86
Joined: Thu Nov 10, 2005 2:36 am
Location: Tokyo
Contact:

Post by ufoz »

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.
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

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?).
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

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
Post Reply