Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::TextureSpecification Struct Reference

Texture creation parameters. More...

#include <Texture.hpp>

Public Attributes

u32 width = 1
 Texture width in pixels.
u32 height = 1
 Texture height in pixels.
TextureFormat format = TextureFormat::RGBA8
 Pixel format.
TextureFilter minFilter = TextureFilter::Linear
 Minification filter.
TextureFilter magFilter = TextureFilter::Linear
 Magnification filter.
TextureWrap wrapS = TextureWrap::Repeat
 Horizontal wrap mode.
TextureWrap wrapT = TextureWrap::Repeat
 Vertical wrap mode.
bool generateMips = true
 Generate mipmaps automatically.
u32 layers = 1
 Above 1, a 2D texture array of this many layers (see TextureDesc::layers).
bool volume = false
 A 3D texture layers deep (see TextureDesc::volume).

Detailed Description

Texture creation parameters.

Specifies all properties for texture creation including dimensions, format, filtering, and wrapping.

spec.width = 256;
spec.height = 256;
auto texture = Texture::create(spec);
static Unique< Texture > create(GfxDevice &device, GfxContent content, const TextureSpecification &spec)
Creates an empty texture from specification.
Definition Texture.cpp:83
@ Nearest
No interpolation (pixelated look).
Definition GfxEnums.hpp:58
@ RGBA8
4 channels, 8 bits each (32 bpp)
Definition Texture.hpp:48
Texture creation parameters.
Definition Texture.hpp:74
TextureFilter minFilter
Minification filter.
Definition Texture.hpp:82
u32 height
Texture height in pixels.
Definition Texture.hpp:78
TextureFormat format
Pixel format.
Definition Texture.hpp:80
u32 width
Texture width in pixels.
Definition Texture.hpp:76

Definition at line 74 of file Texture.hpp.

Member Data Documentation

◆ format

◆ generateMips

bool esengine::TextureSpecification::generateMips = true

Generate mipmaps automatically.

Definition at line 90 of file Texture.hpp.

Referenced by esengine::Texture::createRaw(), and esengine::Texture::createVolume().

◆ height

◆ layers

u32 esengine::TextureSpecification::layers = 1

Above 1, a 2D texture array of this many layers (see TextureDesc::layers).

Definition at line 92 of file Texture.hpp.

Referenced by esengine::resource::ResourceManager::createTextureArray(), esengine::Texture::createVolume(), and esengine::rm_createTextureArray().

◆ magFilter

TextureFilter esengine::TextureSpecification::magFilter = TextureFilter::Linear

Magnification filter.

Definition at line 84 of file Texture.hpp.

◆ minFilter

TextureFilter esengine::TextureSpecification::minFilter = TextureFilter::Linear

Minification filter.

Definition at line 82 of file Texture.hpp.

◆ volume

bool esengine::TextureSpecification::volume = false

A 3D texture layers deep (see TextureDesc::volume).

Definition at line 94 of file Texture.hpp.

Referenced by esengine::Texture::createVolume().

◆ width

◆ wrapS

TextureWrap esengine::TextureSpecification::wrapS = TextureWrap::Repeat

Horizontal wrap mode.

Definition at line 86 of file Texture.hpp.

Referenced by esengine::Texture::createRaw(), and esengine::Texture::createVolume().

◆ wrapT

TextureWrap esengine::TextureSpecification::wrapT = TextureWrap::Repeat

Vertical wrap mode.

Definition at line 88 of file Texture.hpp.

Referenced by esengine::Texture::createRaw(), and esengine::Texture::createVolume().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/renderer/rhi/Texture.hpp