Clean up some common Image and Canvas code.

This commit is contained in:
Alex Szpakowski
2020-02-01 23:54:51 -04:00
parent 7684920f19
commit 6c447ab4f6
11 changed files with 140 additions and 201 deletions
-27
View File
@@ -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