 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
AudioMonster
Joined: 07 Sep 2005 Posts: 37
|
Posted: Thu Sep 29, 2005 4:25 pm Post subject: Strange issue with triangle drawing |
|
|
I am drawing a simple triangle using the vertex :
struct Vertex2D
{
unsigned int color;
short x,y,z;
short _pad; // for padding, 32bits
};
rendering with :
sceGuDrawArray(GU_TRIANGLES,
GU_COLOR_8888 |
GU_VERTEX_16BIT |
GU_TRANSFORM_2D,
3,0,vertices);
If i am not explicitely initializing _pad with 0 then i have a very odd result ( the gouraud interpolation seems to fail too and do a crazy thing ).
What is the GU doing with that pad element ??? |
|
| Back to top |
|
 |
Saotome

Joined: 03 Apr 2004 Posts: 182
|
Posted: Thu Sep 29, 2005 9:52 pm Post subject: |
|
|
I'm not really sure, but most triangle issues, where triangles don't show up as expected, are actualy cache issues.
Like here for example.
And _pad is for padding, so that all elements of the array are 32bit aligned. _________________ infj |
|
| Back to top |
|
 |
|
|
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
|