From: Mikko Rasa Date: Sat, 13 Feb 2021 09:42:20 +0000 (+0200) Subject: Add some files which got forgotten in earlier commits X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=fdffcd69528931fb181d2a076bcf42bfabd0085f;p=libs%2Fgl.git Add some files which got forgotten in earlier commits --- diff --git a/extensions/arb_sampler_objects.glext b/extensions/arb_sampler_objects.glext new file mode 100644 index 00000000..67497988 --- /dev/null +++ b/extensions/arb_sampler_objects.glext @@ -0,0 +1 @@ +extension ARB_sampler_objects diff --git a/source/datatype.cpp b/source/datatype.cpp new file mode 100644 index 00000000..1def3ca3 --- /dev/null +++ b/source/datatype.cpp @@ -0,0 +1,26 @@ +#include +#include "datatype.h" + +using namespace std; + +namespace Msp { +namespace GL { + +unsigned get_type_size(DataType type) +{ + switch(type) + { + case BYTE: + case UNSIGNED_BYTE: return 1; + case SHORT: + case UNSIGNED_SHORT: + case HALF_FLOAT: return 2; + case INT: + case UNSIGNED_INT: + case FLOAT: return 4; + default: throw invalid_argument("get_type_size"); + } +} + +} // namespace GL +} // namespace Msp