2D renderer api runs onTop of the renderer api.
More...
#include <renderer2D.h>
|
| static void | init () |
| | initializes the 2D renderer. More...
|
| |
| static void | shutdown () |
| | shutsdown the 2D renderer and destroys the appropriate resources. More...
|
| |
| static void | BeginScene () |
| | starts a 2D renderer scene. More...
|
| |
| static void | endScene () |
| | ends the 2D renderer scene. More...
|
| |
| static bool | drawLabel (const glm::vec3 &position, const glm::vec2 &size, const ref< font > &font, const std::string labelText) |
| |
| static bool | drawCharQuad (const glm::vec3 &position, const glm::vec2 &size, const ref< texture > &texture, uint64_t handleIndex) |
| | draws a texture quad. More...
|
| |
| static bool | drawQuad (const glm::vec3 &position, const glm::vec2 &size, const ref< texture > &texture) |
| | draws a texture quad. More...
|
| |
| static bool | drawQuad (const glm::mat4 transform, const glm::vec4 color, const ref< texture > &texture) |
| | draws a texture quad. More...
|
| |
| static bool | drawQuad (const glm::vec3 &position, const glm::vec2 &size, const glm::vec4 &color) |
| | draws a quad. More...
|
| |
| static bool | drawQuad (const glm::vec3 &position, const glm::vec2 &size) |
| | draws a quad. More...
|
| |
| static bool | drawQuad (const glm::mat4 &transform, const glm::vec4 &color) |
| | draws a quad. More...
|
| |
| static void | flush () |
| | flushes all the draw commands to the base renderer. More...
|
| |
| static statistics | getStats () |
| | returns renderer2D stats. More...
|
| |
2D renderer api runs onTop of the renderer api.
- See also
- renderer::renderer
◆ BeginScene()
| void luna::renderer::renderer2D::BeginScene |
( |
| ) |
|
|
static |
starts a 2D renderer scene.
◆ drawCharQuad()
| bool luna::renderer::renderer2D::drawCharQuad |
( |
const glm::vec3 & |
position, |
|
|
const glm::vec2 & |
size, |
|
|
const ref< texture > & |
texture, |
|
|
uint64_t |
handleIndex |
|
) |
| |
|
static |
draws a texture quad.
- Parameters
-
| const | glm::vec3& position starting position |
| const | glm::vec2& size starting size; |
| const | glm::vec3& color rgb color value |
◆ drawLabel()
| bool luna::renderer::renderer2D::drawLabel |
( |
const glm::vec3 & |
position, |
|
|
const glm::vec2 & |
size, |
|
|
const ref< font > & |
font, |
|
|
const std::string |
labelText |
|
) |
| |
|
static |
- Parameters
-
| position | |
| size | |
| font | |
| labelText | |
font rendering: quad origin is at top left. 1) xadvance += glyph advance.x 2) draw glyph (+ y advance) 3) xadvance += relative glyph width.
◆ drawQuad() [1/5]
| bool luna::renderer::renderer2D::drawQuad |
( |
const glm::mat4 & |
transform, |
|
|
const glm::vec4 & |
color |
|
) |
| |
|
static |
draws a quad.
- Parameters
-
| const | glm::mat4& transform starting transformation. |
◆ drawQuad() [2/5]
| bool luna::renderer::renderer2D::drawQuad |
( |
const glm::mat4 |
transform, |
|
|
const glm::vec4 |
color, |
|
|
const ref< texture > & |
texture |
|
) |
| |
|
static |
draws a texture quad.
- Parameters
-
| const | glm::mat4 transform |
| const | glm::vec4 color |
| const | ref<texture>& texture |
◆ drawQuad() [3/5]
| bool luna::renderer::renderer2D::drawQuad |
( |
const glm::vec3 & |
position, |
|
|
const glm::vec2 & |
size |
|
) |
| |
|
static |
draws a quad.
- Parameters
-
| const | glm::vec3& position starting position |
| const | glm::vec2& size starting size; |
◆ drawQuad() [4/5]
| bool luna::renderer::renderer2D::drawQuad |
( |
const glm::vec3 & |
position, |
|
|
const glm::vec2 & |
size, |
|
|
const glm::vec4 & |
color |
|
) |
| |
|
static |
draws a quad.
- Parameters
-
| const | glm::vec3& position starting position |
| const | glm::vec2& size starting size; |
| const | glm::vec3& color rgb color value |
◆ drawQuad() [5/5]
| bool luna::renderer::renderer2D::drawQuad |
( |
const glm::vec3 & |
position, |
|
|
const glm::vec2 & |
size, |
|
|
const ref< texture > & |
texture |
|
) |
| |
|
static |
draws a texture quad.
- Parameters
-
| const | glm::vec3& position starting position |
| const | glm::vec2& size starting size; |
| const | glm::vec3& color rgb color value |
◆ endScene()
| void luna::renderer::renderer2D::endScene |
( |
| ) |
|
|
static |
ends the 2D renderer scene.
◆ flush()
| void luna::renderer::renderer2D::flush |
( |
| ) |
|
|
static |
◆ getStats()
◆ init()
| void luna::renderer::renderer2D::init |
( |
| ) |
|
|
static |
initializes the 2D renderer.
◆ shutdown()
| void luna::renderer::renderer2D::shutdown |
( |
| ) |
|
|
static |
shutsdown the 2D renderer and destroys the appropriate resources.
◆ textureInBatch()
| uint64_t luna::renderer::renderer2D::textureInBatch |
( |
const uint64_t & |
handle | ) |
|
|
staticprivate |
◆ blankImage
| ref<texture> luna::renderer::renderer2D::blankImage |
|
inlinestaticprivate |
The documentation for this class was generated from the following files:
- C:/Users/robbe/source/repos/lolrobbe2/luna/luna/src/core/rendering/renderer2D.h
- C:/Users/robbe/source/repos/lolrobbe2/luna/luna/src/core/rendering/renderer2D.cpp