X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fdatatype.h;fp=source%2Fcore%2Fdatatype.h;h=a343e8cf2be517399130f8f40fe0f57f644cbb00;hp=2d783f6142cdc1dadfb0e8acb5411ddaa41c4221;hb=efb45a6851563cdb8077b6aad3ab92d4006d8790;hpb=4fb346536bfefd612635a248f558b1f1471deae6 diff --git a/source/core/datatype.h b/source/core/datatype.h index 2d783f61..a343e8cf 100644 --- a/source/core/datatype.h +++ b/source/core/datatype.h @@ -2,24 +2,26 @@ #define MSP_GL_DATATYPE_H_ #include "gl.h" -#include namespace Msp { namespace GL { enum DataType { - BYTE = GL_BYTE, - UNSIGNED_BYTE = GL_UNSIGNED_BYTE, - SHORT = GL_SHORT, - UNSIGNED_SHORT = GL_UNSIGNED_SHORT, - INT = GL_INT, - UNSIGNED_INT = GL_UNSIGNED_INT, - FLOAT = GL_FLOAT, - HALF_FLOAT = GL_HALF_FLOAT + BYTE = 0x101, + UNSIGNED_BYTE = 0x001, + SHORT = 0x102, + UNSIGNED_SHORT = 0x002, + INT = 0x104, + UNSIGNED_INT = 0x004, + FLOAT = 0x304, + HALF_FLOAT = 0x302 }; -unsigned get_type_size(DataType); +inline unsigned get_type_size(DataType t) +{ return t&0xFF; } + +GLenum get_gl_type(DataType); } // namespace GL } // namespace Msp