This section provides basic guidance on drawing textured and untextured objects, assuming some familiarity with GU (Graphics Utility).
Here's a basic example of drawing a textured object and an untextured object:
VERTEX_TYPE *vertices;
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) {
VERTEX_TYPE *vertices;
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);
}
#define oslDisableTexturing()
Definition drawing.h:3230
void oslSetTexture(OSL_IMAGE *img)
Defines the current texture for low-level image drawing.
Structure representing an image loaded in memory.
Definition drawing.h:929
As you can see, drawing with GU is straightforward if you are familiar with it. For those new to GU, it is recommended to review the samples of the PSP SDK (https://github.com/pspdev/pspsdk) for a deeper understanding.