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

Buffer holding texture image data. More...

#include <texture.h>

Collaboration diagram for nngn::term::Texture:

Public Types

using texel3 = vec3_base< u8 >
 
using texel4 = vec4_base< u8 >
 
using texel3 = vec3_base< u8 >
 
using texel4 = vec4_base< u8 >
 

Public Member Functions

 Texture (uvec2 size={})
 
uvec2 size (void) const
 
std::span< const texel4data (void) const
 
void resize (uvec2 size)
 
void copy (const u8 *p)
 
void copy (uvec2 size, const u8 *p)
 
texel4 sample (vec2 uv) const
 
 Texture (uvec2 size={})
 
uvec2 size (void) const
 
std::span< const texel4data (void) const
 
void resize (uvec2 size)
 
void copy (const u8 *p)
 
void copy (uvec2 size, const u8 *p)
 
texel4 sample (vec2 uv) const
 

Private Attributes

uvec2 m_size
 
vec2 size_f
 
std::vector< texel4m_data
 

Detailed Description

Buffer holding texture image data.

Member Typedef Documentation

◆ texel3 [1/2]

◆ texel3 [2/2]

◆ texel4 [1/2]

◆ texel4 [2/2]

Constructor & Destructor Documentation

◆ Texture() [1/2]

nngn::term::Texture::Texture ( uvec2  size = {})
inlineexplicit

◆ Texture() [2/2]

nngn::term::Texture::Texture ( uvec2  size = {})
explicit

Member Function Documentation

◆ copy() [1/4]

void nngn::term::Texture::copy ( const u8 p)
inline

◆ copy() [2/4]

void nngn::term::Texture::copy ( const u8 p)

◆ copy() [3/4]

void nngn::term::Texture::copy ( uvec2  size,
const u8 p 
)
inline
Here is the call graph for this function:

◆ copy() [4/4]

void nngn::term::Texture::copy ( uvec2  size,
const u8 p 
)

◆ data() [1/2]

std::span< const texel4 > nngn::term::Texture::data ( void  ) const
inline

◆ data() [2/2]

std::span< const texel4 > nngn::term::Texture::data ( void  ) const
inline

◆ resize() [1/2]

void nngn::term::Texture::resize ( uvec2  size)
inline

◆ resize() [2/2]

void nngn::term::Texture::resize ( uvec2  size)

◆ sample() [1/2]

auto nngn::term::Texture::sample ( vec2  uv) const
inline

◆ sample() [2/2]

texel4 nngn::term::Texture::sample ( vec2  uv) const

◆ size() [1/2]

uvec2 nngn::term::Texture::size ( void  ) const
inline
Here is the caller graph for this function:

◆ size() [2/2]

uvec2 nngn::term::Texture::size ( void  ) const
inline

Member Data Documentation

◆ m_data

std::vector< texel4 > nngn::term::Texture::m_data
private

◆ m_size

uvec2 nngn::term::Texture::m_size
private

◆ size_f

vec2 nngn::term::Texture::size_f
private

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