light/Engine/src/Platform/GraphicsAPI/OpenGL/glVertexLayout.h

32 lines
592 B
C
Raw Normal View History

2021-05-29 15:40:15 +04:30
#pragma once
#include "Base.h"
#include "Graphics/VertexLayout.h"
namespace Light {
struct glVertexElementDesc
{
unsigned int type;
unsigned int count;
unsigned int typeSize;
unsigned int offset;
};
class glVertexLayout : public VertexLayout
{
private:
unsigned int m_ArrayID;
public:
2021-06-02 17:20:15 +04:30
glVertexLayout(VertexBuffer* buffer, const std::vector<std::pair<std::string, VertexElementType>>& elements);
2021-05-29 15:40:15 +04:30
~glVertexLayout();
void Bind() override;
void UnBind() override;
private:
glVertexElementDesc GetElementDesc(VertexElementType type, unsigned int offset);
};
}