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
1
vote
1 answer

In OpenGL, how to pick an object by name stack when I use the VAO to draw objects?

I'm dealing with an old large project using fixed rendering pipeline, and the current project used the name stack to pick an object. Now I need to change one object in the project to the VAO (glDrawElements...) mode, while the other objects remain…
Ray
  • 61
  • 4
1
vote
1 answer

PyOpenGL cannot render any vao

I have spent almost 2-3 hours trying to figure out why I am not getting a rectangle renderered. I am using pygame for making a window, and opengl for rendering onto the window. what should be happening is a red background with a blue rectangle, but…
RIVERMAN2010
  • 427
  • 3
  • 9
1
vote
1 answer

VAO rendering using GLES30: bad offset / len !!!!! error

When trying to render a cube using VAO in GLES30 on an android, I get the following error message: D/emuglGLESv2_enc: sendVertexAttributes: bad offset / len!!!!! Does anyone know what this means and how to fix it? I cannot find any documentation…
Bo Bramer
  • 35
  • 1
  • 6
1
vote
1 answer

OpenGL update VBO vertices bufferSubData

I am new to openGL and I've got a code like this learning from the tutorial #include #include #include void framebuffer_size_callback(GLFWwindow *window, int width, int height); void processInput(GLFWwindow…
Hrant Nurijanyan
  • 789
  • 2
  • 9
  • 26
1
vote
1 answer

OpenGL correct way to draw multiple objects?

I am trying to understand how to correctly draw multiple objects, and to do that i wanted to draw a cube face by face. Problem is i obviously didn't get it right because only the first face is being drawn. I have a 24 vertex structure (4 vertex per…
Fra
  • 45
  • 5
1
vote
1 answer

Correct Use of glVertexAttribPointer?

I recently decided to start Learning OpenGL and got myself a book about OpenGL Core 3.3. The book is generally about C++. So, after looking for a bit, I found a library in a language I was better in which provided almost the same functionality:…
PhoenixXKN
  • 92
  • 6
1
vote
1 answer

Is it possible to write vertex array code that's portable between OpenGL 2.x and 3.x?

The OpenGL 3.0 spec says: E.1 Profiles and Deprecated Features of OpenGL 3.0 ... Client vertex arrays - all vertex array attribute pointers must refer to buffer objects (section 2.9.2). The default vertex array object (the name zero) is also…
1
vote
1 answer

OpenTK Text rendering without GL.Begin()

I am writing an application with OpenTK and got to the point where i want to render text. From examples i patched together a version that creates a bitmap with the characters i need, using Graphics.DrawString(). That version works quite okay, but i…
Pablo
  • 13
  • 3
1
vote
1 answer

Adding line to shader makes nothing draw

I have this vertex shader. When i remove in vec3 LVertexNorm and everything related to it. It render fine. But if i add it in, nothing renders anymore. #version 140 in vec3 LVertexNorm; in vec3 LVertexPos2D; uniform mat4 MVP; out vec3…
Marko Taht
  • 1,448
  • 1
  • 20
  • 40
1
vote
1 answer

Can't change background color in OpenGL

I've just started to experiment with OpenGL (using freeglut and GLEW). I can get a window to pop up, but nothing gets drawn to it, I can't even get it to change background color. Here's what the main function looks like: int main(int argc, char…
sanik98
  • 145
  • 6
1
vote
1 answer

OpenGL VAO: a shared instancing VBO among non-shared

I have different meshes with different VBOs, some may have normals, some not, etc. Every mesh also has its VAO with all VBOs being bound. Then I draw all meshes with instancing. I plan to use a shared global VBO of mat4 to store dynamically…
Emil Kabirov
  • 559
  • 4
  • 14
1
vote
1 answer

Core-profile OpenGL not drawing anything

I recently got into OpenGL, and used PyOpenGL and the fixed-function pipeline (I know, I know) to draw cubes and stuff. Anyway, everyone told me that fixed-function is horrible and deprecated, so I got into core-profile OpenGL just now. I've been…
Parashoo
  • 315
  • 1
  • 10
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

OpenGL, Java, LWJGL - Drawing multiple triangles using IBOs, VBOs and VAOs

I am trying to render two triangles on the screen at once, using two different VBOs so that I can add textures later (to my understanding, if you want to add different textures, you must make two VBOs?). I have tried using a combination of VAOs…
Atom
  • 325
  • 1
  • 11
1
vote
1 answer

OpenGL / OpenTK Drawing with Indices : Attempted to Read or Write Protected Memory Issue

I'm trying to display a quad (or two triangles) with C# and OpenGL. Below is my code for my mesh class. In it you have both the creation of the VBOs and VAO, as well as the function I use to render the mesh. using System; using…
Euan Hollidge
  • 587
  • 2
  • 5
  • 21