#pragma once #include "LitTypes.h" #include "PoseableBatch.h" namespace charcoal { namespace builtin { namespace lit { class Batch : public PoseableBatch { public: using PoseableBatch::PoseableBatch; protected: void setup_vao_vertex() override { glBindBuffer(GL_ARRAY_BUFFER, m_vertex_vbo); glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); glEnableVertexAttribArray(2); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, position)); glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, normal)); glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, material)); glVertexAttribDivisor(0, 0); glVertexAttribDivisor(1, 0); glVertexAttribDivisor(2, 0); } }; } } }