Beispiel #1
0
    private void OnRenderFrameEvent(object o, FrameEventArgs eventArgs)
    {
        GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

        Gizmos.DrawCube(Vector3.Zero, Vector3.One);

        foreach (var camera in BroEngine.Camera.allCameras)
        {
            camera.Render();

            if (!camera.enabled)
            {
                continue;
            }

            Gizmos.Render(camera.viewProjection);

            MusicPlayer.Draw();
            m_Canvas.Draw();
        }

        GL.Viewport(0, 0, Width, Height);
        ImGuiOpenTK.RenderFrame();

        SwapBuffers();

        Gizmos.ClearDrawCalls();
    }