- 694 名前:名無しさん@お腹いっぱい。 mailto:sage [2009/06/13(土) 20:07:57 ID:oM/Z+T2p]
- uvには0か1を正しく入れないと貼ったテクスチャが崩れるのですが
描画方法が間違っているのでしょうか? struct Vertex* vertices = (struct Vertex*)sceGuGetMemory(6 * sizeof(struct Vertex)); vertices[0].u = 0; vertices[0].v = 0; vertices[1].u = 0; vertices[1].v = 1; vertices[2].u = 1; vertices[2].v = 0; vertices[3].u = 1; vertices[3].v = 1; vertices[4].u = 1; vertices[4].v = 0; vertices[5].u = 0; vertices[5].v = 1; vertices[0].x = 0-(dw/2); vertices[0].y = 0-(dw/2); vertices[0].color = color; vertices[1].x = 0-(dw/2); vertices[1].y = dw/2; vertices[0].color = color; vertices[2].x = dw/2; vertices[2].y = 0-(dw/2); vertices[0].color = color; vertices[3].x = dw/2; vertices[3].y = dw/2; vertices[0].color = color; vertices[4].x = dw/2; vertices[4].y = 0-(dw/2); vertices[0].color = color; vertices[5].x = 0-(dw/2); vertices[5].y = dw/2; vertices[0].color = color; sceGumMatrixMode(GU_PROJECTION); sceGumLoadIdentity(); sceGumOrtho(0, 480, 272, 0, -1, 1); sceGumMatrixMode(GU_VIEW); sceGumLoadIdentity(); sceGumMatrixMode(GU_MODEL); sceGumLoadIdentity(); { ScePspFVector3 pos ={dx,dy,0.0f}; sceGumTranslate(&pos) sceGumRotateZ(rot * 1.32f * (GU_PI/180.0f)); } sceGumDrawArray(GU_TRIANGLES,GU_TEXTURE_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,6,0,vertices); 長文すみません
|
|