3 This file is part of gldbg
4 Copyright © 2010-2011 Mikko Rasa, Mikkosoft Productions
5 Distributed under the GPL
10 int typesize(GLenum type)
14 case GL_BYTE: return sizeof(GLbyte);
15 case GL_SHORT: return sizeof(GLshort);
16 case GL_INT: return sizeof(GLint);
17 case GL_UNSIGNED_BYTE: return sizeof(GLubyte);
18 case GL_UNSIGNED_SHORT: return sizeof(GLushort);
19 case GL_UNSIGNED_INT: return sizeof(GLuint);
20 case GL_FLOAT: return sizeof(GLfloat);
21 // Short and byte packed types are broken
26 int formatsize(GLenum format)
30 case GL_STENCIL_INDEX: return 1;
31 case GL_DEPTH_COMPONENT: return 1;
32 case GL_ALPHA: return 1;
33 case GL_RGB: return 3;
34 case GL_RGBA: return 4;
35 case GL_LUMINANCE: return 1;
36 case GL_LUMINANCE_ALPHA: return 2;
41 int paramsize(GLenum pname)
45 case GL_VIEWPORT: return 4;
48 case GL_TEXTURE_WRAP_S: return 1;
49 case GL_TEXTURE_WRAP_T: return 1;
50 case GL_TEXTURE_MIN_FILTER: return 1;
51 case GL_TEXTURE_MAG_FILTER: return 1;
57 int buffersize(GLenum buffer)