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
 
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.
 
 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 [1/2]

◆ Mode [2/2]

Constructor & Destructor Documentation

◆ Rasterizer() [1/2]

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

◆ Rasterizer() [2/2]

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

Member Function Documentation

◆ font() [1/2]

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 caller graph for this function:

◆ font() [2/2]

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.

◆ hud_proj() [1/2]

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

UI projection matrix.

Here is the caller graph for this function:

◆ hud_proj() [2/2]

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

UI projection matrix.

◆ proj() [1/2]

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

World projection matrix.

Here is the caller graph for this function:

◆ proj() [2/2]

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

World projection matrix.

◆ sprite() [1/2]

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 caller graph for this function:

◆ sprite() [2/2]

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.

◆ update_camera() [1/2]

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:

◆ update_camera() [2/2]

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

Updates internal camera matrices.

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: