LiteFX::Rendering::GraphicsFactory::tryCreateTexture¶
Tries to create a texture.
Synopses¶
Declared in <litefx/rendering.hpp>
Tries to create a texture.
[[dllimport, dllexport]] bool tryCreateTexture(
SharedPtr<IImage>& image,
Format format,
Size3d const& size,
ImageDimensions dimension = ImageDimensions::DIM_2,
UInt32 levels = 1,
UInt32 layers = 1,
MultiSamplingLevel samples = MultiSamplingLevel::x1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;
Tries to create a texture.
virtual bool tryCreateTexture(
SharedPtr<TImage>& image,
Format format,
Size3d const& size,
ImageDimensions dimension = ImageDimensions::DIM_2,
UInt32 levels = 1,
UInt32 layers = 1,
MultiSamplingLevel samples = MultiSamplingLevel::x1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;
Tries to create a texture.
[[dllimport, dllexport]] bool tryCreateTexture(
SharedPtr<IImage>& image,
String const& name,
Format format,
Size3d const& size,
ImageDimensions dimension = ImageDimensions::DIM_2,
UInt32 levels = 1,
UInt32 layers = 1,
MultiSamplingLevel samples = MultiSamplingLevel::x1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;
Tries to create a texture.
virtual bool tryCreateTexture(
SharedPtr<TImage>& image,
String const& name,
Format format,
Size3d const& size,
ImageDimensions dimension = ImageDimensions::DIM_2,
UInt32 levels = 1,
UInt32 layers = 1,
MultiSamplingLevel samples = MultiSamplingLevel::x1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;
Return Value¶
true, if the texture was created successfully and false otherwise.
Parameters¶
| Name | Description |
|---|---|
| image | The instance of the buffer, or nullptr, if the texture could not be allocated. |
| format | The format of the texture image. |
| size | The dimensions of the texture. |
| dimension | The dimensionality of the texture. |
| layers | The number of layers (slices) in this texture. |
| levels | The number of mip map levels of the texture. |
| samples | The number of samples, the texture should be sampled with. |
| usage | The intended usage for the buffer. |
| allocationBehavior | The behavior controlling what happens if currently there is not enough memory available for the resource. |
| name | The name of the texture image. |