static void RenderContent(float Dt) { NanoVG.BeginFrame(RT.Width, RT.Height); //NanoVG.DrawRect(ClearColor, 0, 0, RT.Width, RT.Height); NanoVG.SetFont("clacon", LineHeight); NanoVG.TextAlign(TextAlign.TopLeft); string[] Lines = ConsoleLines.ToArray(); for (int i = 0; i < Lines.Length; i++) { NanoVG.FillColor(Color.White); NanoVG.StyledText(0, LineHeight * i, Lines[i]); } NanoVG.FillColor(Color.Wheat); NanoVG.Text(0, LineHeight * MaxLines + 1, InputPrefix + Input + "_"); NanoVG.EndFrame(); }
static void RenderUI(float Dt) { if (!Engine.Running) { Engine.RenderWindow.Close(); return; } Engine.UI?.Render(Dt); Console.Render(Dt); if (Engine.DrawFPSCounter) { NanoVG.BeginFrame(); NanoVG.DrawText("clacon", 12, TextAlign.TopLeft, Color.White, 0, 0, string.Format("FPS: {0} - {1} ms", 1.0f / Dt, Dt)); NanoVG.DrawText("clacon", 12, TextAlign.TopLeft, Color.White, 0, 12, Camera.GetCurrent().ToString()); //Camera.GetCurrent().rot NanoVG.EndFrame(); } }
public static void Render(float Dt) { if (!IsOpen) { return; } if (RT == null) { InitGraphics(); } RT.Bind(); RT.Clear(ClearColor); RenderContent(Dt); RT.Unbind(); float Y = (0 - RT.Height) + (NanoVG.Height * ConsoleHeightRatio) + ScrollAmt; NanoVG.BeginFrame(); NanoVG.DrawTexturedRect(RT_NVG, 0, (int)Y, RT.Width, RT.Height); NanoVG.EndFrame(); }
public override void Render(float Dt) { NanoVG.BeginFrame(); StateMgr.Render(Dt); NanoVG.EndFrame(); }