|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
Immutable creation parameters of a 2D texture or 2D texture array. More...
#include <GfxEnums.hpp>
Public Member Functions | |
| bool | layered () const |
| An array or a volume: pixels given slice by slice, fixed at creation, never an attachment. | |
Public Attributes | |
| u32 | width = 1 |
| u32 | height = 1 |
| u32 | samples = 1 |
| GfxPixelFormat | format = GfxPixelFormat::RGBA8 |
| TextureFilter | minFilter = TextureFilter::Linear |
| TextureFilter | magFilter = TextureFilter::Linear |
| TextureWrap | wrapS = TextureWrap::ClampToEdge |
| TextureWrap | wrapT = TextureWrap::ClampToEdge |
| bool | mipmaps = false |
| bool | flipY = false |
| bool | storage = false |
| u32 | layers = 1 |
| bool | volume = false |
| bool | asyncShareable = false |
| Allow a native compute queue to share this single-sample colour target. | |
Immutable creation parameters of a 2D texture or 2D texture array.
flipY applies to the initial pixel upload only (WebGL upload state; native backends flip CPU-side at load time).
Definition at line 414 of file GfxEnums.hpp.
|
inline |
An array or a volume: pixels given slice by slice, fixed at creation, never an attachment.
Definition at line 444 of file GfxEnums.hpp.
References layers, and volume.
Referenced by esengine::GLDevice::copyFramebufferColor(), and esengine::GfxDevice::createTexture().
| bool esengine::TextureDesc::asyncShareable = false |
Allow a native compute queue to share this single-sample colour target.
Definition at line 441 of file GfxEnums.hpp.
| bool esengine::TextureDesc::flipY = false |
Definition at line 427 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateTexture(), esengine::GfxDevice::createTexture(), and esengine::GfxDevice::updateTexture().
| GfxPixelFormat esengine::TextureDesc::format = GfxPixelFormat::RGBA8 |
Definition at line 421 of file GfxEnums.hpp.
Referenced by esengine::WebGPUDevice::backendCreateCompressedTexture(), esengine::GLDevice::backendCreateFramebuffer(), esengine::GLDevice::backendCreateTexture(), esengine::GLDevice::backendUpdateTexture(), esengine::Texture::createFromExternalId(), esengine::GfxDevice::createTexture(), and esengine::GfxDevice::updateTexture().
| u32 esengine::TextureDesc::height = 1 |
Definition at line 416 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateCompressedTexture(), esengine::WebGPUDevice::backendCreateCompressedTexture(), esengine::GLDevice::backendCreateTexture(), esengine::GLDevice::copyFramebufferColor(), esengine::Texture::createCompressed(), esengine::Texture::createFromExternalId(), and esengine::GfxDevice::updateTexture().
| u32 esengine::TextureDesc::layers = 1 |
Above 1 the texture is a 2D ARRAY of this many layers, sampled through sampler2DArray / texture_2d_array. Its pixels are the layers back to back, each width * height texels. Colour, single-sample and sampled only: never an attachment, a storage target or compressed, and flipY does not apply.
Definition at line 434 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateTexture(), and layered().
| TextureFilter esengine::TextureDesc::magFilter = TextureFilter::Linear |
Definition at line 423 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateCompressedTexture(), esengine::WebGPUDevice::backendCreateCompressedTexture(), esengine::GLDevice::backendCreateTexture(), esengine::GLDevice::backendSetTextureParams(), esengine::WebGPUDevice::backendSetTextureParams(), and esengine::Texture::createCompressed().
| TextureFilter esengine::TextureDesc::minFilter = TextureFilter::Linear |
Definition at line 422 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateCompressedTexture(), esengine::WebGPUDevice::backendCreateCompressedTexture(), esengine::GLDevice::backendCreateTexture(), esengine::WebGPUDevice::backendSetTextureParams(), and esengine::Texture::createCompressed().
| bool esengine::TextureDesc::mipmaps = false |
Definition at line 426 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateTexture(), esengine::GLDevice::backendSetTextureParams(), esengine::Texture::createCompressed(), esengine::GfxDevice::createTexture(), and esengine::GfxDevice::updateTexture().
| u32 esengine::TextureDesc::samples = 1 |
Samples per pixel. Above 1 the attachment is MULTISAMPLED and cannot be sampled by a shader — it is only ever drawn into and resolved from. Ask GfxDevice::maxSamples() first; a backend that answers 1 wants 1.
Definition at line 420 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateTexture(), esengine::GLDevice::copyFramebufferColor(), and esengine::GfxDevice::createTexture().
| bool esengine::TextureDesc::storage = false |
Writable from a compute shader as a storage texture. RGBA8, RGBA16F and RGBA32F only, and only on a device that supportsCompute(); a texture asked for this elsewhere is created without it.
Definition at line 430 of file GfxEnums.hpp.
Referenced by esengine::GfxDevice::createTexture().
| bool esengine::TextureDesc::volume = false |
A 3D texture, layers deep, sampled through sampler3D / texture_3d: filtered across its depth as well as its rows, which an array never is. Its pixels are its slices back to back, as an array's layers are, and it carries every restriction an array does.
Definition at line 438 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateTexture(), esengine::GfxDevice::createTexture(), and layered().
| u32 esengine::TextureDesc::width = 1 |
Definition at line 415 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateCompressedTexture(), esengine::WebGPUDevice::backendCreateCompressedTexture(), esengine::GLDevice::backendCreateTexture(), esengine::GLDevice::copyFramebufferColor(), esengine::Texture::createCompressed(), esengine::Texture::createFromExternalId(), and esengine::GfxDevice::updateTexture().
| TextureWrap esengine::TextureDesc::wrapS = TextureWrap::ClampToEdge |
Definition at line 424 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateCompressedTexture(), esengine::WebGPUDevice::backendCreateCompressedTexture(), esengine::GLDevice::backendCreateTexture(), esengine::GLDevice::backendSetTextureParams(), esengine::WebGPUDevice::backendSetTextureParams(), and esengine::Texture::createCompressed().
| TextureWrap esengine::TextureDesc::wrapT = TextureWrap::ClampToEdge |
Definition at line 425 of file GfxEnums.hpp.
Referenced by esengine::GLDevice::backendCreateCompressedTexture(), esengine::WebGPUDevice::backendCreateCompressedTexture(), esengine::GLDevice::backendCreateTexture(), esengine::GLDevice::backendSetTextureParams(), esengine::WebGPUDevice::backendSetTextureParams(), and esengine::Texture::createCompressed().