OpenGL C Quick Reference

glEnable(GL_TEXTURE_1D);

If enabled, one-dimensional texturing is performed (unless two-dimensional texturing is also enabled).


glEnable(GL_TEXTURE_2D);

If enabled, two-dimensional texturing is performed.


glEnable (GL_TEXTURE_GEN_S);
glDisable (GL_TEXTURE_GEN_S);

Enable/disable automatic computation of the s texture coordinate by the texture generation function defined with glTexGen*().


glEnable (GL_TEXTURE_GEN_T);
glDisable (GL_TEXTURE_GEN_T);

Enable/disable automatic computation of the t texture coordinate by the texture generation function defined with glTexGen*().


glEnable(GL_TEXTURE_3D_EXT);

If enabled, three-dimensional texturing is performed (if the EXT_texture3D extension is supported).


void glBindTextureEXT (GLenum target, GLuint texname) 

Bind a named texture (texture object) to a texturing target.


void glDeleteTextures ( sizei n, uint *textures )

Delete named texture objects.


void glGenTexturesEXT (GLsize n, GLuint *texnames)

Generate texture object names.


void glPrioritizeTexturesEXT (GLsize n, const GLuint *texnames, 
const GLclampf *priorities) 

Set texture object residence priority.

void glTexCoord2fv( const GLfloat *v )

Set the current texture coordinates to the homogeneous coordinates (s, t, r, q) pointed to by v.


void glTexEnvf(GLenum target, GLenum pname, GLfloat param)
void glTexEnvi(GLenum target, GLenum pname, GLint param)
void glTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
void glTexEnviv(GLenum target, GLenum pname, GLint *params)

Set any of a number of texture environment parameters. See man glTexEnv(3G) for the full list of symbolic constants that can be used for the target and pname arguments.


void glTexGenfv (GLenum coord, GLenum pname, const GLfloat *params)

void glTexGeni (GLenum coord, GLenum pname, GLint param)

Control the generation of texture coordinates.


void glTexImage1D(GLenum target, GLint level, GLint internalformat, 
GLsizei width, GLint border, GLenum format, GLenum type, const 
GLvoid *pixels)

Specify a one-dimensional texture image.


void glTexImage2D(GLenum target, GLint level, GLint internalformat, 
GLsizei width, GLsizei height, GLint border, GLenum format, GLenum 
type, const GLvoid *pixels)

Specify a two-dimensional texture image.


void glTexImage3DEXT(GLenum target, GLint level, GLenum 
internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint 
border, GLenum format, GLenum type, const GLvoid *pixels)

Specify a three-dimensional texture image. Three-dimensional textures are available only if the EXT_texture3D extension is supported.


void glTexParameterf(GLenum target, GLenum pname, GLfloat param)
void glTexParameteri(GLenum target, GLenum pname, GLint param)
void glTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
void glTexParameteriv(GLenum target, GLenum pname, GLint *params)

Set any of a number of texture parameters. See man glTexParameter(3G) for the full list of symbolic constants that can be used for the target and pname arguments.