nngn
Loading...
Searching...
No Matches
nngn::SpriteRenderer Struct Reference

#include <renderers.h>

Inheritance diagram for nngn::SpriteRenderer:
Collaboration diagram for nngn::SpriteRenderer:

Public Member Functions

void load (nngn::lua::table_view t)
 
- Public Member Functions inherited from nngn::Renderer
bool updated () const
 
void set_pos (vec3 p)
 

Static Public Member Functions

static void uv_coords (uvec2 uv0, uvec2 uv1, uvec2 scale, std::span< float > s)
 
template<typename T , std::size_t N>
static std::span< floatuv_span (std::array< T, N > *a)
 

Public Attributes

vec2 size = {}
 
std::array< vec2, 2 > uv = {{{0, 1}, {1, 0}}}
 
u32 tex = 0
 
- Public Attributes inherited from nngn::Renderer
Entityentity = nullptr
 
vec3 pos = {}
 
float z_off = 0
 
Flags< Flagflags = {}
 

Additional Inherited Members

- Public Types inherited from nngn::Renderer
enum  Type : u8 {
  SPRITE = 1 , SCREEN_SPRITE , TRANSLUCENT , CUBE ,
  VOXEL , N_TYPES
}
 
enum  Flag : u8 { UPDATED = 1u << 0 }
 

Member Function Documentation

◆ load()

void nngn::SpriteRenderer::load ( nngn::lua::table_view t)
Here is the call graph for this function:

◆ uv_coords()

void nngn::SpriteRenderer::uv_coords ( uvec2 uv0,
uvec2 uv1,
uvec2 scale,
std::span< float > s )
inlinestatic
Here is the caller graph for this function:

◆ uv_span()

template<typename T , std::size_t N>
std::span< float > nngn::SpriteRenderer::uv_span ( std::array< T, N > * a)
static
Here is the caller graph for this function:

Member Data Documentation

◆ size

vec2 nngn::SpriteRenderer::size = {}

◆ tex

u32 nngn::SpriteRenderer::tex = 0

◆ uv

std::array<vec2, 2> nngn::SpriteRenderer::uv = {{{0, 1}, {1, 0}}}

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