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
+3 -3
View File
@@ -36,10 +36,10 @@ Canvas *luax_checkcanvas(lua_State *L, int idx)
int w_Canvas_getFormat(lua_State *L)
{
Canvas *canvas = luax_checkcanvas(L, 1);
Canvas::Format format = canvas->getTextureFormat();
PixelFormat format = canvas->getPixelFormat();
const char *str;
if (!Canvas::getConstant(format, str))
return luaL_error(L, "Unknown Canvas format.");
if (!getConstant(format, str))
return luaL_error(L, "Unknown pixel format.");
lua_pushstring(L, str);
return 1;