 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Tue Jan 24, 2006 10:29 pm Post subject: scegumdrawarray parameters |
|
|
my current code got
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 |
|
 |
ufoz
Joined: 10 Nov 2005 Posts: 86 Location: Tokyo
|
Posted: Wed Jan 25, 2006 12:20 am Post subject: |
|
|
You're looking for GU_TEXTURE_32BITF.
GU_UV is used elsewhere. |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Wed Jan 25, 2006 12:27 am Post subject: |
|
|
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 |
|
 |
weak
Joined: 13 Jan 2005 Posts: 114 Location: Vienna, Austria
|
Posted: Wed Jan 25, 2006 12:35 am Post subject: |
|
|
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 |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Wed Jan 25, 2006 2:27 am Post subject: |
|
|
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 |
|
 |
|
|
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
|