Vertex array objects are OpenGL container objects that hold the state needed to describe vertex array data for rendering. They store references to any buffer objects needed to use as vertex array source data.
Questions tagged [vertex-array-object]
70 questions
0
votes
1 answer
update vertices and indices in OPENGL
hi everyone I new to OPENGL and I want to update the vertices and indices when I translate the 3d object I make vertices vector and indices vector these vector hold all the data of the 3d object is this possible
the code I use :
// Create…

مهند خليل
- 23
- 9
0
votes
1 answer
Using multiple VBO in a VAO
I try to use 2 VBO inside a VAO and I end up with a crash (far beyond my app).
The idea is to make a first VBO (and optionnally an IBO) to stucture the geometry.
This worked well, until I get the idea to add a second VBO for the model matrix as a…

Sébastien Bémelmans
- 869
- 2
- 8
- 17
0
votes
1 answer
When drawing multiple objects, when do you create a new vertex array object?
I'm trying to create a game with WebGL.
I currently have three textures, one with letters for the font, a sprite sheet for the character, and a tilemap for the world. So I have a few large textures and I need to draw a small part of them multiple…

user1801359
- 422
- 1
- 4
- 14
0
votes
1 answer
OpenGL Draw Multiple Vertex Arrays
I want to draw multiple vertex arrays. This is the initialization:
unsigned int va1;
unsigned int vb1;
void init_va1() {
glGenVertexArrays(1, &va1);
glBindVertexArray(va1);
glGenBuffers(1, &vb1);
glBindBuffer(GL_ARRAY_BUFFER, vb1);
…

Ababwa
- 131
- 1
- 8
0
votes
0 answers
Is this GLSL mat4 vertex attribute being set up correctly?
I am using this vertex information as input to a GL_POINTS geometry shader.
struct Vertex
{
glm::mat4 transform;
glm::vec3 colour;
};
Vertex points [] = {...};
When setting up the colour attribute, the following code works (with m_location…

spraff
- 32,570
- 22
- 121
- 229
0
votes
1 answer
My OpenGL Vertex Array no longer works when abstracted out into a class
I am using OpenGL to render some cubes and I have managed to get around 10 cubes rendering however I now want to abstract the code out into classes. I have started with the vertex array object.
I have looked through the code and followed it through…

Ameen Izhac
- 57
- 6
0
votes
1 answer
glBindVertexArray does not switch VAO in display() but does in init()
I am trying to learn how to program OpenGL. Right now I am writing a program that draws to cubes. I have each cube stored in a separate VBO. This is the code for this.
void
init()
{
enum { Vertices, Colors, Elements, NumVBOs };
GLuint…
user3834551
0
votes
1 answer
glDrawElements crashes in the driver | debugging hints
Short version: How can a crash (bad memory access exception/nullptr exception) inside glDrawElements/glDrawElementsInstanced be debugged?
Long version:
You have a path of OpenGL rendering code which uses VAOs, and commits rendering thru calling…

St0fF
- 1,553
- 12
- 22
0
votes
2 answers
How to have multiple storage layouts in one Vertex Array Object?
When I say storage layout, I mean what I define with glVertexAttribPointer. Is this state saved in the currently bound VAO or the buffer I bound to GL_ARRAY_BUFFER?

mskr
- 375
- 5
- 14
0
votes
0 answers
Qt 5.5 and OpenGL: QVertexArrayObject::create() calls QPainter::drawimage()?
I understand that for any of the Qt OpenGL convenience classes to correctly be initialized and used, they must be called with a valid current context. So, I designed my classes to be initialized from my overloaded QOpenGLWidget::initializeGL()…

Maxim Blinov
- 886
- 9
- 33
0
votes
3 answers
How to correctly populate vertex array
I am confused with how to populate my vertex array for it to be correctly drawn. The OpenGL code that I am using is:
float vertices[size];
//Here I have a method to populate the array with my values from a 2D matrix
glGenVertexArrays(1, &vaoID[0]);…

Calco
- 1,420
- 1
- 17
- 31
0
votes
1 answer
vertex array objects in android opengl-es
I heard most of the android devices that are recently released support VAOs of opengl-es. I am trying to develop an app on a opengl-es 2.0 environment. However, I am wondering
(Q1)Do most of the Android devices being used(produced maybe several…

NamHo Lee
- 309
- 3
- 13
0
votes
0 answers
Opengl 2.0 with multiple VAO
I was trying to setup a 2d screen with two layers of drawing
1) a grid made of white solid lines
2) tiles made of colored square
here are my opengl codes:
setup grid
//glGenBuffers(1, &gridVAO);
glGenVertexArrays(1, &gridVAO); //…

user1387622
- 187
- 2
- 9
0
votes
1 answer
glGenVertexArrays() crashing DerelictGL3 program
The function calls glBindVertexArray(0), glGenVertexArrays(1, &vertex_array_object) and glBindVertexArray(vertex_array_object) cause my program to crash. When I run the code if(glGenVertexArrays == null) it evaluates true. This leads me to believe…

Bennet Leff
- 376
- 1
- 4
- 18
0
votes
1 answer
How can an OpenGL Vertex Array Object get deleted without calling glDeleteVertexArrays?
I am developing an After Effects plugin where I use a VAO for OpenGL rendering. After full screen RAM preview the VAO, which has the handle number 1, is somehow deleted (glGenVertexArrays generates 1 again). The strange thing is that the shaders and…

s---70
- 90
- 7