 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Tue Jun 13, 2006 11:09 pm Post subject: Odd memory / render problem |
|
|
I have a mesh class, and if I have just one, it's fine. If I have two, then the memory looks fine (thanks to TyRaNiD for PSPLink!), but nothing gets rendered.
I thought I was out of RAM - odd as I have almost nothing else alloc'ed, but hey... But on checking, the memory is fine, and contains all valid data.
It's as though there's some memory corruption, but I can't see it when I look for it.
I've tried just alloc'ing some memory, and the same thing happens - e.g. memory looks ok, but nothing gets rendered.
Has anybody else had anything like this? |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Wed Jun 14, 2006 7:29 pm Post subject: |
|
|
Hmmm, I think I've got it - I call sceGuTexMode() when I call any texture. It seems fine to call it once, but no more... that right?
Also, I'm having a bit of a multi-texture issue.
I want to use 2 texture images, one for each sceGumDrawArray(), but only the last one called in sceGuTexImage() seems to be used...
e.g. | Code: |
unsigned short *image1 = SomeLoadImageFunction( fileName1 );
unsigned short *image2 = SomeLoadImageFunction( fileName2 );
sceGuStart( GU_DIRECT, renderList );
SomeTextureSetupCode( Use16bpp, nonSwizzeled );
sceGuTexImage( 0, width1, height1, bufferWidth1, image1 );
sceGumDrawArray( GU_TRINAGLE_FAN, GU_TEXTURE_16BIT | GU_NORMAL_16BIT | GU_VERTEX_16BIT | GU_TRANSFORM_3D, 4, 0, square );
sceGumTranslate( &vectorThatMovesItABitOverSoWeCanSeeBothSquares );
sceGuTexImage( 0, width2, height2, bufferWidth2, image2 );
sceGumDrawArray( GU_TRINAGLE_FAN, GU_TEXTURE_16BIT | GU_NORMAL_16BIT | GU_VERTEX_16BIT | GU_TRANSFORM_3D, 4, 0, square );
sceGuFinish();
| (hacked on this forum - not real code)
But it seems that when this gets rendered, the pipeline maps the texture onto the surface last thing, and uses the image memory pointed to last... so all textures are image2 - not displaying image1 AND image2.
Does this mean I can only ever have a single texture image in each cycle? Or am I doing something really weird? |
|
| 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
|