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

#include <texture_manager.hpp>

Inheritance diagram for neogfx::texture_manager:
neogfx::i_texture_manager neolib::i_basic_cookie_consumer< CookieType > neolib::services::i_service

Public Member Functions

void find_texture (texture_id aId, i_ref_ptr< i_texture > &aResult) const override
 
void clear_textures () override
 
void add_ref (texture_id aId) override
 
void release (texture_id aId) override
 
long use_count (texture_id aId) const override
 
std::unique_ptr< i_texture_atlascreate_texture_atlas (size const &aSize=size{ 1024.0, 1024.0 }) override
 
- Public Member Functions inherited from neogfx::i_texture_manager
ref_ptr< i_texturefind_texture (texture_id aId) const
 
ref_ptr< i_texturecreate_texture (neogfx::size const &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, color_space aColorSpace=color_space::sRGB, optional_color const &aColor=optional_color())
 
virtual void create_texture (neogfx::size const &aExtents, dimension aDpiScaleFactor, texture_sampling aSampling, texture_data_format aDataFormat, texture_data_type aDataType, color_space aColorSpace, optional_color const &aColor, i_ref_ptr< i_texture > &aResult)=0
 
ref_ptr< i_texturecreate_texture (i_image const &aImage, texture_data_format aDataFormat=texture_data_format::RGBA, texture_data_type aDataType=texture_data_type::UnsignedByte)
 
ref_ptr< i_texturecreate_texture (i_image const &aImage, const rect &aImagePart, texture_data_format aDataFormat=texture_data_format::RGBA, texture_data_type aDataType=texture_data_type::UnsignedByte)
 
virtual void create_texture (i_image const &aImage, const rect &aImagePart, texture_data_format aDataFormat, texture_data_type aDataType, i_ref_ptr< i_texture > &aResult)=0
 
- Public Member Functions inherited from neolib::services::i_service
virtual ~i_service ()=default
 

Protected Types

typedef ref_ptr< i_texturetexture_pointer
 
typedef neolib::pair< texture_pointer, uint32_t > texture_list_entry
 
typedef neolib::jar< texture_list_entrytexture_list
 

Protected Member Functions

texture_id allocate_texture_id () override
 
const texture_listtextures () const
 
texture_listtextures ()
 
texture_list::const_iterator find_texture (i_image const &aImage, rect const &aImagePart) const
 
texture_list::iterator find_texture (i_image const &aImage, rect const &aImagePart)
 
ref_ptr< i_textureadd_texture (i_ref_ptr< i_native_texture > const &aTexture)
 

Friends

class texture_wrapper
 
neolib::cookie item_cookie (texture_list_entry const &)
 

Additional Inherited Members

- Static Public Member Functions inherited from neogfx::i_texture_manager
static uuid const & iid ()
 

Detailed Description

Definition at line 30 of file texture_manager.hpp.

Member Typedef Documentation

◆ texture_list

◆ texture_list_entry

Definition at line 35 of file texture_manager.hpp.

◆ texture_pointer

Definition at line 34 of file texture_manager.hpp.

Member Function Documentation

◆ add_ref()

void neogfx::texture_manager::add_ref ( texture_id  aId)
override

◆ add_texture()

ref_ptr< i_texture > neogfx::texture_manager::add_texture ( i_ref_ptr< i_native_texture > const &  aTexture)
protected

◆ allocate_texture_id()

texture_id neogfx::texture_manager::allocate_texture_id ( )
overrideprotectedvirtual

◆ clear_textures()

void neogfx::texture_manager::clear_textures ( )
overridevirtual

◆ create_texture_atlas()

std::unique_ptr< i_texture_atlas > neogfx::texture_manager::create_texture_atlas ( size const &  aSize = size{ 1024.0, 1024.0 })
overridevirtual

◆ find_texture() [1/3]

texture_list::iterator neogfx::texture_manager::find_texture ( i_image const &  aImage,
rect const &  aImagePart 
)
protected

◆ find_texture() [2/3]

texture_list::const_iterator neogfx::texture_manager::find_texture ( i_image const &  aImage,
rect const &  aImagePart 
) const
protected

◆ find_texture() [3/3]

void neogfx::texture_manager::find_texture ( texture_id  aId,
i_ref_ptr< i_texture > &  aResult 
) const
overridevirtual

◆ release()

void neogfx::texture_manager::release ( texture_id  aId)
override

◆ textures() [1/2]

texture_list & neogfx::texture_manager::textures ( )
protected

◆ textures() [2/2]

const texture_list & neogfx::texture_manager::textures ( ) const
protected

◆ use_count()

long neogfx::texture_manager::use_count ( texture_id  aId) const
override

Friends And Related Symbol Documentation

◆ item_cookie

neolib::cookie item_cookie ( texture_list_entry const &  )
friend

◆ texture_wrapper

friend class texture_wrapper
friend

Definition at line 32 of file texture_manager.hpp.


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