rjDrawQuadTextureEx - shaddatic/sa2b-render-fix GitHub Wiki
Prototype
void rjDrawQuadTextureEx( const NJS_QUAD_TEXTURE_EX* q )
API
void (*DrawQuadTextureEx)( const NJS_QUAD_TEXTURE_EX* q )
Ninja
void njDrawQuadTextureEx( NJS_QUAD_TEXTURE_EX* q )
Parameters
const NJS_QUAD_TEXTURE_EX* q
Parallelogram quad texture structure
Returns
No return value.
Description
Draw a parallelogram quad texture in hardware units.
Example
This example will draw a 64x64, opaque, parallelogram quad texture in the center of the screen at half depth. It will use texture index of 0 in a defined texlist and will have a slight horizontal skew. Eg:
0 1
X 2
#define NUM_TEX 0
#define QUAD_COLOR 0xFFFFFFFF
// set vertex list
NJS_QUAD_TEXTURE_EX q =
{
// top left vertex
.x = 288.f + 1.f, // +1 to keep skew centered
.y = 208.f,
// depth
.z = 0.5f,
// top right vertex
.vx1 = 64.f,
.vy1 = 0.f,
// bottom right vertex
.vx2 = -2.f, // applies skew to quad
.vy2 = 64.f,
// top left texture
.u = 0.f,
.v = 0.f,
// top right texture
.vu1 = 1.f,
.vv1 = 0.f,
// bottom right texture
.vu1 = 0.f,
.vv1 = 1.f,
};
// set the texture list
rjSetTexture( &texlist );
// start draw, not translucent
rjQuadTextureStart( FALSE );
// set color + texture
rjSetQuadTexture( NUM_TEX, QUAD_COLOR );
// draw quad
rjDrawQuadTextureEx( &q ); // <<<<<<<<
// ... optionally draw more quads
// end draw
rjQuadTextureEnd();
Related Functions
- rjSetTexture() Set the current texlist
- rjQuadTextureStart() Start a quad texture draw list
- rjQuadTextureEnd() End, submit, and draw quad texture list
- rjSetQuadTexture() Set the quad texture and quad color
- rjSetQuadTextureG() Set the quad texture via GBIX and quad color
- rjSetQuadTextureH() Set the quad texture, quad color, and quad highlight color
- rjSetQuadTextureColor() Set the only the quad color
- rjSetQuadTextureHColor() Set the only the quad color and quad highlight color
- rjDrawQuadTexture() Draw a basic, rectangle quad texture
History
- 1.5.3.0:
- Introduced