Auto-batched draws (except for love.graphics.print, for now) are affected by 3D transforms.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-05-17 22:03:09 -03:00
parent 955fb9b60c
commit 7694edfd52
12 changed files with 174 additions and 79 deletions
+20
View File
@@ -95,7 +95,10 @@ enum class CommonFormat
{
NONE,
XYf,
XYZf,
RGBAub,
STf_RGBAub,
STPf_RGBAub,
XYf_STf,
XYf_STPf,
XYf_STf_RGBAub,
@@ -103,6 +106,18 @@ enum class CommonFormat
XYf_STPf_RGBAub,
};
struct STf_RGBAub
{
float s, t;
Color color;
};
struct STPf_RGBAub
{
float s, t, p;
Color color;
};
struct XYf_STf
{
float x, y;
@@ -142,6 +157,11 @@ uint32 getFormatFlags(CommonFormat format);
int getFormatPositionComponents(CommonFormat format);
inline CommonFormat getSinglePositionFormat(bool is2D)
{
return is2D ? CommonFormat::XYf : CommonFormat::XYZf;
}
size_t getIndexDataSize(IndexDataType type);
IndexDataType getIndexDataTypeFromMax(size_t maxvalue);