Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
GameMenuRenderer.hpp
1#pragma once
2
3#include "renderers/Renderer.hpp"
4#include "graphics/Program.hpp"
5#include "GameMenu.hpp"
6
11class GameMenuRenderer final : public Renderer {
12public:
15 explicit GameMenuRenderer();
16
22 void drawMenu(const GameMenu & menu, const glm::vec2 & finalRes, float aspectRatio) const;
23
27 glm::vec2 getButtonSize() const;
28
29private:
34 const Mesh * _button;
35 const Mesh * _buttonIn;
36 const Mesh * _toggle;
37 const Mesh * _toggleIn;
38 const Mesh * _quad;
39};
A game menu containing buttons, toggles and images.
Definition: GameMenu.hpp:124
Renders a game menu.
Definition: GameMenuRenderer.hpp:11
void drawMenu(const GameMenu &menu, const glm::vec2 &finalRes, float aspectRatio) const
Definition: GameMenuRenderer.cpp:20
const Mesh * _buttonIn
Button interior mesh.
Definition: GameMenuRenderer.hpp:35
glm::vec2 getButtonSize() const
Definition: GameMenuRenderer.cpp:123
const Mesh * _quad
Quad mesh for images.
Definition: GameMenuRenderer.hpp:38
const Mesh * _toggleIn
Toggle interior mesh.
Definition: GameMenuRenderer.hpp:37
Program * _fontProgram
Labels font rendering.
Definition: GameMenuRenderer.hpp:33
GameMenuRenderer()
Definition: GameMenuRenderer.cpp:8
Program * _buttonProgram
Buttons rendering.
Definition: GameMenuRenderer.hpp:31
const Mesh * _toggle
Toggle main mesh (with border).
Definition: GameMenuRenderer.hpp:36
Program * _imageProgram
Fixed images rendering.
Definition: GameMenuRenderer.hpp:32
Program * _backgroundProgram
Background images rendering.
Definition: GameMenuRenderer.hpp:30
const Mesh * _button
Button main mesh (with border).
Definition: GameMenuRenderer.hpp:34
Represents a geometric mesh composed of vertices, other attributes and triangles.
Definition: Mesh.hpp:15
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Base structure of a renderer.
Definition: Renderer.hpp:10