mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
Work around gcc compiler shortcoming
This commit is contained in:
parent
500da29013
commit
8360ad442a
@ -18,7 +18,7 @@
|
|||||||
// Description: Decodes the sRGB-encoded unsigned char value to
|
// Description: Decodes the sRGB-encoded unsigned char value to
|
||||||
// a linearized float in the range 0-1.
|
// a linearized float in the range 0-1.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
CONSTEXPR float decode_sRGB_float(unsigned char val) {
|
INLINE float decode_sRGB_float(unsigned char val) {
|
||||||
return to_linear_float_table[val];
|
return to_linear_float_table[val];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ INLINE float decode_sRGB_float(float val) {
|
|||||||
// Description: Decodes the sRGB-encoded unsigned char value to
|
// Description: Decodes the sRGB-encoded unsigned char value to
|
||||||
// a linearized unsigned char value.
|
// a linearized unsigned char value.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
CONSTEXPR unsigned char decode_sRGB_uchar(unsigned char val) {
|
INLINE unsigned char decode_sRGB_uchar(unsigned char val) {
|
||||||
return to_linear_uchar_table[val];
|
return to_linear_uchar_table[val];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ encode_sRGB_float(float val) {
|
|||||||
// Description: Encodes the linearized unsigned char value to an
|
// Description: Encodes the linearized unsigned char value to an
|
||||||
// sRGB-encoded unsigned char value.
|
// sRGB-encoded unsigned char value.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
CONSTEXPR unsigned char
|
INLINE unsigned char
|
||||||
encode_sRGB_uchar(unsigned char val) {
|
encode_sRGB_uchar(unsigned char val) {
|
||||||
return to_srgb8_table[val];
|
return to_srgb8_table[val];
|
||||||
}
|
}
|
||||||
|
@ -26,14 +26,14 @@ extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_srgb8_table[256]
|
|||||||
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_linear_uchar_table[256];
|
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_linear_uchar_table[256];
|
||||||
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const float to_linear_float_table[256];
|
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const float to_linear_float_table[256];
|
||||||
|
|
||||||
EXPCL_PANDA_PNMIMAGE CONSTEXPR float decode_sRGB_float(unsigned char val);
|
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(unsigned char val);
|
||||||
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(float val);
|
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(float val);
|
||||||
EXPCL_PANDA_PNMIMAGE CONSTEXPR unsigned char decode_sRGB_uchar(unsigned char val);
|
EXPCL_PANDA_PNMIMAGE INLINE unsigned char decode_sRGB_uchar(unsigned char val);
|
||||||
EXPCL_PANDA_PNMIMAGE INLINE unsigned char decode_sRGB_uchar(float val);
|
EXPCL_PANDA_PNMIMAGE INLINE unsigned char decode_sRGB_uchar(float val);
|
||||||
|
|
||||||
EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(unsigned char val);
|
EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(unsigned char val);
|
||||||
EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(float val);
|
EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(float val);
|
||||||
EXPCL_PANDA_PNMIMAGE CONSTEXPR unsigned char encode_sRGB_uchar(unsigned char val);
|
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(unsigned char val);
|
||||||
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(float val);
|
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(float val);
|
||||||
|
|
||||||
// These functions convert more than one component in one go,
|
// These functions convert more than one component in one go,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user