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 

texture matrix stack

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



Joined: 07 Aug 2005
Posts: 21

PostPosted: Sun Apr 02, 2006 7:49 am    Post subject: texture matrix stack Reply with quote

Hi, I'm trying to manipulate the texture matrix stack with the same steps I use in OpenGL:

ScePspFVector3 v; v.x = -0.5; v.y = 0; v.z = 0;
sceGumMatrixMode(GU_TEXTURE);
sceGumLoadIdentity();
sceGumTranslate(&v);

sceGumDrawArray ...

but this has no effect (texture is drawn at the same position as without the matrix change), what is missing ?
Back to top
View user's profile Send private message
starman2049



Joined: 19 Sep 2005
Posts: 75

PostPosted: Tue Apr 04, 2006 2:41 am    Post subject: Reply with quote

Not sure why this does not work for you. Might consider doing a sceKernelDcacheWritebackAll() in there, but thats just a blind guess. If all you are trying to do is offset texture coordiantes then try this (this is what I do to get textures scrolling across geometry:
Code:
sceGuTexOffset(sOffset, -tOffset);
Back to top
View user's profile Send private message
ufoz



Joined: 10 Nov 2005
Posts: 86
Location: Tokyo

PostPosted: Tue Apr 04, 2006 11:46 am    Post subject: Reply with quote

Don't you need to enable some state or mode to use the texture matrix? A quick look at gu.h suggests:

sceGuTexMapMode(GU_TEXTURE_MATRIX, ?, ?)
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
cadaver



Joined: 07 Aug 2005
Posts: 21

PostPosted: Wed Apr 05, 2006 11:22 pm    Post subject: texture matrix stack Reply with quote

ufoz,

I think you are right, I must set the TexMapMode to GU_TEXTURE_MATRIX, but:
- when I leave the 2 other parameters 0, the texture matrix isn't correct
- seems I have to set something else (didn't find info, how to use the 2. and 3. parameter of sceGuTexMapMode)
Back to top
View user's profile Send private message
cadaver



Joined: 07 Aug 2005
Posts: 21

PostPosted: Mon Dec 11, 2006 5:07 am    Post subject: Reply with quote

Is anyone working with the gum texture matrix stack?

Manipulating texture coordinates with sceGuTexOffset is ok, but I couldn't get the texture matrix stack to work (see first post)
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