mirror of
https://github.com/nothings/stb
synced 2024-12-16 12:52:34 +03:00
Fix stbr__type_size for updated stbr_type
This commit is contained in:
parent
45fa6ec900
commit
419a5ba10f
@ -105,6 +105,13 @@ typedef enum
|
||||
STBR_MAX_TYPES
|
||||
} stbr_type;
|
||||
|
||||
static unsigned char stbr__type_size[] = {
|
||||
1, // STBR_TYPE_UINT8
|
||||
2, // STBR_TYPE_UINT16
|
||||
4, // STBR_TYPE_UINT32
|
||||
4, // STBR_TYPE_FLOAT
|
||||
};
|
||||
|
||||
typedef unsigned char stbr_uint8;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@ -381,14 +388,6 @@ static unsigned char stbr__linear_uchar_to_srgb_uchar[256] = {
|
||||
251, 251, 252, 252, 253, 253, 254, 254, 255
|
||||
};
|
||||
|
||||
static unsigned char stbr__type_size[] = {
|
||||
0,
|
||||
1, // STBR_TYPE_UINT8
|
||||
2, // STBR_TYPE_UINT16
|
||||
4, // STBR_TYPE_UINT32
|
||||
4, // STBR_TYPE_FLOAT
|
||||
};
|
||||
|
||||
float stbr__srgb_to_linear(float f)
|
||||
{
|
||||
if (f <= 0.04045f)
|
||||
|
Loading…
Reference in New Issue
Block a user