I'm programming a 3D homebrew (my first 3D homebrew :p) and I wonder if it's possible to load and use more than one texture, can we used 3 , 4 or 5 texture ? (I'm using this class to load texture : http://www.psp-programming.com/code/dok ... rt-lesson5 ), and if it's possible how ?
Should I do this :
Code: Select all
texture1.LoadTGA("data/texture/intro.tga");
texture1.Swizzle();
texture2.LoadTGA("data/texture/intro.tga");
texture2.Swizzle();
//....some lines
sceGuEnable(GU_TEXTURE_2D);
sceGuTexMode(GU_PSM_8888, 0, 0, texture1.Swizzled());
sceGuTexMode(GU_PSM_8888, 0, 0, texture2.Swizzled());
sceGuTexFunc(GU_TFX_DECAL, GU_TCC_RGB);
sceGuTexFilter( GU_LINEAR, GU_LINEAR );
sceGuTexScale( 1.0f, 1.0f );
sceGuTexOffset( 0.0f, 0.0f );
Code: Select all
texture1.LoadTGA("data/texture/intro.tga");
texture1.Swizzle();
texture2.LoadTGA("data/texture/intro.tga");
texture2.Swizzle();
//....some lines
sceGuEnable(GU_TEXTURE_2D);
sceGuTexMode(GU_PSM_8888, 0, 0, texture1.Swizzled());
sceGuTexFunc(GU_TFX_DECAL, GU_TCC_RGB);
sceGuTexFilter( GU_LINEAR, GU_LINEAR );
sceGuTexScale( 1.0f, 1.0f );
sceGuTexOffset( 0.0f, 0.0f );
sceGuTexMode(GU_PSM_8888, 0, 0, texture2.Swizzled());
sceGuTexFunc(GU_TFX_DECAL, GU_TCC_RGB);
sceGuTexFilter( GU_LINEAR, GU_LINEAR );
sceGuTexScale( 1.0f, 1.0f );
sceGuTexOffset( 0.0f, 0.0f );
NB : Is it possible to load a 512 *512 tga ? Because it seems to bug when I try to blit the texture,whereas when I load the same image but in 256 *256 it works perfectly ?
Thanks again