globjects  2.0.0.630135941c42
Strict OpenGL objects wrapper.
Loading...
Searching...
No Matches
VertexAttributeBinding.h
Go to the documentation of this file.
1
2#pragma once
3
4
5#include <glm/fwd.hpp>
6
7#include <glbinding/gl/types.h>
8#include <glbinding/gl/boolean.h>
9
10#include <globjects/globjects_api.h>
11
13
14
15namespace globjects
16{
17
18
19class Buffer;
20class VertexArray;
21
22
23class GLOBJECTS_API VertexAttributeBinding : public Instantiator<VertexAttributeBinding>
24{
25 friend class AbstractVertexAttributeBindingImplementation;
26
27
28public:
30 VertexArray * vao
31 , const gl::GLint bindingIndex);
32
34
35 const VertexArray * vao() const;
37
38 void setDivisor(gl::GLint divisor);
39
40 void setAttribute(gl::GLint attributeIndex);
41
42 gl::GLint attributeIndex() const;
43 gl::GLint bindingIndex() const;
44
48 const Buffer * buffer() const;
50 const Buffer * vbo
51 , gl::GLint baseoffset
52 , gl::GLint stride);
53
55 gl::GLint size
56 , gl::GLenum type
57 , gl::GLboolean normalized = gl::GL_FALSE
58 , gl::GLuint relativeoffset = 0);
60 gl::GLint size
61 , gl::GLenum type
62 , gl::GLuint relativeoffset = 0);
64 gl::GLint size
65 , gl::GLenum type
66 , gl::GLuint relativeoffset = 0);
67
71 void setValue(gl::GLboolean value);
72 void setValue(gl::GLbyte value);
73 void setValue(gl::GLshort value);
74 void setValue(gl::GLint value);
75 void setValue(gl::GLint64 value);
76 void setValue(gl::GLfloat value);
77 void setValue(gl::GLdouble value);
78
79 void setValue(const glm::bvec2 & value);
80 void setValue(const glm::ivec2 & value);
81 void setValue(const glm::vec2 & value);
82 void setValue(const glm::dvec2 & value);
83
84 void setValue(const glm::bvec3 & value);
85 void setValue(const glm::ivec3 & value);
86 void setValue(const glm::vec3 & value);
87 void setValue(const glm::dvec3 & value);
88
89 void setValue(const glm::bvec4 & value);
90 void setValue(const glm::ivec4 & value);
91 void setValue(const glm::vec4 & value);
92 void setValue(const glm::dvec4 & value);
93
94 void setValue(const glm::mat2 & value);
95 void setValue(const glm::mat3 & value);
96 void setValue(const glm::mat4 & value);
97 void setValue(const glm::dmat2 & value);
98 void setValue(const glm::dmat3 & value);
99 void setValue(const glm::dmat4 & value);
100
101
102protected:
104
105 gl::GLint m_bindingIndex;
107
108 const Buffer * m_vbo;
109
110 mutable void * m_bindingData;
111};
112
113
114} // namespace globjects
Wrapper for OpenGL buffer objects.
Definition Buffer.h:38
CRTP for creating objects similar to std::make_unique.
Definition Instantiator.h:22
Definition VertexArray.h:26
Definition VertexAttributeBinding.h:24
void * m_bindingData
Definition VertexAttributeBinding.h:110
void setValue(const glm::dmat3 &value)
void setValue(const glm::bvec2 &value)
void setValue(gl::GLint64 value)
void setValue(const glm::dmat2 &value)
const Buffer * buffer() const
void setAttribute(gl::GLint attributeIndex)
void setValue(const glm::mat3 &value)
void setValue(const glm::mat2 &value)
void setValue(gl::GLbyte value)
void setValue(const glm::vec4 &value)
void setValue(const glm::bvec4 &value)
void setValue(const glm::ivec4 &value)
void setValue(gl::GLfloat value)
void setValue(gl::GLboolean value)
void setValue(const glm::vec3 &value)
void setValue(const glm::mat4 &value)
void setValue(gl::GLdouble value)
void setValue(const glm::dvec4 &value)
void setValue(const glm::ivec3 &value)
const Buffer * m_vbo
Definition VertexAttributeBinding.h:108
VertexArray * m_vao
Definition VertexAttributeBinding.h:103
const VertexArray * vao() const
void setLFormat(gl::GLint size, gl::GLenum type, gl::GLuint relativeoffset=0)
void setValue(const glm::dvec2 &value)
VertexAttributeBinding(VertexArray *vao, const gl::GLint bindingIndex)
void setDivisor(gl::GLint divisor)
void setValue(const glm::vec2 &value)
void setIFormat(gl::GLint size, gl::GLenum type, gl::GLuint relativeoffset=0)
void setValue(gl::GLshort value)
void setValue(const glm::ivec2 &value)
gl::GLint m_bindingIndex
Definition VertexAttributeBinding.h:105
gl::GLint m_attributeIndex
Definition VertexAttributeBinding.h:106
void setFormat(gl::GLint size, gl::GLenum type, gl::GLboolean normalized=gl::GL_FALSE, gl::GLuint relativeoffset=0)
void setValue(const glm::dvec3 &value)
void setBuffer(const Buffer *vbo, gl::GLint baseoffset, gl::GLint stride)
void setValue(gl::GLint value)
void setValue(const glm::dmat4 &value)
void setValue(const glm::bvec3 &value)
Contains all the classes that wrap OpenGL functionality.