NAP
Public Member Functions | Public Attributes | List of all members
BaseVertexAttribute Class Referenceabstract

#include <vertexattribute.h>

Public Member Functions

 BaseVertexAttribute ()
 
virtual void * getRawData ()=0
 
virtual VkFormat getFormat () const =0
 
virtual int getCount () const =0
 
virtual size_t getCapacity () const =0
 
virtual void reserve (size_t numElements)=0
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

std::string mAttributeID
 Name/ID of the attribute. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Base class for vertex attribute. Describes what kind of data will be present in the attribute. This base class is necessary to have a type independent way to update the GPU meshes.

Inheritance diagram for BaseVertexAttribute:
[legend]
Collaboration diagram for BaseVertexAttribute:
[legend]

Constructor & Destructor Documentation

◆ BaseVertexAttribute()

Member Function Documentation

◆ getCapacity()

virtual size_t getCapacity ( ) const
pure virtual
Returns
The internally allocated memory size.

Implemented in VertexAttribute< ELEMENTTYPE >.

◆ getCount()

virtual int getCount ( ) const
pure virtual
Returns
Should return amount of element in the buffer.

Implemented in VertexAttribute< ELEMENTTYPE >.

◆ getFormat()

virtual VkFormat getFormat ( ) const
pure virtual
Returns
Should return GL type of the attribute. This is used during construction of the vertex attributes on the GPU.

Implemented in VertexAttribute< ELEMENTTYPE >.

◆ getRawData()

virtual void* getRawData ( )
pure virtual
Returns
Should return type-less data for the vertex attribute buffer. This is a type independent way to update meshes to the GPU.

Implemented in VertexAttribute< ELEMENTTYPE >, and VertexAttribute< glm::vec3 >.

◆ reserve()

virtual void reserve ( size_t  numElements)
pure virtual

Reserves CPU memory for the buffer.

Implemented in VertexAttribute< ELEMENTTYPE >, and VertexAttribute< glm::vec3 >.

Member Data Documentation

◆ mAttributeID

std::string mAttributeID

Name/ID of the attribute.