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 

scegumdrawarray parameters

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



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Tue Jan 24, 2006 10:29 pm    Post subject: scegumdrawarray parameters Reply with quote

my current code got
Quote:
color, x,y,z

so the parameters are:
Code:
GU_INDEX_16BIT|GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D


the next step is:
Quote:
nx, ny,nz, color, x,y,z

so the parameters should be:
Code:
GU_INDEX_16BIT|GU_NORMAL_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D


followed by:
Quote:
u,v,nx, ny,nz, color, x,y,z

Code:
GU_INDEX_16BIT|GU_UV|GU_NORMAL_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D


note:
the struct (code for the last one) is this:

Code:
class Vertex3dbV4 {
public:
   float u, v; // UV-texture
   float nx,ny,nz; // normals
   unsigned int color;// AABBGGRR
   float x,y,z;
};


is that correct?
cause something must be wrong...
loads the model correct, but puts random colors to the mesh, no shading..
greets
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
ufoz



Joined: 10 Nov 2005
Posts: 86
Location: Tokyo

PostPosted: Wed Jan 25, 2006 12:20 am    Post subject: Reply with quote

You're looking for GU_TEXTURE_32BITF.
GU_UV is used elsewhere.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Wed Jan 25, 2006 12:27 am    Post subject: Reply with quote

thanks,
but the rest with the normals is correct?
weird, works without normals
but fucks totally up when using em...
greets
lumo

PS: only normals are added in class and in scegumdrawarray-parameter
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
weak



Joined: 13 Jan 2005
Posts: 114
Location: Vienna, Austria

PostPosted: Wed Jan 25, 2006 12:35 am    Post subject: Reply with quote

maybe take a look at the wiki

Quote:

Vertex components are always in the order:

1. texture
2. weights
3. color
4. normal
5. vertex


or at the documentation:
Quote:

Vertex order: [for vertices(1-8)] [texture uv] [weights (0-8)] [color] [normal] [vertex] [/for]
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Wed Jan 25, 2006 2:27 am    Post subject: Reply with quote

thanks weak! its working now....
just swapped the two lines in the class....

greets
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
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