Texture creation parameters for two dimensional texture that is updated from the CPU. More...
#include <kanzi/core.ui/graphics2d/texture_create_info.hpp>
Public Member Functions | |
CreateInfoHostCopy2D (unsigned int width, unsigned int height, GraphicsFormat format) | |
Constructor for CreateInfoHostCopy2D. | |
Public Member Functions inherited from kanzi::Texture::CreateInfo2D | |
CreateInfo2D (BitmapImageUniquePtr image) | |
CreateInfo2D constructor for texture creation parameters, for creating a two dimensional texture that is initialized from an image. | |
CreateInfo2D (Sampler::MipmapMode mipmaps, BitmapImageUniquePtr image) | |
CreateInfo2D constructor that also takes in mipmap mode. | |
CreateInfo2D (unsigned int width, unsigned int height, GraphicsFormat format) | |
CreateInfo2D constructor for texture creation parameters, for creating a two dimensional texture with specified format and size. | |
Public Member Functions inherited from kanzi::Texture::CreateInfo | |
Status | adjust (const Renderer &renderer, string_view name) |
Validates and applies adjustments to some texture creation parameters in case of avoidable error conditions. | |
CreateInfo () | |
Default constructor for texture create info. | |
void | updateShapeAndFormatFromImages () |
Use updateShapeAndFormatFromImages() to fill in format, width, height from images. | |
Status | validate (const Renderer &renderer) const |
Perform validation of texture creation parameters. | |
Status | validate (const Renderer &renderer, string_view name) const |
Perform validation of texture creation parameters. | |
Additional Inherited Members | |
Public Types inherited from kanzi::Texture::CreateInfo | |
enum | Status { StatusInvalidType , StatusTypeNotSupported , StatusInvalidRenderTargetMode , StatusInvalidImageCount , StatusMissingImages , StatusImageMissingMipmaps , StatusInvalidImageSize , StatusInvalidMinimumSize , StatusInvalidMaximumSize , StatusInvalidMipmapSize , StatusUnsupportedGraphicsFormat , StatusUnsupportedTextureFilter , StatusInvalidFeatures , StatusUnsupportedMultisampleFilter , StatusUnsupportedMultisampleMipmaps , StatusUnsupportedMultisampleSamples , StatusUnsupportedInternalRenderTargetSampleCount , StatusUnsupportedSampleCount , StatusImageFormatMismatch , StatusImageIncompatibleWithDevice , StatusUnsupportedDepthComparisonMode , StatusValid } |
Status tells if texture creation parameters can be used to create a texture. More... | |
enum class | Type { Image , Cubemap , RenderTarget , NativeImage , CubemapRenderTarget } |
Specifies the available texture types. More... | |
Static Public Member Functions inherited from kanzi::Texture::CreateInfo | |
static CreateInfo | createSubstitutePattern (const Renderer &renderer, TextureType type) |
Create a texture create info structure for a black 1x1 texture. | |
Public Attributes inherited from kanzi::Texture::CreateInfo | |
Sampler::AddressingMode | addressingMode |
Texture addressing mode. | |
float | anisotropy |
Texture anisotropy. | |
unsigned int | depth |
Reserved for future use. | |
GraphicsCompareFunction | depthCompareFunction |
Depth comparison function. | |
GraphicsFormat | depthStencilFormat |
DepthStencil format. | |
unsigned int | features |
Required format features. | |
GraphicsFormat | format |
Format for texture. | |
unsigned int | height |
Height for the base level of texture. | |
unsigned int | heightDivisor |
Automatic size determination divisor for height, 0 when not automatic. | |
vector< BitmapImageSharedPtr > | images |
Images that are used to create the texture. | |
Sampler::Filter | magnificationFilter |
Texture minification filter. | |
float | maxLod |
Reserved for future use. | |
MemoryType | memoryType |
Memory type for the texture. | |
Sampler::Filter | minificationFilter |
Texture magnification filter. | |
float | minLod |
Reserved for future use. | |
float | mipLodBias |
Reserved for future use. | |
unsigned int | mipmapLevelCount |
Number of mipmap levels for the texture. | |
Sampler::MipmapMode | mipmapMode |
Mipmap mode for the texture. | |
NativeDeploymentTarget | nativeDeploymentTarget |
Native deployment target to use for memory storage if supported by the backend. | |
RenderTargetMode | renderTargetMode |
RenderTarget mode for the texture. | |
unsigned int | renderTargetSampleCount |
Specifies number of samples for the draw renderbuffer when RenderTargetMode is RenderTargetModeExternal. | |
TextureType | type |
Texture type. | |
unsigned int | width |
Width for the base level of texture. | |
unsigned int | widthDivisor |
Automatic size determination divisor for width, 0 when not automatic. | |
Protected Member Functions inherited from kanzi::Texture::CreateInfo | |
Status | validateFormat (const Renderer &renderer) const |
Validates texture format and features. | |
Status | validateImages (const Renderer &renderer) const |
Test if given set of images can be used to create Texture. | |
Status | validateSize (const Renderer &renderer) const |
Validates texture size against minimum valid texture size (1x1) and maximum supported by graphics adapter. | |
Status | validateTargetCompatibility (const Renderer &renderer) const |
Checks for known device incompatibilities, for example with texture formats and size. | |
Texture creation parameters for two dimensional texture that is updated from the CPU.
You can use CreateInfoHostCopy2D to initialize texture creation parameters for textures that you update from the CPU. Textures will be created with specified format and size, and texture will maintain CPU accessible copy of texture content. Use Texture::getHostCopyImage() to access copy of texture data. Use this kind of texture is when you update texture contents only from the CPU, and you need read access to the texture data. For example glyph cache for font rendering is a plausible use case.
|
explicit |
Constructor for CreateInfoHostCopy2D.
After the CreateInfoHostCopy2D constructor:
The following (from CreateInfo2D constructor) also applies:
The following (from CreateInfo constructor) also applies:
width | Width for the texture |
height | Height for the texture |
format | Format for the texture |