SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::MeshHandle Struct Reference

#include <MeshBatch.hpp>

Public Member Functions

 MeshHandle ()
 MeshHandle (const MeshHandle &)
 MeshHandle (MeshHandle &&) noexcept
 ~MeshHandle ()
bool IsValid () const
MeshHandleoperator= (const MeshHandle &)
MeshHandleoperator= (MeshHandle &&) noexcept

Public Attributes

RefPtr< RenderEngine::BufferBaseindexBuffer
uint32_t indexCount = 0
RefPtr< RenderEngine::BufferBasevertexBuffer
uint32_t vertexFormat = 0
 Registered custom vertex layout of this mesh; 0 means the engine default Vertex.

Detailed Description

Lightweight handle for GPU mesh buffers created outside the GameObject/Component system, for bulk draw submission with minimal per-object overhead (no per-draw component work).

Definition at line 23 of file MeshBatch.hpp.

Constructor & Destructor Documentation

◆ MeshHandle() [1/3]

Sleak::MeshHandle::MeshHandle ( )
default

Special members defined out-of-line in MeshBatch.cpp so RefPtr<BufferBase>::release() sees a complete BufferBase type; a forward declaration alone would skip ~BufferBase() and leak the GPU buffer.

◆ ~MeshHandle()

Sleak::MeshHandle::~MeshHandle ( )
default

◆ MeshHandle() [2/3]

Sleak::MeshHandle::MeshHandle ( const MeshHandle & )
default

◆ MeshHandle() [3/3]

Sleak::MeshHandle::MeshHandle ( MeshHandle && )
defaultnoexcept

Member Function Documentation

◆ IsValid()

bool Sleak::MeshHandle::IsValid ( ) const
inline

Definition at line 40 of file MeshBatch.hpp.

◆ operator=() [1/2]

MeshHandle & Sleak::MeshHandle::operator= ( const MeshHandle & )
default

◆ operator=() [2/2]

MeshHandle & Sleak::MeshHandle::operator= ( MeshHandle && )
defaultnoexcept

Member Data Documentation

◆ indexBuffer

RefPtr<RenderEngine::BufferBase> Sleak::MeshHandle::indexBuffer

Definition at line 25 of file MeshBatch.hpp.

◆ indexCount

uint32_t Sleak::MeshHandle::indexCount = 0

Definition at line 26 of file MeshBatch.hpp.

◆ vertexBuffer

RefPtr<RenderEngine::BufferBase> Sleak::MeshHandle::vertexBuffer

Definition at line 24 of file MeshBatch.hpp.

◆ vertexFormat

uint32_t Sleak::MeshHandle::vertexFormat = 0

Registered custom vertex layout of this mesh; 0 means the engine default Vertex.

Definition at line 28 of file MeshBatch.hpp.