| View previous topic :: View next topic |
| Author |
Message |
cadaver
Joined: 07 Aug 2005 Posts: 21
|
Posted: Sun Apr 02, 2006 7:49 am Post subject: texture matrix stack |
|
|
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 |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Tue Apr 04, 2006 2:41 am Post subject: |
|
|
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 |
|
 |
ufoz
Joined: 10 Nov 2005 Posts: 86 Location: Tokyo
|
Posted: Tue Apr 04, 2006 11:46 am Post subject: |
|
|
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 |
|
 |
cadaver
Joined: 07 Aug 2005 Posts: 21
|
Posted: Wed Apr 05, 2006 11:22 pm Post subject: texture matrix stack |
|
|
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 |
|
 |
cadaver
Joined: 07 Aug 2005 Posts: 21
|
Posted: Mon Dec 11, 2006 5:07 am Post subject: |
|
|
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 |
|
 |
|