Change the 'viewformats' texture setting field to be a list of pixel formats.

Replace Texture:hasViewFormats with Texture:getViewFormats.
This commit is contained in:
Sasha Szpakowski
2024-02-24 23:42:28 -04:00
parent 42812ad521
commit e20f018272
7 changed files with 96 additions and 32 deletions
+6 -3
View File
@@ -39,6 +39,7 @@
// C
#include <stddef.h>
#include <vector>
namespace love
{
@@ -195,7 +196,7 @@ public:
int msaa = 1;
bool renderTarget = false;
bool computeWrite = false;
bool viewFormats = false;
std::vector<PixelFormat> viewFormats;
OptionalBool readable;
std::string debugName;
};
@@ -279,7 +280,8 @@ public:
bool isRenderTarget() const { return renderTarget; }
bool isComputeWritable() const { return computeWrite; }
bool isReadable() const { return readable; }
bool hasViewFormats() const { return viewFormats; }
const std::vector<PixelFormat> &getViewFormats() const { return viewFormats; }
bool isCompressed() const;
bool isFormatLinear() const;
@@ -353,9 +355,10 @@ protected:
PixelFormat format;
bool renderTarget;
bool computeWrite;
bool viewFormats;
bool readable;
std::vector<PixelFormat> viewFormats;
MipmapsMode mipmapsMode;
int width;