33 #include "../../Core/IOData/file_system.h" 34 #include "../../Core/Resources/resource.h" 35 #include "graphic_context.h" 36 #include "../Image/image_import_description.h" 37 #include "../Image/texture_format.h" 49 class TextureProvider;
57 class TextureCubeArray;
59 class SharedGCData_Impl;
60 class ResourceManager;
61 class XMLResourceDocument;
114 Texture(
const std::shared_ptr<Texture_Impl> &
impl);
153 explicit operator bool()
const {
return bool(
impl); }
196 std::weak_ptr<Texture_Impl>
get_impl()
const;
250 std::shared_ptr<Texture_Impl>
impl;
3D texture object class.
Definition: texture_3d.h:40
void set_mag_filter(TextureFilter filter)
Set the magnification filter.
bool operator<(const Texture &other) const
Less than operator.
Definition: texture.h:146
TextureFilter get_min_filter() const
Get the texture minification filter.
void set_min_lod(float min_lod)
Set the minimum level of detail texture parameter.
bool is_null() const
Returns true if this object is invalid.
Definition: texture.h:152
Resource proxy of a specific type.
Definition: resource.h:57
TextureFilter
Texture filters.
Definition: texture.h:72
static Resource< Texture > resource(GraphicContext &gc, const std::string &id, const ResourceManager &resources)
Retrieves a Texture resource from the resource manager.
void set_base_level(int base_level)
Sets the texture base level texture parameter.
TextureWrapMode
Texture coordinate wrapping modes.
Definition: texture.h:64
Texture object class.
Definition: texture.h:102
bool operator!=(const Texture &other) const
Inequality operator.
Definition: texture.h:140
TextureDimensions
Texture dimensions.
Definition: texture.h:90
Image Import Description Class.
Definition: image_import_description.h:47
TextureCube to_texture_cube() const
Dynamic cast to TextureCube.
float get_lod_bias() const
Get the level of detail bias constant.
1D texture array object class.
Definition: texture_1d_array.h:40
Texture2DArray to_texture_2d_array() const
Dynamic cast to Texture2DArray.
TextureFilter get_mag_filter() const
Get the texture magnification filter.
float get_max_lod() const
Get the maximum level of detail.
2D texture cube object class.
Definition: texture_cube.h:51
void set_max_level(int max_level)
Sets the texture max level texture parameter.
void generate_mipmap()
Generate the mipmap.
TextureCompareMode
Texture compare modes.
Definition: texture.h:83
Set of images that combined form a complete texture.
Definition: pixel_buffer_set.h:45
2D texture object class.
Definition: texture_2d.h:40
static Texture load(GraphicContext &gc, const std::string &id, const XMLResourceDocument &doc, const ImageImportDescription &import_desc=ImageImportDescription())
Loads a Texture from a XML resource definition.
std::shared_ptr< Texture_Impl > impl
Definition: texture.h:250
int get_max_level() const
Get the texture max level.
void throw_if_null() const
Throw an exception if this object is invalid.
Resource manager.
Definition: resource_manager.h:43
TextureCompareMode get_compare_mode() const
Get the texture compare mode.
Texture1DArray to_texture_1d_array() const
Dynamic cast to Texture1DArray.
TextureProvider * get_provider() const
Get Provider.
void set_lod_bias(float lod_bias)
Sets the level of detail bias constant.
Interface for implementing a Texture target.
Definition: texture_provider.h:49
2D texture cube array object class.
Definition: texture_cube_array.h:40
Interface to drawing graphics.
Definition: graphic_context.h:256
Texture()
Constructs a null instance.
TextureCubeArray to_texture_cube_array() const
Dynamic cast to TextureCubeArray.
bool operator==(const Texture &other) const
Equality operator.
Definition: texture.h:134
CompareFunction
Compare functions.
Definition: graphic_context.h:91
XML Resource Document.
Definition: xml_resource_document.h:47
void set_max_anisotropy(float max_anisotropy)
Set the maximum degree of anisotropy.
Texture1D to_texture_1d() const
Dynamic cast to Texture1D.
float get_min_lod() const
Get the minimum level of detail.
void set_max_lod(float max_lod)
Set the maximum level of detail texture parameter.
std::weak_ptr< Texture_Impl > get_impl() const
Get the implementation weakptr.
bool is_resident() const
Returns true if texture is resident in texture memory.
1D texture object class.
Definition: texture_1d.h:40
2D texture array object class.
Definition: texture_2d_array.h:42
void set_texture_compare(TextureCompareMode mode, CompareFunction func)
Sets the texture compare mode and compare function texture parameters.
int get_base_level() const
Get the texture base level.
Texture2D to_texture_2d() const
Dynamic cast to Texture2D.
Texture3D to_texture_3d() const
Dynamic cast to Texture3D.
void set_min_filter(TextureFilter filter)
Set the minification filter.
CompareFunction get_compare_function() const
Get the texture compare function.