rjDrawTextureHEx - shaddatic/sa2b-render-fix GitHub Wiki

Prototype

void rjDrawTextureHEx( const NJS_TEXTUREH_VTX* polygon, Int count, Int flag )

API

void (*DrawTextureHEx)( const NJS_TEXTUREH_VTX* polygon, Int count, Int flag )

Ninja

void njDrawTextureHEx( NJS_TEXTUREH_VTX* polygon, Int count, Int flag )

Parameters

const NJS_TEXTUREH_VTX* polygon

 polygon vertex list, of length count

Int count

 Length of vertex list

Int trans

 Use translucency (TRUE/FALSE)

Returns

No return value.

Description

Draw a textured polygon with 'n' vertexes in hardware units with a highlight color.

The vertex list is in triangle strip format.

Example

This example will draw a 64x64, opaque, multi-colored polygon in the center of the screen at half depth. It will use a texture index 0 of a defined texlist and will have a white highlight color on it's right edge.

#define NUM_VTX 4
#define NUM_TEX 0

// set vertex list
NJS_TEXTUREH_VTX poly[NUM_VTX] = 
{
    // x,    y,     z,    u,   v,   col (ARGB), off (XRGB)
    { 288.f, 208.f, 0.5f, 0.f, 0,f, 0xFFFFFFFF, 0xFF000000 }, // top left, white
    { 288.f, 272.f, 0.5f, 0.f, 1,f, 0xFFFF0000, 0xFF000000 }, // bottom left, red
    { 352.f, 208.f, 0.5f, 1.f, 0,f, 0xFF00FF00, 0xFFFFFFFF }, // top right, green
    { 352.f, 272.f, 0.5f, 1.f, 1,f, 0xFF0000FF, 0xFFFFFFFF }, // bottom right, blue
};

// set the texture
rjSetTexture( &texlist );
rjSetTextureNum( NUM_TEX );

// draw polygon
rjDrawTextureHEx( poly, NUM_VTX, FALSE ); // <<<<<<<<

Related Functions

History

  • 1.5.0.0:
    • Introduced to the 'Ninja Draw' API module