12#ifndef GAMP_GLSLARRAYHANDLERINTERLEAVED_HPP_
13#define GAMP_GLSLARRAYHANDLERINTERLEAVED_HPP_
20 using namespace gamp::render::gl;
21 using namespace gamp::render::gl::data;
32 template<
typename Value_type>
35 std::vector<GLSLSubArrayHandler> subArrays;
39 for(
auto & subArray : subArrays) {
40 subArray.syncData(
gl, st);
50 for(
auto & subArray : subArrays) {
51 subArray.data()->setVBOName(vboName);
56 subArrays.push_back(std::move(handler));
69 for(
auto & subArray : subArrays) {
70 subArray.enableState(
gl, enable, st);
bool bindBuffer(GL &gl, bool bind)
if bind is true and the data uses VBO, the latter will be bound and data written to the GPU if requir...
GLArrayHandler() noexcept=default
GLArrayDataClientRef< Value_type > m_ad
GLArrayHandler< Value_type > glarray_t
GLSLArrayHandlerInterleaved() noexcept=default
void setSubArrayVBOName(GLuint vboName) override
void addSubHandler(GLSLSubArrayHandler &&handler) override
Supporting interleaved arrays, where sub handlers may handle the array state and the master handler t...
void enableState(GL &gl, bool enable, ShaderState *st) override
Implementation shall enable or disable the array state.
Used for interleaved GLSL arrays, i.e.
ShaderState allows to sharing data between shader programs, while updating the attribute and uniform ...