| View previous topic :: View next topic |
| Author |
Message |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Thu Feb 09, 2006 9:24 pm Post subject: multiple textures with gu in 3d |
|
|
hi folks!
i am loading images from ms and hold it in memory;
it works fine with one texture for one or more geometries.
but what if i want more than one texture for two meshes?
sceGuTexImage sets the current texture, but i wasnt able to find out how to use this fct for two images (the order how i have to call all those functions)
the samples included all use only one texture... so...
i hope one of you knows
greets
lumo _________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Fri Feb 10, 2006 12:43 am Post subject: |
|
|
Just use sceGuTexImage to upload one texture and then draw every polygon that uses this texture. Then use sceGuTexImage to upload the next texture and draw everything with that texture, etc.
Therefore it's best to sort your polys by texture used rather than anything else. |
|
| Back to top |
|
 |
sandberg
Joined: 05 Oct 2005 Posts: 90 Location: Denmark
|
Posted: Fri Feb 10, 2006 12:48 am Post subject: |
|
|
Hi Lumo,
You just call sceGuTexImage with the texture you want to use, before drawing you objects. So call it with texture x and render object x, then call it with texture y and render object y, etc.. _________________ Br, Sandberg |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Fri Feb 10, 2006 1:02 am Post subject: |
|
|
humm...
i am currently doing those steps:
setup GU
load my mesh
create texture in vram
load another mesh
create texture for mesh2
put texture1 to vram
put texture2 to vram
enter the while-loop
set up matrices and clear screen
read keys, add light,
*
draw model1
*
draw model2
finish gu
end while
exit
well at * i tried to 'activate' the texture (of the right model)
[sceGuTexImage]
which ends in tuning my psp off.
when i put up the * outside of my while, its working but only with one texture -> i know what you mean but not exactly how.
greets
lumo _________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
|