rjQuadTextureStart - shaddatic/sa2b-render-fix GitHub Wiki

Prototype

void rjQuadTextureStart( Sint32 trans )

API

void (*QuadTextureStart)( Sint32 trans )

Ninja

void njQuadTextureStart( Sint32 trans )

Parameters

Int trans

 Use translucency drawing (TRUE/FALSE)

Returns

No return value.

Description

Start a quad texture draw sequence.

Example

This example will draw a 64x64, opaque, rectangle quad texture in the center of the screen at half depth. It will use texture index of 0 in a defined texlist.

#define NUM_TEX 0
#define QUAD_COLOR 0xFFFFFFFF

// set vertex list
NJS_QUAD_TEXTURE q = 
{
    // top left vertex
    .x1 = 288.f,
    .y1 = 208.f,
   
    // bottom right vertex
    .x2 = 352.f,
    .y2 = 272.f,

    // top left texture
    .u1 = 0.f,
    .v1 = 0.f,

    // bottom right texture
    .u2 = 1.f,
    .v2 = 1.f,
};

// set the texture list
rjSetTexture( &texlist );

// start draw, not translucent
rjQuadTextureStart( FALSE ); // <<<<<<<<

// set color + texture
rjSetQuadTexture( NUM_TEX, QUAD_COLOR );

// draw quad
rjDrawQuadTexture( &q, 0.5f );

// end draw
rjQuadTextureEnd();

Related Functions

History