Error if a non-2D/affine matrix is used with auto-batched draws, since they perform CPU-side matrix transforms on 2-component vectors.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-04-23 00:12:57 -03:00
parent 7161d600b7
commit 70b32c47ce
13 changed files with 79 additions and 26 deletions
+6
View File
@@ -250,6 +250,12 @@ void Matrix4::shear(float kx, float ky)
this->operator *=(t);
}
bool Matrix4::isAffine2DTransform() const
{
return fabsf(e[2] + e[3] + e[6] + e[7] + e[8] + e[9] + e[11] + e[14]) < 0.00001f
&& fabsf(e[10] + e[15] - 2.0f) < 0.00001f;
}
Matrix4 Matrix4::inverse() const
{
Matrix4 inv;