tec::VertexBufferObject

#include <vertex-buffer-object.hpp>

Public Functions

Name
VertexBufferObject(vertex::FormatCode _load_format)
~VertexBufferObject()
void Destroy()
Delete the underlying GL buffers.
GLuint GetVAO()
Get the ID of the vertex array object. note: this method is not const, since GL can modify the ID.
VertexGroup * GetVertexGroup(const std::size_t vertex_group_number)
Gets the specified VertexGroup.
std::size_t GetVertexGroupCount() const
Gets the number of vertex groups store in the buffer.
bool IsDynamic() const
bool Update()
bool Load(std::shared_ptr< MeshFile > mesh)

Public Functions Documentation

function VertexBufferObject

VertexBufferObject(
    vertex::FormatCode _load_format
)

function ~VertexBufferObject

~VertexBufferObject()

function Destroy

void Destroy()

Delete the underlying GL buffers.

function GetVAO

inline GLuint GetVAO()

Get the ID of the vertex array object. note: this method is not const, since GL can modify the ID.

Return: GLuint the GL texture ID.

function GetVertexGroup

VertexGroup * GetVertexGroup(
    const std::size_t vertex_group_number
)

Gets the specified VertexGroup.

Parameters:

  • size_t vertex_group_number Number of the vertex group to get.

Return: VertexGroup& The specified VertexGroup.

function GetVertexGroupCount

std::size_t GetVertexGroupCount() const

Gets the number of vertex groups store in the buffer.

Return: size_t The number of vertex groups.

function IsDynamic

bool IsDynamic() const

Return: true If the vertex buffer object was created dynamic

function Update

bool Update()

Called to update dynamic vertex buffer object.

function Load

bool Load(
    std::shared_ptr< MeshFile > mesh
)

Parameters:

Return: true if the load was successful

Loads a mesh into a vertex buffer object. note: calls Load(const std::vector& verts, const std::vector& indices).


Updated on 2022-07-24 at 19:27:35 +0000