1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-05 07:45:59 +02:00

SDL/OGL platform improvements

This commit is contained in:
Brian Fiete 2022-11-03 10:58:24 -07:00
parent 213aea8c82
commit 258a6653f9
16 changed files with 711 additions and 1141 deletions

View file

@ -15,6 +15,7 @@ enum
class ImageData
{
public:
int mRefCount;
int mX;
int mY;
int mWidth;
@ -26,23 +27,25 @@ public:
uint8* mSrcData;
int mSrcDataLen;
bool mKeepSrcDataValid;
bool mOwnsSrcData;
bool mOwnsSrcData;
bool mWantsAlphaPremultiplied;
bool mAlphaPremultiplied;
bool mIsAdditive;
public:
bool mIsAdditive;
public:
ImageData();
virtual ~ImageData();
void AddRef();
void Deref();
void SwapRAndB();
void CreateNew(int x, int y, int width, int height, bool clear = true);
void CreateNew(int width, int height, bool clear = true);
void CopyFrom(ImageData* img, int x, int y);
void Fill(uint32 color);
virtual ImageData* Duplicate();
void SetSrcData(uint8* data, int dataLen);
void SetSrcData(uint8* data, int dataLen);
virtual bool LoadFromMemory(void* ptr, int size);
virtual bool LoadFromFile(const StringImpl& path);
virtual bool ReadData() { return false; }