From 405e33a689ee0fd165a3ec689152399735fd75b2 Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Sat, 5 Mar 2022 13:42:20 +0800 Subject: [PATCH] Use int instead of PixelFormatUsageFlags for isPixelFormatSupported. --- src/modules/graphics/Graphics.h | 2 +- src/modules/graphics/metal/Graphics.h | 2 +- src/modules/graphics/metal/Graphics.mm | 2 +- src/modules/graphics/opengl/Graphics.cpp | 2 +- src/modules/graphics/opengl/Graphics.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index b00d959f1..4172ce7f4 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -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. diff --git a/src/modules/graphics/metal/Graphics.h b/src/modules/graphics/metal/Graphics.h index 7591cff12..124a7ccdf 100644 --- a/src/modules/graphics/metal/Graphics.h +++ b/src/modules/graphics/metal/Graphics.h @@ -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; diff --git a/src/modules/graphics/metal/Graphics.mm b/src/modules/graphics/metal/Graphics.mm index 7c1d97351..e377223ab 100644 --- a/src/modules/graphics/metal/Graphics.mm +++ b/src/modules/graphics/metal/Graphics.mm @@ -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; diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index ae9a23eb3..c9705d29e 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -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) { diff --git a/src/modules/graphics/opengl/Graphics.h b/src/modules/graphics/opengl/Graphics.h index b3d559bdd..9c65ce6fd 100644 --- a/src/modules/graphics/opengl/Graphics.h +++ b/src/modules/graphics/opengl/Graphics.h @@ -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;