nngn
Loading...
Searching...
No Matches
nngn::term::Rasterizer Class Reference

Axis-aligned sprite rasterizer with texture sampling. More...

#include <rasterizer.h>

Collaboration diagram for nngn::term::Rasterizer:

Public Types

using Mode = nngn::Graphics::TerminalMode
 

Public Member Functions

 Rasterizer (Mode m)
 
mat4 proj (void) const
 World projection matrix.
 
mat4 hud_proj (void) const
 UI projection matrix.
 
void update_camera (uvec2 term_size, uvec2 window_size, mat4 proj, mat4 hud_proj, mat4 view)
 Updates internal camera matrices.
 
void sprite (std::span< const Vertex > vbo, std::span< const u32 > ebo, mat4 proj, std::span< const Texture > textures, FrameBuffer *fb) const
 Rasterizes a VBO/EBO pair containing textured quad.
 
void font (std::span< const Vertex > vbo, std::span< const u32 > ebo, mat4 proj, std::span< const Texture > font, FrameBuffer *fb) const
 Rasterizes a VBO/EBO pair containing text data.
 

Private Attributes

mat4 m_proj = {}
 
mat4 m_hud_proj = {}
 
Mode mode
 

Detailed Description

Axis-aligned sprite rasterizer with texture sampling.

Member Typedef Documentation

◆ Mode

Constructor & Destructor Documentation

◆ Rasterizer()

nngn::term::Rasterizer::Rasterizer ( Mode m)
inlineexplicit

Member Function Documentation

◆ font()

void nngn::term::Rasterizer::font ( std::span< const Vertex > vbo,
std::span< const u32 > ebo,
mat4 proj,
std::span< const Texture > font,
FrameBuffer * fb ) const

Rasterizes a VBO/EBO pair containing text data.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hud_proj()

mat4 nngn::term::Rasterizer::hud_proj ( void ) const
inline

UI projection matrix.

Here is the caller graph for this function:

◆ proj()

mat4 nngn::term::Rasterizer::proj ( void ) const
inline

World projection matrix.

Here is the caller graph for this function:

◆ sprite()

void nngn::term::Rasterizer::sprite ( std::span< const Vertex > vbo,
std::span< const u32 > ebo,
mat4 proj,
std::span< const Texture > textures,
FrameBuffer * fb ) const

Rasterizes a VBO/EBO pair containing textured quad.

data.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_camera()

void nngn::term::Rasterizer::update_camera ( uvec2 term_size,
uvec2 window_size,
mat4 proj,
mat4 hud_proj,
mat4 view )

Updates internal camera matrices.

Here is the caller graph for this function:

Member Data Documentation

◆ m_hud_proj

mat4 nngn::term::Rasterizer::m_hud_proj = {}
private

◆ m_proj

mat4 nngn::term::Rasterizer::m_proj = {}
private

◆ mode

Mode nngn::term::Rasterizer::mode
private

The documentation for this class was generated from the following files: