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
9
votes
1 answer

Vertex Array Objects - Confusion regarding exactly what state information is saved about the currently bound vertex buffer

I'm working through the excellent tutorials at arcsynthesis while building a graphics engine and have discovered I don't understand VAOs as much as I thought I had. From the tutorial Chapter 5. Objects In Depth Buffer Binding and Attribute…
Peter Clark
  • 2,521
  • 2
  • 19
  • 35
9
votes
0 answers

Problems with OpenGL 4 VBOs and Numpy arrays, Pyglet/Python

I'm getting started with using OpenGL 4 in Python (through Pyglet and some framework code I got off the net/wrote myself for loading Shaders/Programs), but I think I understand things fairly well, so I don't think there is a problem somewhere in my…
6
votes
1 answer

Purpose of binding points in OpenGL?

I don't understand what the purpose is of binding points (such as GL_ARRAY_BUFFER) in OpenGL. To my understanding glGenBuffers() creates a sort of pointer to a vertex buffer object located somewhere within GPU memory. So: glGenBuffers(1,…
Jason
  • 1,867
  • 2
  • 18
  • 43
6
votes
1 answer

Direct State access with vertex buffers

Looking at this question from 2010, concerning vertex buffers in modern OpenGL, is it still the case that Direct State Access is unavailable with them? I've modified most of my graphics library to use DSA with framebuffer, texture and so on but I…
Robinson
  • 8,836
  • 13
  • 64
  • 108
5
votes
1 answer

OpenGL VBO's in Haskell

Basing on this post, I was trying to figure out how to use VBO's in Haskell. I tried to fill in the bits that were not covered there: data Sprite = Sprite { spriteImage :: Image , spritePosition :: Position …
Lanbo
  • 13,437
  • 14
  • 67
  • 141
5
votes
1 answer

Applying color to single vertices in a quad in opengl

I'm trying to color single vertices of quads that are drawn through glDrawElements, I'm working with cocos2d libray, so I've been able to scavenge the source code to understand exactly what is happening, code is the following: glBindVertexArray(…
Jack
  • 125,196
  • 27
  • 216
  • 324
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,123
  • 9
  • 56
  • 121
4
votes
3 answers

glGenVertexArrays and glGenBuffers arguments

In a tutorial about OpenGL 3.0+, we create a Vertex Array Object and Vertex Buffer Object this way: GLuint VAO, VBO; glGenVertexArrays(1, &VAO); glGenBuffers(1, &VBO); glBindVertexArray(VAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); Here, VAO is an…
Desura
  • 215
  • 1
  • 3
  • 9
3
votes
1 answer

how does a VBO get attached to a VAO

VAO being Vertex Array Object and VBO being Vertex Buffer Object. The calls for creating and binding/unbinding VAOs and VBOs have a general format as given below: GLuint VAO, VBO; glGenVertexArrays(1, &VAO); glBindVertexArray(VAO); …
juztcode
  • 481
  • 7
  • 25
3
votes
1 answer

How to Convert GLSL #version 330 core to GLSL ES #version 100?

I'm trying to make an app that draws an image in Android Studio with NDK and JNI to call C++ Code using OpenGL ES. I have went through the tutorial how to do this in OpenGL at : https://learnopengl.com/#!Getting-started/Textures, which use GLSL 330…
Toan Tran
  • 386
  • 4
  • 23
3
votes
1 answer

Can I have multiple GL_ARRAY_BUFFER buffers?

So I was looking at another SO question regarding the command glVertexAttribPointer and I ran into a slight confusion. The accepted answer to this question explains, But there's an additional implied piece of state that is also stored away for…
3
votes
1 answer

How to minimize glVertexAttribPointer calls when using Instanced Arrays?

I have OpenGL code using one VAO for all model data and two VBOs. The first for standard vertex attributes like position and normal and the second for the model matrices. I am using instanced draw, so I load the model matrices as instanced arrays…
mak
  • 225
  • 4
  • 11
3
votes
0 answers

OpenGL buffer management in host memory and host-device synchronization

I was wondering how to make my application interact with a 3D model that has to change a lot. For instance, I would like to be able to freely modify color, texture id, position or even normals from the application itself. I thought re-uploading the…
Philippe Paré
  • 3,813
  • 5
  • 27
  • 50
3
votes
0 answers

Display list vs. VAO performance

I recently implemented functionality in my rendering engine to make it able to compile models into either display lists or VAOs based on a runtime setting, so that I can compare the two to each other. I'd generally prefer to use VAOs, since I can…
Dolda2000
  • 23,371
  • 2
  • 45
  • 83
2
votes
2 answers

Unable to obtain buffer object data through glGetBufferSubData

I was hoping to make a tower of hanoi game using opengl. Eventually i came up to the problem of processing & transfering data from one buffer object to another. I have successfully stored my vertices in a buffer object and bound it with a vertex…
1
2 3 4 5