Basic documentation
[Low level drawing]

Here is a very little explanation on how to draw a textured or untextured object, assuming you already know about GU. Here is the skeleton of a very simple textured object and one untextured object.

void drawSomethingTextured(OSL_IMAGE *img)                              {
        //We'll work with vertices. Vertices represents a coordinate. Sprites have two coordinates, triangles have 3, quadliterals have 4.
        VERTEX_TYPE *vertices;

        //Set the image as the current texture
        oslSetTexture(img);

        vertices = (VERTEX_TYPE*)sceGuGetMemory(NUMBER_OF_VERTICES * sizeof(vertices[0]));

        vertices[0].something = ...;
        [...]

        sceGuDrawArray(PRIMITIVETYPE, VERTEX_DESCRIPTION | GU_TRANSFORM_2D, NUMBER_OF_VERTICES, 0, vertices);
}

void drawSomethingUntextured(OSL_IMAGE *img)                            {
        //We'll work with vertices. Vertices represents a coordinate. Sprites have two coordinates, triangles have 3, quadliterals have 4.
        VERTEX_TYPE *vertices;

        //No texturing
        oslDisableTexturing();

        vertices = (VERTEX_TYPE*)sceGuGetMemory(NUMBER_OF_VERTICES * sizeof(vertices[0]));

        vertices[0].something = ...;
        [...]

        sceGuDrawArray(PRIMITIVETYPE, VERTEX_DESCRIPTION | GU_TRANSFORM_2D, NUMBER_OF_VERTICES, 0, vertices);
}
As you see, it's very simple, if you're used to GU. If not, please read tutorials and examples from ps2dev.org.

Generated on Wed Feb 24 10:25:34 2010 by  doxygen 1.5.9