Array textures can be easily drawn without a shader (resolves issue #1111).

Added love.graphics.drawLayer(texture, layerindex, …). ‘texture’ must be an array texture.
Added SpriteBatch:add/setLayer.

Added Quad:get/setLayer. This applies to array textures that are drawn without specifying an explicit layer index in the draw call.

Added love.graphics.newQuad variants which have layer arguments.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-02-26 17:11:22 -04:00
parent 9ba7234f14
commit 66b299822a
27 changed files with 559 additions and 295 deletions
+15
View File
@@ -97,8 +97,10 @@ enum class CommonFormat
XYf,
RGBAub,
XYf_STf,
XYf_STPf,
XYf_STf_RGBAub,
XYf_STus_RGBAub,
XYf_STPf_RGBAub,
};
struct XYf_STf
@@ -107,6 +109,12 @@ struct XYf_STf
float s, t;
};
struct XYf_STPf
{
float x, y;
float s, t, p;
};
struct XYf_STf_RGBAub
{
float x, y;
@@ -121,6 +129,13 @@ struct XYf_STus_RGBAub
Color color;
};
struct XYf_STPf_RGBAub
{
float x, y;
float s, t, p;
Color color;
};
size_t getFormatStride(CommonFormat format);
uint32 getFormatFlags(CommonFormat format);
size_t getIndexDataSize(IndexDataType type);