Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::glGenericVertexData Class Referencefinal

#include <glGenericVertexData.h>

+ Inheritance diagram for Divide::glGenericVertexData:

Classes

struct  GenericBufferImpl
 
struct  IndexBufferEntry
 

Public Member Functions

 glGenericVertexData (GFXDevice &context, U16 ringBufferLength, const std::string_view name)
 
void reset () override
 Also clears GPU memory.
 
BufferLock setIndexBuffer (const IndexBuffer &indices) override
 
BufferLock setBuffer (const SetBufferParams &params) override
 Specify the structure and data of the given buffer.
 
BufferLock updateBuffer (U32 buffer, U32 elementCountOffset, U32 elementCountRange, bufferPtr data) override
 Update the elementCount worth of data contained in the buffer starting from elementCountOffset size offset.
 
- Public Member Functions inherited from Divide::GenericVertexData
 GenericVertexData (GFXDevice &context, U16 ringBufferLength, const std::string_view name)
 
virtual BufferLock setIndexBuffer (const IndexBuffer &indices)=0
 
virtual void reset ()=0
 Also clears GPU memory.
 
virtual BufferLock setBuffer (const SetBufferParams &params)=0
 
virtual BufferLock updateBuffer (U32 buffer, U32 elementCountOffset, U32 elementCountRange, bufferPtr data)=0
 
- Public Member Functions inherited from Divide::VertexDataInterface
 VertexDataInterface (GFXDevice &context, const std::string_view name)
 
virtual ~VertexDataInterface () override
 
virtual void draw (const GenericDrawCommand &command, VDIUserData *data)=0
 
 PROPERTY_R (Handle, handle)
 
 PROPERTY_RW (bool, primitiveRestartRequired, false)
 
- Public Member Functions inherited from Divide::GUIDWrapper
 GUIDWrapper () noexcept
 
 GUIDWrapper (const GUIDWrapper &old) noexcept
 
 GUIDWrapper (GUIDWrapper &&old) noexcept
 
virtual ~GUIDWrapper ()=default
 
FORCE_INLINE I64 getGUID () const noexcept
 
GUIDWrapperoperator= (const GUIDWrapper &old)=delete
 
GUIDWrapperoperator= (GUIDWrapper &&other)=delete
 
- Public Member Functions inherited from Divide::GraphicsResource
virtual ~GraphicsResource ()
 
GFXDevicecontext () const noexcept
 
U64 nameHash () const noexcept
 
- Public Member Functions inherited from Divide::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (NonCopyable &&)=default
 
- Public Member Functions inherited from Divide::NonMovable
 NonMovable (NonMovable &&)=delete
 
NonMovableoperator= (NonMovable &&)=delete
 
 NonMovable (const NonMovable &)=default
 
NonMovableoperator= (const NonMovable &)=default
 
- Public Member Functions inherited from Divide::RingBuffer
 RingBuffer (U16 queueLength) noexcept
 
virtual ~RingBuffer ()=default
 
virtual void resize (U16 queueLength) noexcept
 
U16 queueLength () const noexcept
 
I32 queueIndex () const noexcept
 
void incQueue () noexcept
 
void decQueue () noexcept
 

Protected Member Functions

void draw (const GenericDrawCommand &command, VDIUserData *data) override
 Submit a draw command to the GPU using this object and the specified command.
 
void bindBufferInternal (const SetBufferParams::BufferBindConfig &bindConfig)
 
- Protected Member Functions inherited from Divide::GraphicsResource
 GraphicsResource (GFXDevice &context, Type type, I64 GUID, U64 nameHash)
 
- Protected Member Functions inherited from Divide::NonCopyable
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 
- Protected Member Functions inherited from Divide::NonMovable
 NonMovable ()=default
 
 ~NonMovable ()=default
 

Private Attributes

eastl::fixed_vector< IndexBufferEntry, 1, true > _idxBuffers
 
eastl::fixed_vector< GenericBufferImpl, 1, true > _bufferObjects
 
SharedMutex _idxBufferLock
 

