protected override void OnRenderFrame(FrameEventArgs e) { if (gamestate == GameState.Loading) { Game.LoadingScene.draw((float)e.Time); SwapBuffers(); } else if (gamestate == GameState.Game) { GLHelper.Clear(); GL.Enable(EnableCap.DepthTest); var mat = Matrix4.CreateTranslation(cam.Position); ChunkShader.Use(); ChunkShader.SetMatrix("projection", GLHelper.proj); ChunkShader.SetMatrix("view", cam.View); ChunkShader.SetMatrix("transform", Matrix4.Identity); tex.bind(); world.Draw(); UIRenderer.DrawElement(Crosshair); SwapBuffers(); } }