\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 5.0.2 - Three
CGAL::Three::Vao Struct Reference

#include <CGAL/Three/Buffer_objects.h>

Definition

The Vao struct is a wrapper for the QOpenGLVertexArrayObject.

They are context dependent, most of the time it means Viewer dependent.

Public Member Functions

 Vao (QOpenGLShaderProgram *program)
 Creates a Vao. More...
 
 Vao (Vao *vao, QOpenGLShaderProgram *program)
 Creates a Vao from another one. More...
 
void addVbo (Vbo *vbo)
 Adds a Vbo to the list of Vbos.
 
void bind ()
 Makes the Vao and its program active until release() is called.
 
void release ()
 Makes the Vao and its program not active.
 

Constructor & Destructor Documentation

◆ Vao() [1/2]

CGAL::Three::Vao::Vao ( QOpenGLShaderProgram *  program)

Creates a Vao.

Parameters
programthe QOpenGLShaderProgram associated with this Vao.
Attention
This must be called within a valid OpenGLContext. Most of the time, initGL() functions are safe places to do so.

◆ Vao() [2/2]

CGAL::Three::Vao::Vao ( Vao vao,
QOpenGLShaderProgram *  program 
)

Creates a Vao from another one.

Parameters
programthe QOpenGLShaderProgram corresponding to the one of vao but from the right viewer.
vaothe Vao to copy.

All vao's vbos will be shared. Use it for shared viewers. initializeBuffers() will have to be called again.

Attention
This must be called within a valid OpenGLContext. Most of the time, initGL() functions are safe places to do so.