All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utils.h File Reference
+ Include dependency graph for utils.h:

Go to the source code of this file.

Functions

int GlfGetNumElements (GLenum format)
 Number of elements. More...
 
int GlfGetElementSize (GLenum type)
 Byte size of a GL type. More...
 
bool GlfCheckGLFrameBufferStatus (GLuint target, std::string *reason)
 Checks the valitidy of a GL framebuffer. More...
 
bool GlfIsCompressedFormat (GLenum format)
 Check if the format is compressed. More...
 
size_t GlfGetCompressedTextureSize (int width, int height, GLenum format, GLenum type)
 Calculate the byte size of compressed textures. More...
 

Function Documentation

bool GlfCheckGLFrameBufferStatus ( GLuint  target,
std::string *  reason 
)

Checks the valitidy of a GL framebuffer.

True if the currently bound GL framebuffer is valid and can be bound or returns the cause of the problem

size_t GlfGetCompressedTextureSize ( int  width,
int  height,
GLenum  format,
GLenum  type 
)

Calculate the byte size of compressed textures.

Supported OGL compressed formats : GL_COMPRESSED_RGBA_BPTC_UNORM, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT

int GlfGetElementSize ( GLenum  type)

Byte size of a GL type.

Returns the size in bytes of a give GL type.

Supported types are : GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_FLOAT, GL_DOUBLE

int GlfGetNumElements ( GLenum  format)

Number of elements.

Returns the number of elements (channels) in a given GL enum format.

Supported formats are : GL_DEPTH_COMPONENT, GL_COLOR_INDEX, GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA

bool GlfIsCompressedFormat ( GLenum  format)

Check if the format is compressed.

Supported OGL compressed formats : GL_COMPRESSED_RGBA_BPTC_UNORM, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT