Welcome! Log In Create A New Profile

Advanced

Multiple textures

Posted by mavakadachi 
Multiple textures
April 19, 2009 03:07AM
Can someone please please write an example of how to load multiple textures and polygons using different textures on screen at once? I looked at libwiisprite and it refills the texture and draws another polygon. i dont want to do that.
Re: Multiple textures
April 19, 2009 09:32PM
GX_LoadTexObj()

despite what the name suggest, that function doesn't actually load the texture into memory, just says what loaded texture you're using at some given time. So the way to use it is loading your textures into memory with some image library (such as pngu) create and init a GXTexObj for each and switch between them with GX_LoadTexObj() as needed.

Hope that helps
Re: Multiple textures
April 19, 2009 11:54PM
It doesnt, i remember trying that in an example and the code didnt work as i expected. Can you write a demo? in a few days if no one has done anything i'll write a (not working) demo to use as a base.
Re: Multiple textures
April 20, 2009 12:08PM
Write it yourself, look into multiple render targets with GX, the basic process is to create a texture, in some cases you have to create a surface and aquire the surface level description, then, you set the render target to the texture (and in some cases the surface which in turn writes to the texture).
Re: Multiple textures
April 20, 2009 01:23PM
Don't have time to write a demo right now, but you can see how it works in Revolution engine source. See REV_Process() and REV_Render() at REV.c to figure out how it works. if you have any doubt, I'll try to answer as fast as possible.
Re: Multiple textures
April 25, 2009 03:36PM
WiiPhlex like i said i tried and failed. I'll do some code soon now that i have my dev stuff up again.
Sorry, only registered users may post in this forum.

Click here to login