neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::texture Class Reference

#include <texture.hpp>

Inheritance diagram for neogfx::texture:
neolib::reference_counted< Base, DeallocateOnRelease >

Public Member Functions

 texture ()
 
 texture (const neogfx::size &aExtents, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, texture_data_format aDataFormat=texture_data_format::RGBA, texture_data_type aDataType=texture_data_type::UnsignedByte, neogfx::color_space aColorSpace=neogfx::color_space::sRGB, const optional_color &aColor=optional_color{})
 
 texture (const i_texture &aTexture)
 
 texture (const i_image &aImage, texture_data_format aDataFormat=texture_data_format::RGBA, texture_data_type aDataType=texture_data_type::UnsignedByte)
 
 texture (const i_image &aImage, const rect &aImagePart, texture_data_format aDataFormat=texture_data_format::RGBA, texture_data_type aDataType=texture_data_type::UnsignedByte)
 
 texture (const i_sub_texture &aSubTexture)
 
 ~texture ()
 
texture_id id () const final
 
i_string const & uri () const final
 
rect const & part () const final
 
texture_type type () const final
 
bool is_render_target () const final
 
const i_render_targetas_render_target () const final
 
i_render_targetas_render_target () final
 
const i_sub_textureas_sub_texture () const final
 
dimension dpi_scale_factor () const final
 
neogfx::color_space color_space () const final
 
texture_sampling sampling () const final
 
uint32_t samples () const final
 
texture_data_format data_format () const final
 
texture_data_type data_type () const final
 
bool is_empty () const final
 
size extents () const final
 
size storage_extents () const final
 
void set_pixels (const rect &aRect, const void *aPixelData, uint32_t aPackAlignment=4u) final
 
void set_pixels (const i_image &aImage) final
 
void set_pixels (const i_image &aImage, const rect &aImagePart) final
 
void set_pixel (const point &aPosition, const color &aColor) final
 
color get_pixel (const point &aPosition) const final
 
i_vector< texture_line_segment > const & intersection (texture_line_segment const &aLine, rect const &aBoundingBox, vec2 const &aSampleSize={ 1.0, 1.0 }, scalar aTolerance=0.0) const final
 
void bind (std::uint32_t aTextureUnit) const final
 
void unbind () const final
 
intptr_t native_handle () const final
 
i_texturenative_texture () const final
 
- Public Member Functions inherited from neolib::reference_counted< Base, DeallocateOnRelease >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_type * release_and_take_ownership () const override
 
base_type * release_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 

Detailed Description

Definition at line 34 of file texture.hpp.

Constructor & Destructor Documentation

◆ texture() [1/6]

neogfx::texture::texture ( )

◆ texture() [2/6]

neogfx::texture::texture ( const neogfx::size aExtents,
dimension  aDpiScaleFactor = 1.0,
texture_sampling  aSampling = texture_sampling::NormalMipmap,
texture_data_format  aDataFormat = texture_data_format::RGBA,
texture_data_type  aDataType = texture_data_type::UnsignedByte,
neogfx::color_space  aColorSpace = neogfx::color_space::sRGB,
const optional_color aColor = optional_color{} 
)

◆ texture() [3/6]

neogfx::texture::texture ( const i_texture aTexture)

◆ texture() [4/6]

neogfx::texture::texture ( const i_image aImage,
texture_data_format  aDataFormat = texture_data_format::RGBA,
texture_data_type  aDataType = texture_data_type::UnsignedByte 
)

◆ texture() [5/6]

neogfx::texture::texture ( const i_image aImage,
const rect aImagePart,
texture_data_format  aDataFormat = texture_data_format::RGBA,
texture_data_type  aDataType = texture_data_type::UnsignedByte 
)

◆ texture() [6/6]

neogfx::texture::texture ( const i_sub_texture aSubTexture)

◆ ~texture()

neogfx::texture::~texture ( )

Member Function Documentation

◆ as_render_target() [1/2]

const i_render_target & neogfx::texture::as_render_target ( ) const
final

◆ as_render_target() [2/2]

i_render_target & neogfx::texture::as_render_target ( )
final

◆ as_sub_texture()

const i_sub_texture & neogfx::texture::as_sub_texture ( ) const
final

◆ bind()

void neogfx::texture::bind ( std::uint32_t  aTextureUnit) const
final

◆ color_space()

neogfx::color_space neogfx::texture::color_space ( ) const
final

◆ data_format()

texture_data_format neogfx::texture::data_format ( ) const
final

◆ data_type()

texture_data_type neogfx::texture::data_type ( ) const
final

◆ dpi_scale_factor()

dimension neogfx::texture::dpi_scale_factor ( ) const
final

◆ extents()

size neogfx::texture::extents ( ) const
final

◆ get_pixel()

color neogfx::texture::get_pixel ( const point aPosition) const
final

◆ id()

texture_id neogfx::texture::id ( ) const
final

◆ intersection()

i_vector< texture_line_segment > const & neogfx::texture::intersection ( texture_line_segment const &  aLine,
rect const &  aBoundingBox,
vec2 const &  aSampleSize = { 1.0, 1.0 },
scalar  aTolerance = 0.0 
) const
final

◆ is_empty()

bool neogfx::texture::is_empty ( ) const
final

◆ is_render_target()

bool neogfx::texture::is_render_target ( ) const
final

◆ native_handle()

intptr_t neogfx::texture::native_handle ( ) const
final

◆ native_texture()

i_texture & neogfx::texture::native_texture ( ) const
final

◆ part()

rect const & neogfx::texture::part ( ) const
final

◆ samples()

uint32_t neogfx::texture::samples ( ) const
final

◆ sampling()

texture_sampling neogfx::texture::sampling ( ) const
final

◆ set_pixel()

void neogfx::texture::set_pixel ( const point aPosition,
const color aColor 
)
final

◆ set_pixels() [1/3]

void neogfx::texture::set_pixels ( const i_image aImage)
final

◆ set_pixels() [2/3]

void neogfx::texture::set_pixels ( const i_image aImage,
const rect aImagePart 
)
final

◆ set_pixels() [3/3]

void neogfx::texture::set_pixels ( const rect aRect,
const void *  aPixelData,
uint32_t  aPackAlignment = 4u 
)
final

◆ storage_extents()

size neogfx::texture::storage_extents ( ) const
final

◆ type()

texture_type neogfx::texture::type ( ) const
final

◆ unbind()

void neogfx::texture::unbind ( ) const
final

◆ uri()

i_string const & neogfx::texture::uri ( ) const
final

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