File libluminate/imlib2.c

RCS Header

This file uses Imlib2 to turn guchar arrays into Imlib images, render sets of triangles into those images, and send back the guchar arrays.


Included Files


Preprocessor definitions

#define ORBIT2 1

#define _REENTRANT 1

#define IMLIB2_EXISTS 1

#define __FUNCT__ "imlib2_render_triangles"


Global Function imlib2_render_triangles()

This simply takes a bunch of triangle vertex and color data and renders it into the "data" buffer in RGBA format using Imlib2.

int imlib2_render_triangles ( unsigned int* data, int width, int height, int num_triangles, int* triangle_coords, PetscScalar* triangle_colors, int color_skip, PetscScalar* triangle_shades, int shade_skip )

int imlib2_render_triangles
It returns zero or an error code.
unsigned int* data
 
int width
Width of the data buffer in pixels.
int height
Height of the data buffer in pixels.
int num_triangles
Number of triangles to render.
int* triangle_coords
Integer coordinates of the triangles.
PetscScalar* triangle_colors
R,G,B,A colors of the triangles between 0 and 1.
int color_skip
Number of PetscScalars to skip between color sets.
PetscScalar* triangle_shades
Shading of each triangle, zero for black to one for normal.
int shade_skip
Number of PetscScalars to skip between shades.
DATA32 *data The data buffer into which to render with 4 x width x height bytes.