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