#include <GLArray.h>
|
| | GLArray () |
| | Generate a VAO and bind it.
|
| | ~GLArray () |
| | Destroy and delete the VAO name.
|
| void | bind () const |
| | Bind this VAO for subsequent vertex specification/draws.
|
| void | connectVertexAttrib (const GLBuffer &buffer, const GLProgram &program, const std::string &variable, size_t elemCount, size_t offset=0, GLuint divisor=0) const |
| | Connect a vertex attribute from a buffer to a program input.
|
| void | connectIndexBuffer (const GLBuffer &buffer) const |
| | Bind buffer as the index (element) buffer for this VAO.
|
◆ GLArray()
Generate a VAO and bind it.
◆ ~GLArray()
Destroy and delete the VAO name.
◆ bind()
| void GLArray::bind |
( |
| ) |
const |
Bind this VAO for subsequent vertex specification/draws.
◆ connectIndexBuffer()
| void GLArray::connectIndexBuffer |
( |
const GLBuffer & | buffer | ) |
const |
Bind buffer as the index (element) buffer for this VAO.
- Parameters
-
| buffer | Buffer previously filled with indices (GLuint). |
◆ connectVertexAttrib()
| void GLArray::connectVertexAttrib |
( |
const GLBuffer & | buffer, |
|
|
const GLProgram & | program, |
|
|
const std::string & | variable, |
|
|
size_t | elemCount, |
|
|
size_t | offset = 0, |
|
|
GLuint | divisor = 0 ) const |
Connect a vertex attribute from a buffer to a program input.
- Parameters
-
| buffer | Source buffer holding interleaved attribute data. |
| program | Shader program from which to query the attribute location. |
| variable | Attribute identifier in the shader (e.g., "in_position"). |
| elemCount | Components per vertex attribute (e.g., 2, 3, or 4). |
| offset | Offset (in elements, not bytes) from the start of each record. |
| divisor | Instance divisor (0 = per-vertex; >0 = per-instance). |
Queries the attribute location from program and forwards the binding to GLBuffer::connectVertexAttrib() using the stride/element size derived from the most recent setData() on buffer.
The documentation for this class was generated from the following files: