#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
#define CE_META_CLASS_FRIEND(T)
Definition Forward.hpp:48
A class that wraps a bitmap into a rich class for accessing it.
Definition Bitmap.hpp:30
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
A texture that is backed by a GPU image. These textures usually can't be serialized.
Definition Texture.hpp:253
Async< Bitmap > getBitmap(UInt32 layer=0, UInt32 mip=0) const override
Gets a bitmap pixel data for the given layer and mip level.
Async setBitmap(const Bitmap &bitmap, UInt32 layer=0, UInt32 mip=0) override
Sets a new bitmap pixel data for the given layer and mip level.
const GPUImagePtr & getImage() const noexcept
A pointer to the GPU image object.
Definition Texture.hpp:270
GPUTexture(const GPUImagePtr &image)
Creates a new GPU texture from an existing GPU image.
GPUImagePtr mImage
A pointer to the GPU image object.
Definition Texture.hpp:259
A texture type that is backed by an in-memory bitmap.
Definition Texture.hpp:135
Vector< LayerData > mLayers
A vector of per-layer data.
Definition Texture.hpp:156
MemoryTexture(const Bitmap &bitmap)
Creates a new StreamingTexture from an existing bitmap.
Async setBitmap(const Bitmap &bitmap, UInt32 layer=0, UInt32 mip=0) override
Sets a new bitmap pixel data for the given layer and mip level.
Async< Bitmap > getBitmap(UInt32 layer=0, UInt32 mip=0) const override
Gets a bitmap pixel data for the given layer and mip level.
MemoryTexture(TExtent3< UInt32 > extent, Format format=Format::RGBA8UNorm)
Creates a new empty StreamingTexture.
An object, provided by the resource manager, to view and alter data from the resource itself.
Definition Resource.hpp:89
Definition ResourceHandle.hpp:166
A wrapper type that wraps a generic object into a resource.
Definition Resource.hpp:308
A texture type that is backed by streamable mip and layer data.
Definition Texture.hpp:184
Async setBitmap(const Bitmap &bitmap, UInt32 layer=0, UInt32 mip=0) override
Sets a new bitmap pixel data for the given layer and mip level.
StreamingTexture(ResourceData &resourceData, TExtent3< UInt32 > extent, Format format=Format::RGBA8UNorm)
Creates a new empty StreamingTexture.
Async< TexturePixelStream > getPixelStream(UInt32 layer=0, UInt32 mip=0) const
Gets a pixel stream for the given layer and mip level.
Vector< LayerData > mLayers
A vector of per-layer data.
Definition Texture.hpp:217
StreamingTexture(ResourceData &resourceData, const Texture &other)
Creates a new StreamingTexture by copying from another.
Async< Bitmap > getBitmap(UInt32 layer=0, UInt32 mip=0) const override
Gets a bitmap pixel data for the given layer and mip level.
StreamingTexture(ResourceData &resourceData, const Bitmap &bitmap)
Creates a new StreamingTexture from an existing bitmap.
Utility template class that can be extended by Resources to automatically implement methods that are ...
Definition Resource.hpp:272
A texture that can be imported into the renderer.
Definition Texture.hpp:89
~Texture() noexcept override
Destroys the texture object.
Format getFormat() const noexcept
Hardware texture format. By default Format::RGBA8UNorm.
Definition Texture.hpp:122
virtual Async< Bitmap > getBitmap(UInt32 layer=0, UInt32 mip=0) const =0
Gets a bitmap pixel data for the given layer and mip level.
Texture(ResourceData &resourceData, const TextureProperties &properties)
Creates a new texture.
virtual Async setBitmap(const Bitmap &bitmap, UInt32 layer=0, UInt32 mip=0)=0
Sets a new bitmap pixel data for the given layer and mip level.
TextureProperties mProperties
A structure that describes properties of an texture.
Definition Texture.hpp:95
Texture(const TextureProperties &properties)
Creates a new texture.
const TExtent3< UInt32 > & getExtent() const noexcept
Texture extent.
Definition Texture.hpp:119
Definition Application.hpp:19
std::shared_ptr< T > SPtr
SPtr is a smart pointer that retains shared ownership of an object through a pointer.
Definition SmartPtr.hpp:37
TextureType
Definition Texture.hpp:32
@ TextureCube
Cube texture.
@ Texture2D
2-Dimensional texture.
cti::continuable< Args... > Async
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
Definition Async.hpp:22
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
Format
Definition TextureFormat.hpp:54
@ RGBA8UNorm
Color format: red, green, blue, alpha 8-bit normalized.
TExtent3< UInt32 > BitmapExtent
A type that represents the extents of a bitmap.
Definition Bitmap.hpp:24
@ Texture3D
The texture represents a 3D texture.
@ Texture2D
The texture represents a regular 2D texture.
@ Texture1D
The texture represents a 1D texture.
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Data per-layer of the texture.
Definition Texture.hpp:147
Vector< MipData > mips
A vector containing all mips for the texture.
Definition Texture.hpp:151
A mip-level bitmap data for a texture.
Definition Texture.hpp:141
Data per-layer of the texture.
Definition Texture.hpp:203
Vector< MipData > mips
The layer preview data.
Definition Texture.hpp:212
A mip-level bitmap data for a texture.
Definition Texture.hpp:190
SPtr< HResourceStream > stream
A reference to the stream that backs this mip level data.
Definition Texture.hpp:199
BitmapExtent extents
Determines the size of the bitmap.
Definition Texture.hpp:196
A structure that describes properties of an texture.
Definition Texture.hpp:47
UInt32 mipLevels
Number of MIP-map levels. By default 1.
Definition Texture.hpp:82
Format format
Hardware texture format. By default Format::RGBA8UNorm.
Definition Texture.hpp:52
UInt32 arrayLayers
Number of array layers.
Definition Texture.hpp:78
TExtent3< UInt32 > extent
Texture extent.
Definition Texture.hpp:62
TextureType type
Hardware texture type. By default TextureType::Texture2D.
Definition Texture.hpp:49