mirror of
https://github.com/love2d/love.git
synced 2026-08-19 04:06:17 +02:00
Clean up some common Image and Canvas code.
This commit is contained in:
@@ -71,34 +71,10 @@ public:
|
||||
return fbo;
|
||||
}
|
||||
|
||||
static PixelFormat getSizedFormat(PixelFormat format);
|
||||
static bool isSupported();
|
||||
static bool isMultiFormatMultiCanvasSupported();
|
||||
static bool isFormatSupported(PixelFormat format, bool readable);
|
||||
static bool isFormatSupported(PixelFormat format);
|
||||
static void resetFormatSupport();
|
||||
|
||||
private:
|
||||
|
||||
struct SupportedFormat
|
||||
{
|
||||
bool readable = false;
|
||||
bool nonreadable = false;
|
||||
|
||||
bool get(bool getreadable)
|
||||
{
|
||||
return getreadable ? readable : nonreadable;
|
||||
}
|
||||
|
||||
void set(bool setreadable, bool val)
|
||||
{
|
||||
if (setreadable)
|
||||
readable = val;
|
||||
else
|
||||
nonreadable = val;
|
||||
}
|
||||
};
|
||||
|
||||
GLuint fbo;
|
||||
|
||||
GLuint texture;
|
||||
@@ -108,9 +84,6 @@ private:
|
||||
|
||||
int actualSamples;
|
||||
|
||||
static SupportedFormat supportedFormats[PIXELFORMAT_MAX_ENUM];
|
||||
static SupportedFormat checkedFormats[PIXELFORMAT_MAX_ENUM];
|
||||
|
||||
}; // Canvas
|
||||
|
||||
} // opengl
|
||||
|
||||
Reference in New Issue
Block a user