#pragma once #include #include #include "PoseableBatch.h" namespace charcoal { namespace builtin { template class SpriteBatch : public PoseableBatch > { public: // Note: This is VERY similar to builtin::textured::Batch // Note: Uses GL_TEXTURE0. The uniform for this texture should be set in the scene before rendering. using PoseableBatch >::PoseableBatch; void preprender() const override { // Note: Uses GL_TEXTURE0. The uniform for this texture should be set in the scene. glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, charcoal::Batch >::m_p_renderable->get_texture()->get_texture()); glBindSampler(0, charcoal::Batch >::m_p_renderable->get_sampler()->get_sampler()); } }; } }