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

32 lines
561 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:
glVertexLayout(VertexBuffer* buffer, std::vector<VertexElementType> elements);
~glVertexLayout();
void Bind() override;
void UnBind() override;
private:
glVertexElementDesc GetElementDesc(VertexElementType type, unsigned int offset);
};
}