Line primitives

To make it easy to get up and running and for debugging Reliquish provides a number of calls that draw individual line segments. The line segments are stored in an internal buffer in order to be able to draw many line segments with a single drawcall. It is therefore imprtant to call r_primitive_line_flush(); to flush the internal buffer. Since the internal buffer has a limited size any primitive line call may cause Relinquish to flush all lines. It is therefor important to have the same projection matrix bound both during line calls and flushing.

r_primitive_line_3d

void r_primitive_line_3d(float start_x, float start_y, float start_z, float end_x, float end_y, float end_z, float red, float green, float blue, float alpha);

Description: draws a monocolored 3D line from start to end. After calling any number of this of other r_primitive_line_... calls, a call to r_primitive_line_flush() is required

r_primitive_line_2d

void r_primitive_line_2d(float start_x, float start_y, float end_x, float end_y, float red, float green, float blue, float alpha);

Description: draws a monocolored 2D line from start to end. After calling any number of this of other r_primitive_line_... calls, a call to r_primitive_line_flush() is required

r_primitive_line_fade_3d

void r_primitive_line_fade_3d(float start_x, float start_y, float start_z, float end_x, float end_y, float end_z, float start_red, float start_green, float start_blue, float start_alpha, float end_red, float end_green, float end_blue, float end_alpha);

Description: draws a fading 3d line from start to end. After calling any number of this of other r_primitive_line_... calls, a call to r_primitive_line_flush() is required

r_primitive_line_fade_2d

void r_primitive_line_fade_2d(float start_x, float start_y, float end_x, float end_y, float start_red, float start_green, float start_blue, float start_alpha, float end_red, float end_green, float end_blue, float end_alphaa);

Description: draws a fading 2D line from start to end. After calling any number of this of other r_primitive_line_... calls, a call to r_primitive_line_flush() is required

r_primitive_line_flush

void r_primitive_line_flush();

Description: Flushed all r_primitive_line... calls that has not yet been drawn.

r_primitive_line_clear

void r_primitive_line_clear();

Description: Clears the internal line buffer but without drawing any of the lines. Since the size of the internal buffer is unknown the use of this function is discurraged.