mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
DrawQuad with transform matrix
This commit is contained in:
@@ -587,6 +587,18 @@ namespace GlitchyEngine.Renderer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void DrawQuad(Matrix transform, Texture2D texture, ColorRGBA color = .White, Vector4 uvTransform = .(0, 0, 1, 1))
|
||||||
|
{
|
||||||
|
Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene.");
|
||||||
|
|
||||||
|
QueueQuadInstance(transform, color, texture, transform.Translation.Z, uvTransform);
|
||||||
|
|
||||||
|
if(s_drawOrder == .Immediate)
|
||||||
|
{
|
||||||
|
DrawDeferred();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void DrawQuadPivotCorner(Vector3 position, Vector2 size, float rotation, Texture2D texture, ColorRGBA color = .White, Vector4 uvTransform = .(0, 0, 1, 1))
|
public static void DrawQuadPivotCorner(Vector3 position, Vector2 size, float rotation, Texture2D texture, ColorRGBA color = .White, Vector4 uvTransform = .(0, 0, 1, 1))
|
||||||
{
|
{
|
||||||
DrawQuad(position + Vector3(size.X / 2, size.Y / -2, 0), size, rotation, texture, color, uvTransform);
|
DrawQuad(position + Vector3(size.X / 2, size.Y / -2, 0), size, rotation, texture, color, uvTransform);
|
||||||
|
|||||||
Reference in New Issue
Block a user