| View previous topic :: View next topic |
| Author |
Message |
Stellar

Joined: 12 Dec 2005 Posts: 48
|
Posted: Sat Jan 07, 2006 1:27 pm Post subject: what is a display list? |
|
|
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 |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Sat Jan 07, 2006 3:43 pm Post subject: |
|
|
__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 |
|
 |
Stellar

Joined: 12 Dec 2005 Posts: 48
|
Posted: Sun Jan 08, 2006 10:35 am Post subject: |
|
|
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 |
|
 |
ufoz
Joined: 10 Nov 2005 Posts: 86 Location: Tokyo
|
Posted: Sun Jan 08, 2006 1:05 pm Post subject: |
|
|
| 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 |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Tue Jan 10, 2006 10:49 am Post subject: |
|
|
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 |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Tue Jan 10, 2006 5:44 pm Post subject: |
|
|
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 |
|
 |
|