It seems like a trivial question but it's been bugging me for a while now..
I have a texture that is 256x64 (CLUT8) and I would like to have it on a
2D Face (Sprite) that is from 0,0 to 256,272.. It should be repeated instead of strechted..
I am using:
Code: Select all
struct Vertex* logo_bg = (struct Vertex*)sceGuGetMemory(2* sizeof(struct Vertex));
sceGuEnable(GU_TEXTURE_2D);
sceGuDisable(GU_BLEND);
sceGuClutMode(GU_PSM_8888,0,0xff,0); // 32-bit palette
sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB);
sceGuTexMode(GU_PSM_T8,0,0,GU_FALSE);
sceGuTexWrap(GU_REPEAT, GU_REPEAT);
sceGuClutLoad((256/8),bg_pal);
sceGuTexImage(0,256,64,256,bg_texture);
logo_bg[0].u = 0;
logo_bg[0].v = 0;
logo_bg[1].u = 256;
logo_bg[1].v = 64;
logo_bg[0].x = 300;
logo_bg[0].y = 0;
logo_bg[1].x = logo_bg[0].x+256;
logo_bg[1].y = logo_bg[0].y+196;
sceGuDrawArray GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,logo_bg);
Any thoughts?
r.