Graphics Reference
In-Depth Information
(continued)
Parameters:
vertShaderSrc vertex shader source code
fragShaderSrc fragment shader source code
Returns:
A new program object linked with the vertex/fragment shader pair;
0 on failure
char* ESUTIL_API esLoadTGA (char * fileName , int * width ,
int * height )
Loads an 8-bit, 24-bit, or 32-bit TGA image from a file.
Parameters:
filename name of the file on disk
width width of loaded image in pixels
height height of loaded image in pixels
Returns:
Pointer to loaded image; NULL on failure.
int ESUTIL_API esGenSphere (int numSlices, float radius,
GLfloat ** vertices, GLfloat ** normals,
GLfloat ** texCoords, GLuint ** indices )
Generates geometry for a sphere. Allocates memory for the vertex data
and stores the results in the arrays. Generates index list for a
GL_TRIANGLE_STRIP .
Parameters:
numSlices the number of vertical and horizontal slices in the sphere
vertices if not NULL , will contain array of float3 positions
normals if not NULL , will contain array of float3 normals
texCoords if not NULL , will contain array of float2 texCoords
indices if not NULL , will contain the array of indices for the
triangle strip
Returns:
The number of indices required for rendering the buffers (the number of
indices stored in the indices array if it is not NULL ) as a
GL_TRIANGLE_STRIP
 
 
Search WWH ::




Custom Search