light/modules/renderer/private/gl/buffers.hpp
light7734 d83e269432
Some checks reported errors
continuous-integration/drone/push Build was killed
refactor: move renderer gl/dx files to private section
2025-07-23 10:11:55 +03:30

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