Questions tagged [vao]

Vertex Array Object (VAO) is an OpenGL Object that encapsulates all of the state needed to specify vertex data. They define the format of the vertex data as well as the sources for the vertex arrays.

A Vertex Array Object (VAO) is an OpenGL Object that encapsulates all of the state needed to specify vertex data (with one minor exception noted below). They define the format of the vertex data as well as the sources for the vertex arrays. Note that VAOs do not contain the arrays themselves; the arrays are stored in Buffer Objects (see below). The VAOs simply reference already existing buffer objects.

Resources:

242 questions
5
votes
2 answers

OpenGL Vertex Array/Buffer Objects

Question 1 Do vertex buffer objects created under a certain VAO deleted once that VAO is deleted? An example: glGenBuffers(1, &bufferObject); glGenVertexArrays(1, &VAO); glBindVertexArray(VAO); glBindBuffer(GL_ARRAY_BUFFER,…
sadanjon
  • 63
  • 1
  • 5
4
votes
2 answers

Android Vertex Array Objects?

I am writing some android code in preparation for a graphics intensive app I plan to develop. I haven't done any OpenGL since 2004. I stumbled across http://www.opengl.org/wiki/Vertex_Array_Object and multiple sources for the PC platform claim that…
Mikhail
  • 7,749
  • 11
  • 62
  • 136
4
votes
1 answer

C++/OpenGL VAO Problems

#define GLEW_STATIC #include #include #include #include #include #include #include #define WIDTH 800 #define HEIGHT 600 #define TITLE "Dynamic" GLFWwindow* window; int…
Max
  • 307
  • 2
  • 7
4
votes
1 answer

OpenGL VAO VBO shaders confusion

I am writing a renderer and am at the point to pick a final way to handle vao/vbo/shader management. On the web I found highly contradictory information on what is actually recommended. Right now idea is as follow: -One VBO stores all meshes…
Teris
  • 600
  • 1
  • 7
  • 24
4
votes
2 answers

VAOs and VBOs for rendering different objects

I wrote this "Model" class to load .obj files and allocate data for them in a VBO. Its code is something like this: (notice how it doesn't use VAOs) class Model {...} void Model::LoadOBJ(const char *file) { //load vertices, normals, UVs, and…
McLovin
  • 3,295
  • 7
  • 32
  • 67
4
votes
2 answers

What are the Attribute locations for fixed function pipeline in OpenGL 4.0++ core profile?

I would like to know the attribute locations inside fixed pipeline (no shader attached) for nVidia OpenGL drivers: glVertex = 0 glColor = 3 glNormal = ? glTexCoord = ? glMultiTexCoord 0..7 = ? glSecondaryColor = ? glFog = ? Empirically I found the…
Spektre
  • 49,595
  • 11
  • 110
  • 380
4
votes
1 answer

Crash on VAOs loaded from non-main thread

In my code I have a wrapper class for an object backed by two buffer objects and a vertex array object. I generate them using this in the constructor (slightly simplified): glGenVertexArrays(1, &vao); glBindVertexArray(vao); glGenBuffers(1,…
dascandy
  • 7,184
  • 1
  • 29
  • 50
3
votes
1 answer

Problem with rendering a quad in LWJGL 3 using VAOs and VBOs

(This is the second time I am asking this question. Last time I got one answer that didn't solve it (the answer there referred a bit of code that was left accidentally from one of my attempts at fixing this). I also changed the question itself…
Nitai99
  • 41
  • 3
3
votes
1 answer

WebGL 2.0: Draw call succeeds even VBO is deleted

So I am using a VAO to store pointers from a VBO. I wanted to test what happens when I delete my data buffers (vbo, ibo, etc.) before binding the VAO and calling a draw. Since VAOs store pointers to the data in the corresponding data buffers, I…
SuperTasche
  • 479
  • 1
  • 7
  • 17
3
votes
2 answers

Is the glVertexAttribPointer state bound to the current GL_ARRAY_BUFFER?

I have a simple question. Is it right, that glVertexAttribPointer operations have to be called once for a GL_ARRAY_BUFFER to save the attribute states until I want to change them? Or do I need to call glVertexAttribPointer each time in between…
bitQUAKE
  • 473
  • 1
  • 8
  • 19
3
votes
1 answer

What happens when binding a VAO without unbinding another bound VAO?

Suppose I have 2 different objects, each one has its own VAO and draw call. Something like this: void Object::Draw() { glBindVertexArray(vao); glDrawArrays(GL_TRIANGLES, foo, bar); } First I call the first object's draw call which binds its…
Jean Catanho
  • 326
  • 7
  • 18
3
votes
0 answers

Qt 5.9 OpenGL buffers cleanup

I recently updated to Qt 5.9. The application I'm working on uses QOpenGLWidget and QOpenGLBuffers. I noticed that since Qt 5.9, the QOpenglWidget destruction is really slow and makes the application exits really slowly. Any suggestions/ideas to…
M. Brigaud
  • 126
  • 6
3
votes
1 answer

Java lwjgl Modern OpenGL Access Violation Exception using VAOs

I am currently following ThinMatrix's OpenGL tutorial on rendering with VAOs and VBOS. I copy the code almost exactly (the only difference being I make a factory class static instead of just having it normally). The only technical difference I can…
echo_97
  • 43
  • 4
3
votes
0 answers

PyOpenGL How to set VertexAttribPointer

I'm trying to build a Vertex Array Object in Python, following the tutorial on LearnOpenGL, and most of the code has been fairly easy to translate to Python with a bit of research, but I'm a bit stumped as to how I'm supposed to build a…
Matthew Fournier
  • 1,077
  • 2
  • 17
  • 32
3
votes
2 answers

Do OpenGL Vertex Array Objects store vertex buffer names and indices, or only indices?

When created, do VAOs track just VBO indices (via glBindVertexBuffer), or also which VBO names are bound to those indices? If I specify a binding index of, say, 0 using glVertexAttribBinding during VAO creation, can I bind a different VBO to index…
jorgander
  • 540
  • 1
  • 4
  • 12
1
2
3
16 17