Skip to content

Instantly share code, notes, and snippets.

/// Takes a symbolic type constant and returns its size
/// Probably missing a few types but those were the most important
size_t get_sizeof_type(GLenum type)
{
switch(type)
{
case GL_BYTE:
case GL_UNSIGNED_BYTE:
return sizeof(GLbyte);
case GL_SHORT: