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 

Strange issue with triangle drawing

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



Joined: 07 Sep 2005
Posts: 37

PostPosted: Thu Sep 29, 2005 4:25 pm    Post subject: Strange issue with triangle drawing Reply with quote

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
View user's profile Send private message Visit poster's website
Saotome



Joined: 03 Apr 2004
Posts: 182

PostPosted: Thu Sep 29, 2005 9:52 pm    Post subject: Reply with quote

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