Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #2 Co-authored-by: light7734 <light7734@tuta.io> Co-committed-by: light7734 <light7734@tuta.io>
61 lines
921 B
C++
61 lines
921 B
C++
#pragma once
|
|
|
|
|
|
#include <renderer/buffers.hpp>
|
|
|
|
namespace lt {
|
|
|
|
class glConstantBuffer: public ConstantBuffer
|
|
{
|
|
public:
|
|
glConstantBuffer(ConstantBufferIndex index, unsigned int size);
|
|
|
|
~glConstantBuffer() override;
|
|
|
|
void bind() override;
|
|
|
|
auto map() -> void * override;
|
|
|
|
void un_map() override;
|
|
|
|
private:
|
|
unsigned int m_buffer_id;
|
|
|
|
unsigned int m_index;
|
|
};
|
|
|
|
class glVertexBuffer: public VertexBuffer
|
|
{
|
|
public:
|
|
glVertexBuffer(float *vertices, unsigned int stride, unsigned int count);
|
|
|
|
~glVertexBuffer() override;
|
|
|
|
void bind() override;
|
|
|
|
void un_bind() override;
|
|
|
|
auto map() -> void * override;
|
|
|
|
void un_map() override;
|
|
|
|
private:
|
|
unsigned int m_buffer_id;
|
|
};
|
|
|
|
class glIndexBuffer: public IndexBuffer
|
|
{
|
|
public:
|
|
glIndexBuffer(unsigned int *indices, unsigned int count);
|
|
|
|
~glIndexBuffer() override;
|
|
|
|
void bind() override;
|
|
|
|
void un_bind() override;
|
|
|
|
private:
|
|
unsigned int m_buffer_id;
|
|
};
|
|
|
|
} // namespace lt
|