mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Add double-precision versions of encode_sRGB_uchar
This commit is contained in:
parent
061e0c4862
commit
096d54de00
@ -153,3 +153,17 @@ encode_sRGB_uchar(const LColorf &color, xel &into, xelval &into_alpha) {
|
||||
into_alpha = (xelval) (color[3] * 255.f + 0.5f);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Double-precision versions of the above.
|
||||
*/
|
||||
INLINE void
|
||||
encode_sRGB_uchar(const LColord &color, xel &into) {
|
||||
return encode_sRGB_uchar(LCAST(float, color), into);
|
||||
}
|
||||
|
||||
INLINE void
|
||||
encode_sRGB_uchar(const LColord &color, xel &into, xelval &into_alpha) {
|
||||
return encode_sRGB_uchar(LCAST(float, color), into, into_alpha);
|
||||
}
|
||||
|
@ -46,6 +46,11 @@ EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColorf &from,
|
||||
EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColorf &from,
|
||||
xel &into, xelval &into_alpha);
|
||||
|
||||
EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColord &from,
|
||||
xel &into);
|
||||
EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColord &from,
|
||||
xel &into, xelval &into_alpha);
|
||||
|
||||
// Use these functions if you know that SSE2 support is available. Otherwise,
|
||||
// they will crash!
|
||||
#if defined(__SSE2__) || defined(__i386__) || defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)
|
||||
|
Loading…
x
Reference in New Issue
Block a user