|
2 | 2 |
|
3 | 3 | #include <cassert>
|
4 | 4 |
|
| 5 | +#include <glm/vec2.hpp> |
| 6 | +#include <glm/vec3.hpp> |
| 7 | +#include <glm/vec4.hpp> |
| 8 | + |
5 | 9 | #include <globjects/VertexArray.h>
|
6 | 10 | #include <globjects/globjects.h>
|
7 | 11 |
|
@@ -97,4 +101,101 @@ void VertexAttributeBinding::setLFormat(const GLint size, const GLenum type, con
|
97 | 101 | attributeImplementation().setLFormat(this, size, type, relativeoffset);
|
98 | 102 | }
|
99 | 103 |
|
| 104 | +void VertexAttributeBinding::setValue(gl::GLboolean value) |
| 105 | +{ |
| 106 | + glVertexAttribI1i(bindingIndex(), static_cast<GLint>(value)); |
| 107 | +} |
| 108 | + |
| 109 | +void VertexAttributeBinding::setValue(gl::GLbyte value) |
| 110 | +{ |
| 111 | + glVertexAttribI1i(bindingIndex(), static_cast<GLint>(value)); |
| 112 | +} |
| 113 | + |
| 114 | +void VertexAttributeBinding::setValue(gl::GLshort value) |
| 115 | +{ |
| 116 | + glVertexAttribI1i(bindingIndex(), static_cast<GLint>(value)); |
| 117 | +} |
| 118 | + |
| 119 | +void VertexAttributeBinding::setValue(gl::GLint value) |
| 120 | +{ |
| 121 | + glVertexAttribI1i(bindingIndex(), value); |
| 122 | +} |
| 123 | + |
| 124 | +void VertexAttributeBinding::setValue(gl::GLint64 value) |
| 125 | +{ |
| 126 | + glVertexAttribL1i64NV(bindingIndex(), value); |
| 127 | +} |
| 128 | + |
| 129 | +void VertexAttributeBinding::setValue(gl::GLfloat value) |
| 130 | +{ |
| 131 | + glVertexAttrib1f(bindingIndex(), value); |
| 132 | +} |
| 133 | + |
| 134 | +void VertexAttributeBinding::setValue(gl::GLdouble value) |
| 135 | +{ |
| 136 | + glVertexAttrib1d(bindingIndex(), value); |
| 137 | + glVertexAttribL1d(bindingIndex(), value); |
| 138 | +} |
| 139 | + |
| 140 | +void VertexAttributeBinding::setValue(const glm::bvec2 value) |
| 141 | +{ |
| 142 | + glVertexAttribI2i(bindingIndex(), static_cast<GLint>(value.x), static_cast<GLint>(value.y)); |
| 143 | +} |
| 144 | + |
| 145 | +void VertexAttributeBinding::setValue(const glm::ivec2 value) |
| 146 | +{ |
| 147 | + glVertexAttribI2i(bindingIndex(), value.x, value.y); |
| 148 | +} |
| 149 | + |
| 150 | +void VertexAttributeBinding::setValue(const glm::vec2 value) |
| 151 | +{ |
| 152 | + glVertexAttrib2f(bindingIndex(), value.x, value.y); |
| 153 | +} |
| 154 | + |
| 155 | +void VertexAttributeBinding::setValue(const glm::dvec2 value) |
| 156 | +{ |
| 157 | + glVertexAttribL2d(bindingIndex(), value.x, value.y); |
| 158 | +} |
| 159 | + |
| 160 | +void VertexAttributeBinding::setValue(const glm::bvec3 value) |
| 161 | +{ |
| 162 | + glVertexAttribI3i(bindingIndex(), static_cast<GLint>(value.x), static_cast<GLint>(value.y), static_cast<GLint>(value.z)); |
| 163 | +} |
| 164 | + |
| 165 | +void VertexAttributeBinding::setValue(const glm::ivec3 value) |
| 166 | +{ |
| 167 | + glVertexAttribI3i(bindingIndex(), value.x, value.y, value.z); |
| 168 | +} |
| 169 | + |
| 170 | +void VertexAttributeBinding::setValue(const glm::vec3 value) |
| 171 | +{ |
| 172 | + glVertexAttrib3f(bindingIndex(), value.x, value.y, value.z); |
| 173 | +} |
| 174 | + |
| 175 | +void VertexAttributeBinding::setValue(const glm::dvec3 value) |
| 176 | +{ |
| 177 | + glVertexAttribL3d(bindingIndex(), value.x, value.y, value.z); |
| 178 | +} |
| 179 | + |
| 180 | +void VertexAttributeBinding::setValue(const glm::bvec4 value) |
| 181 | +{ |
| 182 | + glVertexAttribI4i(bindingIndex(), static_cast<GLint>(value.x), static_cast<GLint>(value.y), static_cast<GLint>(value.z), static_cast<GLint>(value.w)); |
| 183 | +} |
| 184 | + |
| 185 | +void VertexAttributeBinding::setValue(const glm::ivec4 value) |
| 186 | +{ |
| 187 | + glVertexAttribI4i(bindingIndex(), value.x, value.y, value.z, value.w); |
| 188 | +} |
| 189 | + |
| 190 | +void VertexAttributeBinding::setValue(const glm::vec4 value) |
| 191 | +{ |
| 192 | + glVertexAttrib4f(bindingIndex(), value.x, value.y, value.z, value.w); |
| 193 | +} |
| 194 | + |
| 195 | +void VertexAttributeBinding::setValue(const glm::dvec4 value) |
| 196 | +{ |
| 197 | + glVertexAttribL4d(bindingIndex(), value.x, value.y, value.z, value.w); |
| 198 | +} |
| 199 | + |
| 200 | + |
100 | 201 | } // namespace globjects
|
0 commit comments