GLTextures

A namespace that provides functions for creating OpenGL textures.

Project

GLCore

Include

GLTextures.h

Summary
A namespace that provides functions for creating OpenGL textures.
Creates an OpenGL texture from a wxImage object.
Reads a set of images from a file and uses them to create OpenGL textures.

Functions

BuildTexture

GLuint GL_EXPORT_SPEC BuildTexture(const wxImage &image, 
bool mipmap = false)

Creates an OpenGL texture from a wxImage object.

Parameters

imageA wxImage to convert to an OpenGL texture.
mipmapWhether the OpenGL texture should be created as a set of mipmaps.

Returns

A GLuint that is the OpenGL texture ID of the created texture.

ReadGLTextures

void GL_EXPORT_SPEC ReadGLTextures(const wxInt32 size, 
GLuint *pList, 
const wxString &filename, 
const bool mipmap = false)

Reads a set of images from a file and uses them to create OpenGL textures.  Calls BuildTexture for each image read from the file.

Parameters

sizeThe number of images to be read from the file.
pListThe array of GLuint texture values where the newly created OpenGL texture ids will be stored.
filenameThe path to the file used to load images.
mipmapWhether the OpenGL textures should be created as sets of mipmaps.
GLuint GL_EXPORT_SPEC BuildTexture(const wxImage &image, 
bool mipmap = false)
Creates an OpenGL texture from a wxImage object.
void GL_EXPORT_SPEC ReadGLTextures(const wxInt32 size, 
GLuint *pList, 
const wxString &filename, 
const bool mipmap = false)
Reads a set of images from a file and uses them to create OpenGL textures.