mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Add support for rgba4, rgb5a1, rgb565, and rgb10a2 ImageData formats. Also fix normalized 8 and 16 bit per component ImageData to round instead of floor (post-converted fixed point) fractional values in setPixel and mapPixel.
This commit is contained in:
@@ -44,6 +44,8 @@ union Pixel
|
||||
uint16 rgba16[4];
|
||||
half rgba16f[4];
|
||||
float rgba32f[4];
|
||||
uint16 packed16;
|
||||
uint32 packed32;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -114,6 +116,7 @@ public:
|
||||
size_t getPixelSize() const;
|
||||
|
||||
static bool validPixelFormat(PixelFormat format);
|
||||
static bool canPaste(PixelFormat src, PixelFormat dst);
|
||||
|
||||
static bool getConstant(const char *in, FormatHandler::EncodedFormat &out);
|
||||
static bool getConstant(FormatHandler::EncodedFormat in, const char *&out);
|
||||
|
||||
Reference in New Issue
Block a user