Loading...
Searching...
No Matches
VertexAttributeBinding.h
Go to the documentation of this file.
#pragma once
#include <glm/fwd.hpp>
#include <glbinding/gl/types.h>
#include <glbinding/gl/boolean.h>
#include <globjects/base/Referenced.h>
#include <globjects/globjects_api.h>
namespace globjects
{
class Buffer;
class VertexArray;
class GLOBJECTS_API VertexAttributeBinding : public Referenced
{
friend class AbstractVertexAttributeBindingImplementation;
public:
VertexAttributeBinding(
VertexArray * vao
, const gl::GLint bindingIndex);
const VertexArray * vao() const;
VertexArray * vao();
void setDivisor(gl::GLint divisor);
void setAttribute(gl::GLint attributeIndex);
gl::GLint attributeIndex() const;
gl::GLint bindingIndex() const;
const Buffer * buffer() const;
void setBuffer(
const Buffer * vbo
, gl::GLint baseoffset
, gl::GLint stride);
void setFormat(
gl::GLint size
, gl::GLenum type
, gl::GLboolean normalized = gl::GL_FALSE
, gl::GLuint relativeoffset = 0);
void setIFormat(
gl::GLint size
, gl::GLenum type
, gl::GLuint relativeoffset = 0);
void setLFormat(
gl::GLint size
, gl::GLenum type
, gl::GLuint relativeoffset = 0);
void setValue(gl::GLboolean value);
void setValue(gl::GLbyte value);
void setValue(gl::GLshort value);
void setValue(gl::GLint value);
void setValue(gl::GLint64 value);
void setValue(gl::GLfloat value);
void setValue(gl::GLdouble value);
void setValue(const glm::bvec2 & value);
void setValue(const glm::ivec2 & value);
void setValue(const glm::vec2 & value);
void setValue(const glm::dvec2 & value);
void setValue(const glm::bvec3 & value);
void setValue(const glm::ivec3 & value);
void setValue(const glm::vec3 & value);
void setValue(const glm::dvec3 & value);
void setValue(const glm::bvec4 & value);
void setValue(const glm::ivec4 & value);
void setValue(const glm::vec4 & value);
void setValue(const glm::dvec4 & value);
void setValue(const glm::mat2 & value);
void setValue(const glm::mat3 & value);
void setValue(const glm::mat4 & value);
void setValue(const glm::dmat2 & value);
void setValue(const glm::dmat3 & value);
void setValue(const glm::dmat4 & value);
protected:
virtual ~VertexAttributeBinding();
protected:
VertexArray * m_vao; // TODO: weak_ptr?
gl::GLint m_bindingIndex;
gl::GLint m_attributeIndex;
const Buffer * m_vbo;
mutable void * m_bindingData;
};
} // namespace globjects
Referenced.h
globjects::Buffer
Wrapper for OpenGL buffer objects.
Definition Buffer.h:36
globjects::Referenced
Superclass for all classes that use reference counting in globjects.
Definition Referenced.h:23
globjects::VertexArray
Definition VertexArray.h:23
globjects::VertexAttributeBinding
Definition VertexAttributeBinding.h:22
globjects::VertexAttributeBinding::m_bindingData
void * m_bindingData
Definition VertexAttributeBinding.h:107
globjects::VertexAttributeBinding::setValue
void setValue(const glm::dmat3 &value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::bvec2 &value)
globjects::VertexAttributeBinding::~VertexAttributeBinding
virtual ~VertexAttributeBinding()
globjects::VertexAttributeBinding::setValue
void setValue(gl::GLint64 value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::dmat2 &value)
globjects::VertexAttributeBinding::buffer
const Buffer * buffer() const
globjects::VertexAttributeBinding::setAttribute
void setAttribute(gl::GLint attributeIndex)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::mat3 &value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::mat2 &value)
globjects::VertexAttributeBinding::setValue
void setValue(gl::GLbyte value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::vec4 &value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::bvec4 &value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::ivec4 &value)
globjects::VertexAttributeBinding::setValue
void setValue(gl::GLfloat value)
globjects::VertexAttributeBinding::setValue
void setValue(gl::GLboolean value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::vec3 &value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::mat4 &value)
globjects::VertexAttributeBinding::setValue
void setValue(gl::GLdouble value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::dvec4 &value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::ivec3 &value)
globjects::VertexAttributeBinding::m_vbo
const Buffer * m_vbo
Definition VertexAttributeBinding.h:105
globjects::VertexAttributeBinding::m_vao
VertexArray * m_vao
Definition VertexAttributeBinding.h:100
globjects::VertexAttributeBinding::vao
const VertexArray * vao() const
globjects::VertexAttributeBinding::setLFormat
void setLFormat(gl::GLint size, gl::GLenum type, gl::GLuint relativeoffset=0)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::dvec2 &value)
globjects::VertexAttributeBinding::VertexAttributeBinding
VertexAttributeBinding(VertexArray *vao, const gl::GLint bindingIndex)
globjects::VertexAttributeBinding::setDivisor
void setDivisor(gl::GLint divisor)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::vec2 &value)
globjects::VertexAttributeBinding::setIFormat
void setIFormat(gl::GLint size, gl::GLenum type, gl::GLuint relativeoffset=0)
globjects::VertexAttributeBinding::setValue
void setValue(gl::GLshort value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::ivec2 &value)
globjects::VertexAttributeBinding::m_bindingIndex
gl::GLint m_bindingIndex
Definition VertexAttributeBinding.h:102
globjects::VertexAttributeBinding::m_attributeIndex
gl::GLint m_attributeIndex
Definition VertexAttributeBinding.h:103
globjects::VertexAttributeBinding::setFormat
void setFormat(gl::GLint size, gl::GLenum type, gl::GLboolean normalized=gl::GL_FALSE, gl::GLuint relativeoffset=0)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::dvec3 &value)
globjects::VertexAttributeBinding::setBuffer
void setBuffer(const Buffer *vbo, gl::GLint baseoffset, gl::GLint stride)
globjects::VertexAttributeBinding::setValue
void setValue(gl::GLint value)
globjects::VertexAttributeBinding::setValue
void setValue(const glm::dmat4 &value)
globjects::VertexAttributeBinding::bindingIndex
gl::GLint bindingIndex() const
globjects::VertexAttributeBinding::attributeIndex
gl::GLint attributeIndex() const
globjects::VertexAttributeBinding::vao
VertexArray * vao()
globjects::VertexAttributeBinding::setValue
void setValue(const glm::bvec3 &value)
globjects
Contains all the classes that wrap OpenGL functionality.