]> git.tdb.fi Git - libs/gl.git/blob - source/core/datatype.h
Decouple DataType from the OpenGL constants
[libs/gl.git] / source / core / datatype.h
1 #ifndef MSP_GL_DATATYPE_H_
2 #define MSP_GL_DATATYPE_H_
3
4 #include "gl.h"
5
6 namespace Msp {
7 namespace GL {
8
9 enum DataType
10 {
11         BYTE = 0x101,
12         UNSIGNED_BYTE = 0x001,
13         SHORT = 0x102,
14         UNSIGNED_SHORT = 0x002,
15         INT = 0x104,
16         UNSIGNED_INT = 0x004,
17         FLOAT = 0x304,
18         HALF_FLOAT = 0x302
19 };
20
21 inline unsigned get_type_size(DataType t)
22 { return t&0xFF; }
23
24 GLenum get_gl_type(DataType);
25
26 } // namespace GL
27 } // namespace Msp
28
29 #endif