Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Implement GUI rendering in GameRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
EtheraelEspeon committed Dec 5, 2023
1 parent 3242a45 commit da8ae7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Client/Rendering/GameRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using GlmSharp;
using Voxel.Client.Keybinding;
using Voxel.Client.Rendering.GUI;
using Voxel.Client.Rendering.World;
using Voxel.Common.Collision;
using Voxel.Common.World;
Expand All @@ -15,6 +16,7 @@ public class GameRenderer : Renderer {
/// </summary>
public readonly Camera MainCamera;
public readonly WorldRenderer WorldRenderer;
public readonly GUIRenderer GUIRenderer;
public readonly CameraStateManager CameraStateManager;

public GameRenderer(VoxelClient client) : base(client) {
Expand All @@ -25,15 +27,18 @@ public GameRenderer(VoxelClient client) : base(client) {
CameraStateManager = new(client.RenderSystem);

WorldRenderer = new(client);
GUIRenderer = new(client);
}

public override void Render(double delta) {
CameraStateManager.SetToCamera(MainCamera, Client.timeSinceLastTick);

WorldRenderer.Render(delta);
GUIRenderer.Render(delta);
}

public override void Dispose() {
WorldRenderer.Dispose();
GUIRenderer.Dispose();
}
}

0 comments on commit da8ae7b

Please sign in to comment.