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>
 

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
 

Private Attributes

uvec2 m_size
 
vec2 size_f
 
std::vector< texel4m_data
 

Detailed Description

Buffer holding texture image data.

Member Typedef Documentation

◆ texel3

◆ texel4

Constructor & Destructor Documentation

◆ Texture()

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

Member Function Documentation

◆ copy() [1/2]

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

◆ copy() [2/2]

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

◆ data()

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

◆ resize()

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

◆ sample()

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

◆ size()

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

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 file: