ImageFormatToGL Function
ImagingOpenGL

Returns True if the given image format can be represented as GL texture format.

Pascal
function ImageFormatToGL(Format: TImageFormat; 
                         var GLFormat: GLenum; 
                         var GLType: GLenum; 
                         var GLInternal: GLint; 
                         const Caps: TGLTextureCaps): Boolean;
File

ImagingOpenGL (at line 81)

Description

GLFormat, GLType, and GLInternal are parameters for functions like glTexImage. Note that GLU functions like gluBuildMipmaps cannot handle some formats returned by this function (i.e. GL_UNSIGNED_SHORT_5_5_5_1 as GLType). If you are using compressed or floating-point images make sure that they are supported by hardware using GetGLTextureCaps, ImageFormatToGL does not check this.

Related Information
You are here: Symbol Reference > Functions > ImageFormatToGL Function