Textures provide images that can be used with image nodes, texture brushes and materials for use in 3D rendering or material brushes. More...
#include <kanzi/core.ui/platform/graphics_backend/gl/texture.hpp>
Classes | |
struct | CreateInfo |
Struct which contains all the parameters that are needed for texture creation. More... | |
struct | CreateInfo2D |
Texture creation parameters for two dimensional texture. More... | |
struct | CreateInfoCubemap |
Texture creation parameters for cubemap texture that is initialized from six images. More... | |
struct | CreateInfoCubemapRenderTarget |
Use Texture::CreateInfoCubemapRenderTarget to create a Cubemap Render Target Texture resource. More... | |
struct | CreateInfoHostCopy2D |
Texture creation parameters for two dimensional texture that is updated from the CPU. More... | |
struct | CreateInfoNode2DRenderTarget |
Texture creation parameters for texture that can be used as render target for 2D nodes. More... | |
struct | CreateInfoRenderpassRenderTarget |
Texture creation parameters for texture that can be used as render target for renderpasses. More... | |
Public Member Functions | |
void | generateMipmaps () |
Generates the mipmaps from the base level image. | |
GraphicsFormat | getDepthStencilFormat () const |
Returns depth/stencil format of the texture. | |
RenderbufferSharedPtr | getDepthStencilRenderbuffer () const |
Returns internal depth/stencil renderbuffer. | |
unsigned int | getHeightDivisor () const |
Gets height divisor for automatic sizes. | |
BitmapImageSharedPtr | getHostCopyImage () const |
Returns the host-side memory copy of a non-cubemap texture, if available. | |
BitmapImageSharedPtr | getHostCopyImage (Face face, unsigned int slice) const |
Returns the host-side memory copy of texture data as an image, if available. | |
NativeDeploymentTarget | getNativeDeploymentTarget () const |
Returns the native deployment target. | |
NativeFramebufferHandle | getNativeFramebufferHandle () const |
Gets native framebuffer handle for the texture. | |
NativeTextureHandle | getNativeHandle () const |
Gets native texture handle for the texture. | |
RenderTargetMode | getRenderTargetMode () const |
Returns rendertarget mode of the texture. | |
const Sampler & | getSampler () const |
Returns the Sampler used by the texture. | |
TextureType | getType () const |
Returns type of the texture. | |
unsigned int | getWidthDivisor () const |
Gets width divisor for automatic sizes. | |
bool | hasAutomaticHeight () const |
Indicates whether height is or should be automatically calculated. | |
bool | hasAutomaticWidth () const |
Indicates whether width is or should be automatically calculated. | |
void | reattachFramebuffer () |
Reattaches the internal framebuffer object. | |
void | reattachFramebuffer (RenderbufferSharedPtr colorRenderbuffer) |
Reattaches the internal framebuffer object and includes the renderbuffer given as parameter. | |
void | reattachFramebuffer (TextureSharedPtr depthTexture) |
Reattaches the internal framebuffer object and includes the depth texture given as parameter. | |
void | recreate (CreateInfo &createInfo) |
Validates the CreateInfo texture descriptor, creates a new texture and swaps it in place. | |
void | resize (unsigned width, unsigned height) |
Changes the size of the texture. | |
void | resolveMSAA (Renderer &renderer) |
Resolves the internal multisample anti-aliasing renderbuffer to a single sample texture, if necessary. | |
void | setData (const kanzi::byte *data) |
Sets the texture data for base level of a non-cubemap texture. | |
void | setData (Face face, unsigned int mipmapLevel, unsigned int x, unsigned int y, unsigned int width, unsigned int height, const kanzi::byte *data) |
Sets the texture data for the specified area in a texture. | |
void | setData (unsigned int mipmapLevel, unsigned int x, unsigned int y, unsigned int width, unsigned int height, const kanzi::byte *data) |
Sets the texture data for the specified area in the texture. | |
void | setHeightDivisor (unsigned int divisor) |
Sets the height divisor. | |
void | setWidthDivisor (unsigned int divisor) |
Sets the wight divisor. | |
Public Member Functions inherited from kanzi::Surface | |
void | attach (Usage usage, APIAttachment apiAttachment, Face face, unsigned int mipmapLevel) |
Attach surface to framebuffer. | |
unsigned int | getFaceCount () const |
Get number of faces. This should be six for cubemaps and one for everything else. | |
unsigned int | getFeatures () const |
Get features for Surface. | |
GraphicsFormat | getFormat () const |
Get GraphicsFormat of Surface. | |
unsigned int | getHeight () const |
Get height in pixels. | |
unsigned int | getMipmapLevelCount () const |
Get number of mipmap levels. | |
unsigned int | getRenderTargetSampleCount () const |
Get number of multisample samples for Surface. | |
unsigned int | getSliceCount () const |
Get number of slices. | |
unsigned int | getWidth () const |
Get width in pixels. | |
Public Member Functions inherited from kanzi::GPUResource | |
void | destroy () |
Destroys a GPU resource. | |
unsigned int | getGPUMemoryUsage () const |
Renderer * | getRenderer () const |
void | invalidate () |
Notify resource that graphics context was lost and all GPU resources are invalid. | |
bool | isDeployed () const |
~GPUResource () override | |
Public Member Functions inherited from kanzi::Resource | |
virtual unsigned int | getCPUMemoryUsage () const |
Function for getting the memory usage of a resource. | |
const string & | getName () const |
Gets the resource name. | |
const string & | getUrl () const |
Gets the resource URL. | |
bool | isKeepAlive () const |
Tells if the resource has keep alive flag set. | |
void | reload () |
void | reloadFromFile (string_view filePath) |
void | reloadFromKzb (KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser) |
void | setKeepAlive (bool keepAlive) |
Sets the keep alive flag. | |
void | setUrl (string_view url) |
Sets the resource URL. | |
~Resource () override | |
Destructor. | |
Public Member Functions inherited from kanzi::Object | |
AppliedStyleEntrySharedPtr | applyObjectStyle (kanzi::StyleSharedPtr style) |
Applies a style to an object. | |
void | applyObjectStyles () |
Apply all styles for an object node. | |
Domain * | getDomain () const |
Returns the domain the object belongs to. | |
const Metaclass * | getDynamicMetaclass () const override |
Returns the metaclass of the dynamic type of the object. | |
MainLoopScheduler * | getMainLoopScheduler () const |
Returns the MainLoopScheduler instance of the associated Domain. | |
detail::MessageDispatcher * | getMessageDispatcher () const |
Returns the message dispatcher of the object. | |
ResourceManager * | getResourceManager () const |
Returns the resource manager of the object. | |
ScriptingContextSharedPtr | getScriptingContext () const |
Gets the scripting context of the object. | |
Object (Domain *domain) | |
void | setScriptingContext (ScriptingContextSharedPtr context) |
Sets the scripting context of the object. | |
void | unapplyObjectStyle (AppliedStyleEntrySharedPtr appliedStyleEntry) |
void | unapplyObjectStyles () |
Unapplies and removes all applied styles. | |
~Object () override | |
Public Member Functions inherited from kanzi::MetaObject | |
bool | isTypeOf (const Metaclass *objectType) const |
Determines if the type of this object is the given type or derived from it. | |
virtual | ~MetaObject () |
Public Member Functions inherited from kanzi::PropertyObject | |
template<typename DataType > | |
void | addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner) |
template<typename DataType > | |
void | addPropertyModifierWithoutNotifyingHandlers (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner) |
Adds a property modifier without notifying handlers. | |
template<typename DataType > | |
void | addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner) |
template<typename DataType > | |
void | addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner) |
template<typename DataType > | |
void | addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer) |
PropertyStorageContainer::iterator | beginPropertyStorage () |
Returns the begin iterator to the internal property storage container. | |
PropertyStorageContainer::const_iterator | beginPropertyStorage () const |
Returns the begin iterator to the internal property storage container. | |
void | clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag) |
void | copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType) |
Copies local value of single property from another object. | |
void | copyLocalValues (const PropertyObject &other) |
Copies all local values from another object. | |
PropertyStorageContainer::iterator | endPropertyStorage () |
Returns the end iterator to the internal property storage container. | |
PropertyStorageContainer::const_iterator | endPropertyStorage () const |
Returns the end iterator to the internal property storage container. | |
template<typename DataType > | |
PropertyType< DataType >::Traits::ReturnType | getAbstractProperty (AbstractPropertyType abstractPropertyType) const |
template<typename DataType > | |
PropertyType< DataType >::Traits::ReturnType | getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const |
template<typename DataType > | |
optional< typename PropertyType< DataType >::Traits::ReturnType > | getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const |
template<typename DataType > | |
optional< typename PropertyType< DataType >::Traits::ReturnType > | getOptionalProperty (const PropertyType< DataType > &propertyType) const |
Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. | |
template<typename DataType > | |
optional< typename PropertyType< DataType >::Traits::ReturnType > | getOptionalPropertyBase (const PropertyType< DataType > &propertyType) const |
Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value. | |
template<typename DataType > | |
PropertyType< DataType >::Traits::ReturnType | getProperty (const PropertyType< DataType > &propertyType) const |
Returns the current value of a property type. | |
template<typename DataType > | |
PropertyType< DataType >::Traits::ReturnType | getPropertyBase (const PropertyType< DataType > &propertyType) const |
Returns the current value of a property disregarding modifiers. | |
template<typename DataType > | |
size_t | getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType) const |
Gets number of current notification handlers for given property type. | |
bool | hasBaseValue (AbstractPropertyType propertyType) const |
Evaluates whether there are any inputs into the property value, disregarding modifiers. | |
bool | hasLocalValue (AbstractPropertyType propertyType) const |
Evaluates whether there is a local value set for the property. | |
bool | hasNonClassValue (AbstractPropertyType propertyType) const |
Evaluates whether there is a value of any precedence higher than class default value set for the property. | |
bool | hasValue (AbstractPropertyType propertyType) const |
Evaluates whether there are any inputs into the property value. | |
bool | isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const |
virtual void | onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) |
Virtual function to handle property change notifications. | |
PropertyObject () | |
void | removeKzbProperties () |
Remove all KZB properties. | |
void | removeKzbProperties (flat_set< AbstractPropertyType > *keepProperties) |
Remove all KZB properties that are not included in a given set. | |
template<typename DataType > | |
void | removeLocalPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer) |
void | removeLocalValue (AbstractPropertyType propertyType) |
Removes the local value associated with the property. | |
template<typename DataType > | |
void | removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner) |
template<typename DataType > | |
void | removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner) |
template<typename DataType > | |
void | removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer) |
template<typename DataType > | |
void | setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value) |
template<typename DataType > | |
void | setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value) |
Sets the local value of a property type. | |
void | setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag) |
KZ_DEPRECATED void | validatePropertyModifiers (AbstractPropertyType propertyType) |
Validates property modifiers and notifies handlers. | |
void | validatePropertyModifiersAndNotifyHandlers (AbstractPropertyType propertyType) |
Validates property modifiers and notifies handlers. | |
virtual | ~PropertyObject () |
Static Public Member Functions | |
static TextureSharedPtr | create (Domain *domain, const CreateInfo &createInfo, string_view name) |
Creates a texture with specified texture creation parameters. | |
static TextureSharedPtr | create (Domain *domain, TextureType type, int nativeHandle, bool takeOwnership, GraphicsFormat format, unsigned int mipmapLevelCount, unsigned int width, unsigned int height, string_view name) |
Creates texture from a pre-existing GL texture object. | |
static ResourceManager::LoadTaskSharedPtr | createGenericFileLoadTask (string_view name, unique_ptr< File > file, Domain *domain) |
Create a task used to create a Texture from generic file. | |
static ResourceManager::LoadTaskSharedPtr | createLoadTask (string_view name, KzbFile *kzbFile, ReadOnlyMemoryFilePtr file) |
Create a task used to create a Texture from KZB File. | |
Static Public Member Functions inherited from kanzi::Object | |
static const Metaclass * | getStaticMetaclass () |
Returns the metaclass of Object class. | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Default implementation that returns empty editor info. | |
Static Public Member Functions inherited from kanzi::MetaObject | |
static const Metaclass * | getStaticMetaclass () |
Returns the metaclass of Object class. | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Default implementation that returns empty editor info. | |
Static Protected Member Functions | |
static GLFramebufferHandle | makeFramebuffer (Renderer *renderer, const CreateInfo &createInfo) |
Helper function to create GL framebuffer object. | |
static vector< BitmapImageSharedPtr > | makeHostCopyImages (const CreateInfo &createInfo) |
Helper function to allocate host images. | |
static GLTextureHandle | makeTexture (Renderer *renderer, const CreateInfo &createInfo) |
Helper function to create GL texture object. | |
Friends | |
class | ResourceManager |
void | swap (Texture &texture1, Texture &texture2) |
Textures provide images that can be used with image nodes, texture brushes and materials for use in 3D rendering or material brushes.
Textures can be set as render target. Texture can be set to as render target for either 2d node or render pass, but not both.
For details on the render target texture, see RenderTargetMode, CreateInfoNode2DRenderTarget, and CreateInfoRenderpassRenderTarget. Note that the CreateInfoRenderpassRenderTarget is intended for use with the deprecated LegacyRenderPass. For all other render passes, use CreateInfoNode2DRenderTarget, or to acquire the composition targets use the CompositionManager.
Texture can optionally maintain CPU accessible copy of texture data. See CreateInfoHostCopy2D. for CPU accessible texture data details.
In order to create a texture, you must prepare Texture::CreateInfo structure and make sure it is valid using CreateInfo::validate(), then create the texture with Texture::create(). If texture creation parameters are not valid, Texture::create() will throw an exception, which can stop program execution.
Two dimensional textures can be created from Image or by specifying size, format and features. Cubemap textures can be created from six Images or by specifying size, format and features.
You must specify texture filtering, addressing mode (also known as wrap mode), and mipmap settings in Texture::CreateInfo before you create the texture. Two dimensional textures which are shown without scaling can be created with default texture creation parameters, which improve performance and reduce memory usage. If you show texture content with scaling, consider using linear filtering and prefiltered mipmaps to reduce aliasing, with some performance and memory cost.
To create a two dimensional texture from image:
To load image from file and create texture:
To access the image data after you create a texture:
To create a two dimensional texture from image with custom sampler settings:
To create a cubemap texture from 6 face images:
Examples - Loading textures with Kanzi C++ API using ResourceManager
To load texture with ResourceManager using file URL:
To load texture with ResourceManager:
To update texture data of two dimensional texture base level image:
To update texture data of cubemap texture all mipmap level images:
To use texture as render target for 2D node:
To use texture as render target for renderpass:
To create a two dimensional texture and render to it through framebuffer:
To create a two dimensional texture with mipmaps and render to it through framebuffer:
To create a cubemap texture with mipmaps and render to it through framebuffers:
|
explicitprotected |
Creates texture from CreateInfo.
Texture will be deployed, if createInfo memory type includes Gpu.
|
explicitprotected |
Creates texture from an existing GL object handle.
Caller must also provide texture format, and size. glHandle should be a valid GL texture object. Optionally, kanzi::Texture can take ownership of the provided GL texture object, in which case destroying kanzi::Texture will also destroy the GL texture object. If ownership is not passed to kanzi::Texture, then GL texture must be deleted after kanzi::Texture. Do not delete GL texture object while kanzi::Texture exists.
domain | Domain for texture. |
type | Texture type. |
glHandle | Pre-existing valid GL texture object name. |
format | Format of the texture. |
mipmapLevelCount | Mipmap level count of the texture. |
width | Width of the texture. |
height | Height of the texture. |
takeOwnership | Should kanzi::Texture take ownership of provided GL texture object |
name | Name |
|
static |
Creates a texture with specified texture creation parameters.
In order to create a texture, you will need a CreateInfo structure that is filled with valid combination of texture creation parameters. You can use CreateInfo, CreateInfo2D, CreateInfoHostCopy2D, CreateInfoNode2DRenderTarget, CreateInfoRenderpassRenderTarget and CreateInfoCubemap constructors to create and initialize a texture creation parameter structure. After calling the constructor you can fine tune texture creation parameters.
You can check that parameters are valid by calling CreateInfo::validate().
If you pass CreateInfo that is not valid, Texture::create() will throw an exception and program execution may will terminate. To avoid exceptions for recoverable errors, use Renderer::adjust() on the create info prior to calling this function.
If createInfo memory type includes Gpu, texture will be deployed.
If createInfo memory type includes Ram, host copy of texture data will be made accessible. Otherwise, texture host copy will not be accessible.
domain | Domain for the texture. |
createInfo | Texture creation parameters. |
name | Name for the texture. |
|
static |
Creates texture from a pre-existing GL texture object.
Optionally, kanzi::Texture can take ownership of the provided GL texture object, in which case destroying kanzi::Texture will also destroy the GL texture object. If ownership is not passed to kanzi::Texture, then GL texture must be deleted after kanzi::Texture. Do not delete GL texture object while kanzi::Texture exists.
domain | Domain. |
type | Texture type. |
nativeHandle | Pre-existing native handle that identifies a valid GL texture object. |
takeOwnership | If true, texture will take ownership of the native resource (GL texture object). |
format | Format of the texture. |
mipmapLevelCount | Number of mipmap levels in the texture. |
width | Width of the texture. |
height | Height of the texture. |
name | Name. |
TextureType kanzi::Texture::getType | ( | ) | const |
Returns type of the texture.
NativeDeploymentTarget kanzi::Texture::getNativeDeploymentTarget | ( | ) | const |
Returns the native deployment target.
void kanzi::Texture::reattachFramebuffer | ( | ) |
Reattaches the internal framebuffer object.
Only renderbuffers and the color texture within the texture object will be used.
void kanzi::Texture::reattachFramebuffer | ( | RenderbufferSharedPtr | colorRenderbuffer | ) |
Reattaches the internal framebuffer object and includes the renderbuffer given as parameter.
The texture does not take ownership of the renderbuffer. The texture must not have an internal color texture.
colorRenderbuffer | Renderbuffer to use as the color target in the framebuffer. |
void kanzi::Texture::reattachFramebuffer | ( | TextureSharedPtr | depthTexture | ) |
Reattaches the internal framebuffer object and includes the depth texture given as parameter.
The texture does not take ownership of the depth texture. The texture must not have an internal depth render buffer.
depthTexture | Depth texture to use as the depth target in the framebuffer. |
void kanzi::Texture::generateMipmaps | ( | ) |
Generates the mipmaps from the base level image.
This reads from Gpu texture data from the base level images, and only updates Gpu texture data of the remaining mipmap images. If texture has host copy data, it remains unchanged.
void kanzi::Texture::setData | ( | Face | face, |
unsigned int | mipmapLevel, | ||
unsigned int | x, | ||
unsigned int | y, | ||
unsigned int | width, | ||
unsigned int | height, | ||
const kanzi::byte * | data ) |
Sets the texture data for the specified area in a texture.
The texture data is updated to the GPU memory, and to the CPU accessible copy of the texture, if the texture is created with such storage.
face | Which texture face to update. |
mipmapLevel | Which mipmap level to update. |
x,y,width,height | Specifies the rectangle to update. |
data | Texture data. |
void kanzi::Texture::setData | ( | unsigned int | mipmapLevel, |
unsigned int | x, | ||
unsigned int | y, | ||
unsigned int | width, | ||
unsigned int | height, | ||
const kanzi::byte * | data ) |
Sets the texture data for the specified area in the texture.
The texture data is updated to the GPU memory, and to the CPU accessible copy of the texture, if the texture is created with such storage.
mipmapLevel | Which mip level to update. |
x,y,width,height | Specifies the rectangle to update. |
data | Texture data. |
void kanzi::Texture::setData | ( | const kanzi::byte * | data | ) |
Sets the texture data for base level of a non-cubemap texture.
data | Texture data. |
NativeTextureHandle kanzi::Texture::getNativeHandle | ( | ) | const |
Gets native texture handle for the texture.
NativeFramebufferHandle kanzi::Texture::getNativeFramebufferHandle | ( | ) | const |
Gets native framebuffer handle for the texture.
|
inline |
Returns depth/stencil format of the texture.
|
inline |
Returns internal depth/stencil renderbuffer.
BitmapImageSharedPtr kanzi::Texture::getHostCopyImage | ( | Face | face, |
unsigned int | slice ) const |
Returns the host-side memory copy of texture data as an image, if available.
Returns as an image the copy of the host-side memory of the texture data, but does not create a copy of that image. Use this function only to retrieve data that was sent to the GPU from the CPU memory. To retrieve data rendered to a texture by the GPU use captureScreenToImage().
face | The texture face for which you want to get the data. For single textures, this value is FaceDefault. For cubemap textures, use a valid face for the texture. For example, FacePositiveX, or FaceNegativeZ. If you try to access an invalid texture face, the function throws an exception. |
slice | The texture slice for which you want to get the data. Slice applies to array and 3D textures. Currently this parameter must always be 0. If you access an invalid texture slice, the function throws an exception. |
BitmapImageSharedPtr kanzi::Texture::getHostCopyImage | ( | ) | const |
Returns the host-side memory copy of a non-cubemap texture, if available.
Returns as an image the copy of the host-side memory of the default face of a single texture data, but it does not create a copy of that image.
|
inline |
Changes the size of the texture.
Texture contents are undefined after resizing, user should assume they are destroyed. Specifying size identical to current size will cause resizing not to happen.
NOTE: Internal API and subject to change or removal.
width | New width. |
height | New height. |
Gets width divisor for automatic sizes.
Sets the wight divisor.
divisor | New width divisor. |
|
inline |
Indicates whether width is or should be automatically calculated.
Gets height divisor for automatic sizes.
Sets the height divisor.
divisor | New height divisor. |
|
inline |
Indicates whether height is or should be automatically calculated.
|
static |
|
static |
void kanzi::Texture::recreate | ( | CreateInfo & | createInfo | ) |
Validates the CreateInfo texture descriptor, creates a new texture and swaps it in place.
createInfo | The texture descriptor. |
Resolves the internal multisample anti-aliasing renderbuffer to a single sample texture, if necessary.
This is required after the rendering is complete if more than one sample is requested and the target device does not support implicit MSAA. In this case, Kanzi uses the internal renderbuffer.
renderer | Renderer. |
|
overrideprotectedvirtual |
Resource::reloadOverride() implementation.
Reimplemented from kanzi::Resource.
|
overrideprotectedvirtual |
Resource::reloadFromKzbOverride() implementation.
Reimplemented from kanzi::Resource.
|
overrideprotectedvirtual |
Resource::reloadFromFileOverride() implementation.
Reimplemented from kanzi::Resource.
Resource::getCPUMemoryUsageOverride() implementation.
Reimplemented from kanzi::Resource.
|
overrideprotectedvirtual |
GPUResource::invalidateOverride() implementation.
Reimplemented from kanzi::GPUResource.
|
overrideprotectedvirtual |
GPUResource::destroyOverride() implementation.
Reimplemented from kanzi::GPUResource.
|
overrideprotectedvirtual |
GpuResource::isDeployed() implementation.
Implements kanzi::GPUResource.
GpuResource::getGPUMemoryUsageOverride() implementation.
Reimplemented from kanzi::GPUResource.
|
overrideprotectedvirtual |
Surface::attachOverride() implementation.
Implements kanzi::Surface.
|
overrideprotectedvirtual |
Surface::getFormatOverride() implementation.
Implements kanzi::Surface.
Surface::getFeaturesOverride() implementation.
Implements kanzi::Surface.
Surface::getRenderTargetSampleCountOverride() implementation.
Implements kanzi::Surface.
Surface::getWidthOverride() implementation.
Implements kanzi::Surface.
Surface::getHeightOverride() implementation.
Implements kanzi::Surface.
Surface::getSliceCountOverride() implementation.
Implements kanzi::Surface.
Surface::getFaceCountOverride() implementation.
Implements kanzi::Surface.
Surface::getMipmapLevelCountOverride() implementation.
Implements kanzi::Surface.
|
staticprotected |
Helper function to allocate host images.
There are three cases:
createInfo | Texture create info. |
|
staticprotected |
|
staticprotected |
Helper function to create GL framebuffer object.
Only dummy handle will be created if create info specifies RamOnly texture, or if texture rendertarget mode is not RenderTargetModeInternal.
|
protected |
|
protected |
Helper function to setup GL framebuffer and renderbuffer state Called as part of texture construction.
Texture internal variables must already be initialized.
renderer | Renderer. |
colorRenderbuffer | Color renderbuffer not owned by the texture to attach. |
depthTexture | Depth texture not owned by this texture to attach. |
|
friend |