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

#include <GfxResourceRegistry.hpp>

Public Member Functions

 GfxTextureRecord (const TextureDesc &d, GfxContent c)

Public Attributes

TextureDesc desc
GfxContent content
std::vector< u8 > bytes
bool compressed = false
GfxCompressedFormat compressedFormat = GfxCompressedFormat::ETC2_RGBA8
u32 mipLevels = 1
bool realized = false
bool owed = false
u64 revision = nextRevision()
bool externallyWritable = false
 Attached for rendering or backed by a host texture.

Detailed Description

Definition at line 50 of file GfxResourceRegistry.hpp.

Constructor & Destructor Documentation

◆ GfxTextureRecord()

esengine::GfxTextureRecord::GfxTextureRecord ( const TextureDesc & d,
GfxContent c )
inline

Definition at line 51 of file GfxResourceRegistry.hpp.

References content, and desc.

Member Data Documentation

◆ bytes

std::vector<u8> esengine::GfxTextureRecord::bytes

Retained level-0 pixels in upload order (rows as GL stores them), or the initial pixels of a texture created while the device was lost.

Definition at line 57 of file GfxResourceRegistry.hpp.

Referenced by esengine::GfxDevice::createCompressedTexture(), and esengine::GfxDevice::createTexture().

◆ compressed

bool esengine::GfxTextureRecord::compressed = false

◆ compressedFormat

GfxCompressedFormat esengine::GfxTextureRecord::compressedFormat = GfxCompressedFormat::ETC2_RGBA8

◆ content

GfxContent esengine::GfxTextureRecord::content

Definition at line 54 of file GfxResourceRegistry.hpp.

Referenced by GfxTextureRecord().

◆ desc

TextureDesc esengine::GfxTextureRecord::desc

Definition at line 53 of file GfxResourceRegistry.hpp.

Referenced by GfxTextureRecord(), and esengine::GfxDevice::createTexture().

◆ externallyWritable

bool esengine::GfxTextureRecord::externallyWritable = false

Attached for rendering or backed by a host texture.

Definition at line 67 of file GfxResourceRegistry.hpp.

◆ mipLevels

u32 esengine::GfxTextureRecord::mipLevels = 1

◆ owed

bool esengine::GfxTextureRecord::owed = false

Definition at line 62 of file GfxResourceRegistry.hpp.

◆ realized

bool esengine::GfxTextureRecord::realized = false

Definition at line 61 of file GfxResourceRegistry.hpp.

◆ revision

u64 esengine::GfxTextureRecord::revision = nextRevision()

Changes whenever the device is given its content (made, updated, restored, adopted) or its sampling: see core/Revision.hpp and GfxDevice::textureRevision. Not when the GPU writes it (a render target, a storage texture) or a host swaps what an imported texture shows: those are not uploads this device sees.

Definition at line 66 of file GfxResourceRegistry.hpp.


The documentation for this struct was generated from the following file: