Use int instead of PixelFormatUsageFlags for isPixelFormatSupported.

This commit is contained in:
Miku AuahDark
2022-03-05 13:42:20 +08:00
parent 7b3e2182aa
commit 405e33a689
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -797,7 +797,7 @@ public:
/**
* Gets whether the specified pixel format usage is supported.
**/
virtual bool isPixelFormatSupported(PixelFormat format, PixelFormatUsageFlags usage, bool sRGB = false) = 0;
virtual bool isPixelFormatSupported(PixelFormat format, int usage, bool sRGB = false) = 0;
/**
* Gets the renderer used by love.graphics.
+1 -1
View File
@@ -110,7 +110,7 @@ public:
void setWireframe(bool enable) override;
PixelFormat getSizedFormat(PixelFormat format, bool rendertarget, bool readable) const override;
bool isPixelFormatSupported(PixelFormat format, PixelFormatUsageFlags usage, bool sRGB = false) override;
bool isPixelFormatSupported(PixelFormat format, int usage, bool sRGB = false) override;
Renderer getRenderer() const override;
bool usesGLSLES() const override;
RendererInfo getRendererInfo() const override;
+1 -1
View File
@@ -1778,7 +1778,7 @@ PixelFormat Graphics::getSizedFormat(PixelFormat format, bool /*rendertarget*/,
}
}
bool Graphics::isPixelFormatSupported(PixelFormat format, PixelFormatUsageFlags usage, bool sRGB)
bool Graphics::isPixelFormatSupported(PixelFormat format, int usage, bool sRGB)
{
bool rendertarget = (usage & PIXELFORMATUSAGEFLAGS_RENDERTARGET) != 0;
bool readable = (usage & PIXELFORMATUSAGEFLAGS_SAMPLE) != 0;
+1 -1
View File
@@ -1697,7 +1697,7 @@ PixelFormat Graphics::getSizedFormat(PixelFormat format, bool rendertarget, bool
}
}
bool Graphics::isPixelFormatSupported(PixelFormat format, PixelFormatUsageFlags usage, bool sRGB)
bool Graphics::isPixelFormatSupported(PixelFormat format, int usage, bool sRGB)
{
if (sRGB)
{
+1 -1
View File
@@ -106,7 +106,7 @@ public:
void setWireframe(bool enable) override;
PixelFormat getSizedFormat(PixelFormat format, bool rendertarget, bool readable) const override;
bool isPixelFormatSupported(PixelFormat format, PixelFormatUsageFlags usage, bool sRGB = false) override;
bool isPixelFormatSupported(PixelFormat format, int usage, bool sRGB = false) override;
Renderer getRenderer() const override;
bool usesGLSLES() const override;
RendererInfo getRendererInfo() const override;