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 

GU_TEXTURE_8BIT not working?

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



Joined: 01 Jan 2006
Posts: 7

PostPosted: Tue Jan 03, 2006 10:02 am    Post subject: GU_TEXTURE_8BIT not working? Reply with quote

Hi,

I can't get 8-bit texture coordinates to work at all. When I call:

Code:
sceGuDrawArray (pspPrimType, (GU_TEXTURE_8BIT | GU_COLOR_8888 | GU_VERTEX_16BIT | GU_TRANSFORM_3D), ...)


the results look like the vertex stride in hardware is wrong (vertices everywhere at runtime). I was using 16-bit texture coords (this works perfectly) which resulted in my vertex structure being:

Code:
int16 u, v;
uint32 color;
int16 x, y, z, pad;


I'm trying to get my vertex structure to be 32-bits smaller:

Code:
int8 u, v; //Requires GU_TEXTURE_8BIT
uint32 color;
int16 x, y, z; //No more padding!


But the hardware doesn't seem to like this. I'm hoping it's a problem with the SDK and not a hardware limitation. Does anyone have any idea why this format wouldn't work?

Thanks!
Back to top
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Tue Jan 03, 2006 10:10 am    Post subject: Reply with quote

I can't verify everything right now, but if you declare two 8-bit values followed by a 32-bit value, you'll could probably end up with 16 bits of padding between 'v' and 'color'. What happens if you drop color from a 32-bit value to 16-bit?
_________________
GE Dominator
Back to top
View user's profile Send private message
av



Joined: 01 Jan 2006
Posts: 7

PostPosted: Tue Jan 03, 2006 10:15 am    Post subject: Reply with quote

chp wrote:
What happens if you drop color from a 32-bit value to 16-bit?

Same thing. I tried changing the color to 4444 (and added a 16-bit pad to the end of the position) but had the same result. I also tried setting all values to 0 for every vertex except for the xyz position...same results, vertices everywhere.

That's why I think it's an internal stride calculation issue. When I set everything to 0 except for the xyz position and the vertices still end up everywhere, that screams bad stride to me.

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