Questions tagged [vertex-array-object]

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.

64 questions
2
votes
0 answers

OpenGL VAO + multiple VBO - theory - batch render

I'm thinking about tweaking my current batch render. What I currently do is run a loop with command like this : shader->setUniformValue("mvp_matrix", matrix * geo[x].geoMatrix); glDrawElementsBaseVertex(GL_TRIANGLES, meshIndicesCountList[x],…
2
votes
1 answer

OpenGL big projects, VAO-s and more

So I've been learning OpenGL 3.3 on https://open.gl/ and I got really confused about some stuff. VAO-s. By my understanding they are used to store the glVertexAttribPointer calls. VBO-s. They store vertecies. So if I am making something with…
Rokner
  • 163
  • 9
2
votes
2 answers

Interleaved Vertex Array Object doesn't show colors

I am trying to render a bunch of vertices with an own color for each vertex. The number of vertices is around 1 mio, so I use a Vertex Array Object to render them. It's no problem for me to render the points, but when I add the colors to the data…
Schamote
  • 47
  • 7
1
vote
0 answers

Why do I get an 'invalid operation error' when I use glGenVertexArrays() in PyOpenGL eventhough I am creating an OpenGL 4.1 context?

I'm trying to write a simple program to display an icosahedron using PyOpenGL but I can't get past generating the VAO. The problem is not solved in glGenVertexArrays Mac OSX PyOpenGL as I am creating an OpenGL 4.1 context. I always get the following…
bresslem
  • 11
  • 2
1
vote
1 answer

OpenGL can't update vertex buffer with VAO procedure

I'm attempting to move a vertex by modifying it's positional vertex attribute. As a test, I have added the line vertices[0] = 0.4f; both before and after the creation of my VAO procedure, to see whether I am able to modify the vertices array after…
MattyAB
  • 315
  • 1
  • 8
  • 17
1
vote
1 answer

OpenGL program doesn't show a triangle

I am following a tutorial on OpenGL in C++ and for some reason the exact same code doesn't work for me. It is supposed to display a triangle, but it doesn't show anything.Just a blank screen. Here is the code: #include #define…
Martin Chekurov
  • 619
  • 3
  • 12
1
vote
0 answers

OpenGL Vertex Array Object failing to bind Vertex Buffer

I am learning OpenGL through https://learnopengl.com/. From that site, and my research on the internet while trying to solve this problem, I have learned that Vertex Array Objects are useful because you can bind one with glBindVertexArray, and Any…
phil
  • 1,286
  • 1
  • 10
  • 21
1
vote
1 answer

OpenGL VBO with single float per Vertex problem

I have been stuck all day yesterday with this problem and cant figure it out. The code is below but generally i am trying to give a mesh Vertex Attributes for 1.Postions 2.Indices 3.Normals and 4.a single float value. The values are all stored in…
Alexander W
  • 55
  • 1
  • 5
1
vote
1 answer

Can't seem to get a VAO to render... Can someone help me see what I did wrong?

So an interesting thing about this problem is, I tried to use RenderDoc but RenderDoc crashed when I tried to load a frame I captured, this happened every time I tried, so it would seem graphics debugging tools wont help me in this situation... I am…
1
vote
1 answer

Confusion about binding the index of a non-existent attribute using glVertexAttribPointer

When binding an attribute index using glVertexAttribPointer, what happens when an associated program does not contain an attribute at said index? Is the behaviour undefined, or is the attribute ignored altogether? I have searched the docs quite…
1
vote
1 answer

Inconsistent behavior in instance rendering with glDrawElementsInstanced, somtimes no rendering with no errors

I've been working on project using OpenGL. Particles are rendered using instanced draw calls. The issue is that sometimes glDrawElementsInstanced will not render anything. And no errors are reported. Other models and effects render fine. But no…
1
vote
1 answer

openGL drawing GL_LINES giving incorrect result

I am trying to draw a grid of velocity vectors, I expect the velocity at each grid point to be a line with a slop of 1. A slanting line, but I always end up with a vertical line. I'm not sure what I'm doing wrong. Is there something I'm…
1
vote
0 answers

Verifying information about the graph

I'm having difficulty attempting to print the contents of my Graph using a toString method. Moreover, I do not receive an error when I add my Vertex to my Graph but I am unsure if I am properly adding my Vertexes. Thank you to anyone for any help!…
1
vote
0 answers

OpenGL - Properly updating the Vertex Buffer binding of a Vertex Array Object

I have noticed a strange error in my program, which occurs when I bind a VAO multiple times after calling glVertexArrayVertexBuffer. In my frame loop, I usually have one VAO for one draw call, but sometimes I would like to use the same VAO for…
stimulate
  • 1,059
  • 6
  • 23
1
vote
1 answer

Memory error when calling gl.GenVertexArrays

I've been using Go's go-gl package for quite a while now. Everything was working 100% until I did some refactoring and now I'm getting the stranges error: fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation…
Fanus du Toit
  • 926
  • 1
  • 10
  • 26