Add new mesh data formats: int32, uint32, [u]int8, [u]int16, snorm8, and snorm16.

Integer formats for vertex attributes are only supported in glsl3 shaders. They use ivec/uvec types in glsl.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2020-01-11 22:24:38 -04:00
parent 5c009d4bb9
commit 23bc1a7aae
9 changed files with 193 additions and 69 deletions
+13
View File
@@ -106,9 +106,21 @@ enum Usage
enum DataType
{
DATA_SNORM8,
DATA_UNORM8,
DATA_INT8,
DATA_UINT8,
DATA_SNORM16,
DATA_UNORM16,
DATA_INT16,
DATA_UINT16,
DATA_INT32,
DATA_UINT32,
DATA_FLOAT,
DATA_MAX_ENUM
};
@@ -296,6 +308,7 @@ inline CommonFormat getSinglePositionFormat(bool is2D)
size_t getIndexDataSize(IndexDataType type);
size_t getDataTypeSize(DataType datatype);
bool isDataTypeInteger(DataType datatype);
IndexDataType getIndexDataTypeFromMax(size_t maxvalue);