Loading...
Searching...
No Matches
VertexArrayObject Class Reference

Vertex Array Object to capture vertex attribute state. More...

`#include <vertexarrayobject.h>`

## Public Member Functions

| VertexArrayObject (const VertexArrayObject &)=delete
VertexArrayObject & | operator= (const VertexArrayObject &)=delete
bool | bind ()
void | release ()
Index | handle () const

## Detailed Description

<avogadro/rendering/vertexarrayobject.h>

This class wraps an OpenGL VAO, which captures the state of vertex attribute bindings. Required for OpenGL 3.2+ core profile.

The VAO handle is lazily created on first bind(), allowing the object to be constructed before the OpenGL context is initialized.

Usage pattern: // During setup (when buffers change): vao.bind(); vbo.bind(); ibo.bind(); // set up vertex attribute pointers vao.release();

// During render: vao.bind(); glDrawElements(...); vao.release();

## Member Function Documentation

## bind()

bool bind | ( |  | ) |

Bind the VAO, making it active for attribute setup or rendering.

## release()

void release | ( |  | ) |

Unbind the VAO.

## handle()

Index handle | ( |  | ) | const

Get the OpenGL handle. Returns 0 if not yet created.

The documentation for this class was generated from the following file:

- vertexarrayobject.h