opengl: restructure code for computing format support.

This commit is contained in:
Alex Szpakowski
2022-04-23 13:15:58 -03:00
parent 28a64c2b29
commit ee336e5393
2 changed files with 77 additions and 82 deletions
+4 -2
View File
@@ -155,6 +155,8 @@ private:
void setDebug(bool enable);
uint32 computePixelFormatUsage(PixelFormat format, bool readable);
std::unordered_map<RenderTargets, GLuint, CachedFBOHasher> framebufferObjects;
bool windowHasStencil;
GLuint mainVAO;
@@ -170,8 +172,8 @@ private:
// Only needed for buffer types that can be bound to shaders.
StrongRef<love::graphics::Buffer> defaultBuffers[BUFFERUSAGE_MAX_ENUM];
// [rendertarget][readable][computewrite][srgb]
OptionalBool supportedFormats[PIXELFORMAT_MAX_ENUM][2][2][2][2];
// [non-readable, readable]
uint32 pixelFormatUsage[PIXELFORMAT_MAX_ENUM][2];
}; // Graphics