I have this function of my 2d on 3d engine:
Code: Select all
int Engine2D::Render2DLineOn3D(float x1, float y1, float x2, float y2, int color) {
lineVertex* DisplayVertices = (lineVertex*) sceGuGetMemory(2 * sizeof(lineVertex));
sceGuColor(1);
DisplayVertices[0].x = x1;
DisplayVertices[0].y = y1;
DisplayVertices[0].z = 0;
DisplayVertices[1].x = x2;
DisplayVertices[1].y = y2;
DisplayVertices[1].z = 0;
sceGuDrawArray(GU_LINES, GU_VERTEX_32BITF | GU_TRANSFORM_2D, 2, 0, DisplayVertices);
return 0;
}
Code: Select all
engine2d->Render2DLineOn3D(1.0f, 1.0f, 480.0f, 272.0f, 1);
what am i doing wrong ?
ohw wait here is the struct i use:
Code: Select all
typedef struct { float x, y, z; } lineVertex;
ps. I have searched the forum and found some similar problem however the solutions do not work with me :S