Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
GPUMesh Class Reference

Store vertices and triangles data on the GPU, linked by an array object. More...

#include <GPUObjects.hpp>

Classes

struct  State
 Internal GPU state for pipeline compatibility. More...
 

Public Member Functions

void clean ()
 
bool isEquivalent (const GPUMesh &other) const
 
 GPUMesh ()=default
 
GPUMeshoperator= (const GPUMesh &)=delete
 
 GPUMesh (const GPUMesh &)=delete
 
GPUMeshoperator= (GPUMesh &&)=delete
 
 GPUMesh (GPUMesh &&)=delete
 

Public Attributes

std::unique_ptr< BuffervertexBuffer
 Vertex data buffer.
 
std::unique_ptr< BufferindexBuffer
 Index element buffer.
 
size_t count = 0
 The number of vertices (cached).
 
State state
 Internal GPU layout.
 

Detailed Description

Store vertices and triangles data on the GPU, linked by an array object.

Constructor & Destructor Documentation

◆ GPUMesh() [1/3]

GPUMesh::GPUMesh ( )
default

Constructor.

◆ GPUMesh() [2/3]

GPUMesh::GPUMesh ( const GPUMesh )
delete

Copy constructor (disabled).

◆ GPUMesh() [3/3]

GPUMesh::GPUMesh ( GPUMesh &&  )
delete

Move constructor.

Member Function Documentation

◆ clean()

void GPUMesh::clean ( )

Clean internal GPU buffers.

◆ isEquivalent()

bool GPUMesh::isEquivalent ( const GPUMesh other) const

Test if two meshes have the same input configuration (attributes,...)

Parameters
otherthe mesh to compare to
Returns
true if the two are equivalent for a pipeline

◆ operator=() [1/2]

GPUMesh & GPUMesh::operator= ( const GPUMesh )
delete

Copy assignment operator (disabled).

Returns
a reference to the object assigned to

◆ operator=() [2/2]

GPUMesh & GPUMesh::operator= ( GPUMesh &&  )
delete

Move assignment operator .

Returns
a reference to the object assigned to

The documentation for this class was generated from the following files: