light/modules/renderer/public/vertex_layout.hpp
light7734 cd886aa8c9
Some checks reported errors
continuous-integration/drone/push Build was killed
refactor: flatten directory structure
2025-07-20 04:46:15 +03:30

53 lines
732 B
C++

#pragma once
#include <lt_debug/assertions.hpp>
namespace lt {
class VertexBuffer;
class Shader;
class SharedContext;
enum class VertexElementType
{
Byte1,
Byte2,
Byte4,
UByte1,
UByte2,
UByte4,
Int1,
Int2,
Int3,
Int4,
UInt1,
UInt2,
UInt3,
UInt4,
Float1,
Float2,
Float3,
Float4,
};
class VertexLayout
{
public:
static auto create(
const Ref<VertexBuffer> &vertexBuffer,
const Ref<Shader> &shader,
const std::vector<std::pair<std::string, VertexElementType>> &elements,
const Ref<SharedContext> &sharedContext
) -> Ref<VertexLayout>;
virtual ~VertexLayout() = default;
virtual void bind() = 0;
virtual void un_bind() = 0;
protected:
VertexLayout() = default;
};
} // namespace lt