Friends

class GFXDevice
 
class glVertexArray
 

Additional Inherited Members

- Public Types inherited from Divide::VertexDataInterface
using Handle = PoolHandle
 
using VDIPool = ObjectPool< VertexDataInterface, 256, true >
 
- Public Types inherited from Divide::GraphicsResource
enum class  Type : U8 {
  RENDER_TARGET , SHADER_BUFFER , BUFFER , SHADER ,
  SHADER_PROGRAM , TEXTURE , COUNT
}
 
- Static Public Member Functions inherited from Divide::GUIDWrapper
static I64 generateGUID () noexcept
 
- Static Public Attributes inherited from Divide::VertexDataInterface
static constexpr Handle INVALID_VDI_HANDLE {U16_MAX, 0u}
 
static VDIPool s_VDIPool
 
- Protected Attributes inherited from Divide::GenericVertexData
Str< 256 > _name
 
- Protected Attributes inherited from Divide::GUIDWrapper
const I64 _guid
 
- Protected Attributes inherited from Divide::GraphicsResource
GFXDevice_context
 

Detailed Description

Definition at line 42 of file glGenericVertexData.h.

Constructor & Destructor Documentation

◆ glGenericVertexData()

Divide::glGenericVertexData::glGenericVertexData ( GFXDevice context,
U16  ringBufferLength,
const std::string_view  name 
)

Definition at line 16 of file glGenericVertexData.cpp.

Member Function Documentation

◆ bindBufferInternal()

void Divide::glGenericVertexData::bindBufferInternal ( const SetBufferParams::BufferBindConfig &  bindConfig)
protected

Definition at line 272 of file glGenericVertexData.cpp.

◆ draw()

void Divide::glGenericVertexData::draw ( const GenericDrawCommand command,
VDIUserData data 
)
overrideprotectedvirtual

Submit a draw command to the GPU using this object and the specified command.

Implements Divide::VertexDataInterface.

Definition at line 39 of file glGenericVertexData.cpp.

◆ reset()

void Divide::glGenericVertexData::reset ( )
overridevirtual

Also clears GPU memory.

Implements Divide::GenericVertexData.

Definition at line 21 of file glGenericVertexData.cpp.

◆ setBuffer()

BufferLock Divide::glGenericVertexData::setBuffer ( const SetBufferParams params)
overridevirtual

Specify the structure and data of the given buffer.

Implements Divide::GenericVertexData.

Definition at line 172 of file glGenericVertexData.cpp.

◆ setIndexBuffer()

BufferLock Divide::glGenericVertexData::setIndexBuffer ( const IndexBuffer indices)
overridevirtual

Implements Divide::GenericVertexData.

Definition at line 80 of file glGenericVertexData.cpp.

◆ updateBuffer()

BufferLock Divide::glGenericVertexData::updateBuffer ( U32  buffer,
U32  elementCountOffset,
U32  elementCountRange,
bufferPtr  data 
)
overridevirtual

Update the elementCount worth of data contained in the buffer starting from elementCountOffset size offset.

Implements Divide::GenericVertexData.

Definition at line 229 of file glGenericVertexData.cpp.

Friends And Related Function Documentation

◆ GFXDevice

friend class GFXDevice
friend

Definition at line 53 of file glGenericVertexData.h.

◆ glVertexArray

friend class glVertexArray
friend

Definition at line 54 of file glGenericVertexData.h.

Member Data Documentation

◆ _bufferObjects

eastl::fixed_vector<GenericBufferImpl,1,true> Divide::glGenericVertexData::_bufferObjects
private

Definition at line 77 of file glGenericVertexData.h.

◆ _idxBufferLock

SharedMutex Divide::glGenericVertexData::_idxBufferLock
private

Definition at line 79 of file glGenericVertexData.h.

◆ _idxBuffers

eastl::fixed_vector<IndexBufferEntry,1,true> Divide::glGenericVertexData::_idxBuffers
private

Definition at line 76 of file glGenericVertexData.h.


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