12#ifndef GAMP_GLSLARRAYHANDLERFLAT_HPP_
13#define GAMP_GLSLARRAYHANDLERFLAT_HPP_
19namespace gamp::render::gl::data::impl {
20 using namespace gamp::render::gl;
21 using namespace gamp::render::gl::data;
32 class GLSLSubArrayHandler :
public GLSubArrayHandler {
40 void syncData(
const GL& gl, ShaderState* st)
override {
44 if( 0 <= m_ad->location() ) {
45 m_ad->glVertexAttribPointer(gl);
65 void enableState(
const GL& gl,
bool enable, ShaderState* st)
override {
73 GLint location = m_ad->location();
76 ::glEnableVertexAttribArray(location);
78 ::glDisableVertexAttribArray(location);
bool vertexAttribPointer(const GL &gl, const GLArrayDataSRef &data)
Set the GLArrayData vertex attribute data, if it's location is valid, i.e.
bool enableAttribute(const GL &gl, const stringview_t name)
Enables a vertex attribute array.
bool disableAttribute(const GL &gl, const string_t &name)
Disables a vertex attribute array.
std::shared_ptr< GLArrayData > GLArrayDataSRef