Unify pixel format enums for ImageData, CompressedImageData, and Canvas into a single PixelFormat enum.

Replace love.graphics.getRawImageFormats and love.graphics.getCompressedImageFormats with love.graphics.getImageFormats.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-11-27 22:53:23 -04:00
parent cbba8c40a6
commit 0a3adc0839
50 changed files with 1042 additions and 1006 deletions
+11
View File
@@ -123,6 +123,13 @@ public:
}
};
struct TextureFormat
{
GLenum internalformat = 0;
GLenum externalformat = 0;
GLenum type = 0;
};
struct
{
std::vector<Matrix4> transform;
@@ -427,6 +434,10 @@ public:
static GLenum getGLBufferType(BufferType type);
static GLint getGLWrapMode(Texture::WrapMode wmode);
static TextureFormat convertPixelFormat(PixelFormat pixelformat, bool renderbuffer, bool &isSRGB);
static bool isPixelFormatSupported(PixelFormat pixelformat, bool rendertarget, bool isSRGB);
static bool hasTextureFilteringSupport(PixelFormat pixelformat);
static const char *errorString(GLenum errorcode);
static const char *framebufferStatusString(GLenum status);