nngn
|
Typedefs | |
using | write_f = void(FrameBuffer::*)(std::size_t, std::size_t, texel4) |
Functions | |
auto | to_clip (mat4 proj, nngn::Vertex v0, nngn::Vertex v1, auto &&f) |
Transforms world-space vertices into clip space. | |
bool | clip (vec3 bl, vec3 tr) |
Checks whether a sprite lies entirely outside of the clip volume. | |
std::size_t | clamp_floor (float max, float v) |
Clamps value between 0 and max , rounds toward -infinity . | |
std::size_t | clamp_ceil (float max, float v) |
Clamps value between 0 and max , rounds toward +infinity . | |
float | uv_coord (float p0, std::size_t p, float p1, float t0, float t1) |
Calculates texture coordinates for a given position in a sprite. | |
vec2 | to_screen (uvec2 size, vec3 v) |
Transforms clip-space vertices into screen space. | |
write_f | write_fn_for_mode (nngn::Graphics::TerminalMode m) |
void | sprite (std::span< const nngn::Vertex > vbo, std::span< const u32 > ebo, mat4 proj, std::span< const Texture > textures, FrameBuffer *fb, TerminalMode mode, auto &&pos_f) |
using anonymous_namespace{rasterizer.cpp}::write_f = void(FrameBuffer::*)(std::size_t, std::size_t, texel4) |
Clamps value between 0
and max
, rounds toward +infinity
.
Clamps value between 0
and max
, rounds toward -infinity
.
Checks whether a sprite lies entirely outside of the clip volume.
void anonymous_namespace{rasterizer.cpp}::sprite | ( | std::span< const nngn::Vertex > | vbo, |
std::span< const u32 > | ebo, | ||
mat4 | proj, | ||
std::span< const Texture > | textures, | ||
FrameBuffer * | fb, | ||
TerminalMode | mode, | ||
auto && | pos_f ) |
|
inline |
Transforms world-space vertices into clip space.
Transforms clip-space vertices into screen space.
float anonymous_namespace{rasterizer.cpp}::uv_coord | ( | float | p0, |
std::size_t | p, | ||
float | p1, | ||
float | t0, | ||
float | t1 ) |
Calculates texture coordinates for a given position in a sprite.
write_f anonymous_namespace{rasterizer.cpp}::write_fn_for_mode | ( | nngn::Graphics::TerminalMode | m | ) |