KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::OpenGLIndexBuffer Class Reference

OpenGL's index buffer class, used in agnostic Mesh instance. More...

#include <OpenGLBuffer.h>

Inheritance diagram for Karma::OpenGLIndexBuffer:
Collaboration diagram for Karma::OpenGLIndexBuffer:

Public Member Functions

 OpenGLIndexBuffer (uint32_t *indices, uint32_t count)
 Constructor.
 
virtual ~OpenGLIndexBuffer ()
 Deletes the buffers and cleans up.
 
virtual void Bind () const override
 Binds the indexbuffer.
 
virtual void UnBind () const override
 UnBinds the buffer.
 
virtual uint32_t GetCount () const override
 Returns the length of indexbuffer.
 

Additional Inherited Members

- Static Public Member Functions inherited from Karma::IndexBuffer
static IndexBufferCreate (uint32_t *vertices, uint32_t size)
 

Detailed Description

OpenGL's index buffer class, used in agnostic Mesh instance.

Since
Karma 1.0.0

Constructor & Destructor Documentation

◆ OpenGLIndexBuffer()

Karma::OpenGLIndexBuffer::OpenGLIndexBuffer ( uint32_t * indices,
uint32_t count )

Constructor.

Initializes the relevant buffers and uploads them to GPU.

Parameters
indicesThe array of floats containing indexbuffer data
countThe length of the indexbuffer array
Since
Karma 1.0.0

◆ ~OpenGLIndexBuffer()

Karma::OpenGLIndexBuffer::~OpenGLIndexBuffer ( )
virtual

Deletes the buffers and cleans up.

Since
Karma 1.0.0

Member Function Documentation

◆ Bind()

void Karma::OpenGLIndexBuffer::Bind ( ) const
overridevirtual

Binds the indexbuffer.

See also
https://registry.khronos.org/OpenGL-Refpages/gl4/html/glBindBuffer.xhtml
Since
Karma 1.0.0

Implements Karma::IndexBuffer.

◆ GetCount()

virtual uint32_t Karma::OpenGLIndexBuffer::GetCount ( ) const
inlineoverridevirtual

Returns the length of indexbuffer.

Since
Karma 1.0.0

Implements Karma::IndexBuffer.

◆ UnBind()

void Karma::OpenGLIndexBuffer::UnBind ( ) const
overridevirtual

UnBinds the buffer.

Since
Karma 1.0.0

Implements Karma::IndexBuffer.


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