Questions tagged [vertex-buffer]

A Vertex Buffer is an object that enables transmitting a collection of vertices to a graphics device for non-immediate or streaming rendering.

A Vertex Buffer is an object that enables transmitting a collection of vertices to a graphics device for non-immediate ot streaming rendering.

Examples are OpenGL's Vertex Buffer Object and Microsoft.XNA VertexBuffer class.

329 questions
5
votes
2 answers

Better to create new VBOs or just swap the data? (OpenGL)

So in a OpenGL rendering application, is it usually better to create and maintain a vertex buffer throughout the life of an application and just swap out the data every frame with glBufferData, or is it better to just delete the VBO and recreate it…
Xzhsh
  • 2,239
  • 2
  • 22
  • 32
5
votes
1 answer

How to dispose VBOs stored in a VAO

I am new to OpenGL, and am learning about VBOs and VAOs. I'm trying to understand how to dispose/free/detach VBOs in a VAO, when I don't have the single VBO ids anymore, only the VAO. Must I get all VBOs individually and then call glDeleteBuffers…
user3325226
  • 329
  • 2
  • 5
  • 10
5
votes
2 answers

How to render a mesh made up of triangles where each triangle has same color without specifying that color 3 times per trianlge

How can I render a mesh (made up of triangles) where each triangle has same color without specifying that color 3 times per triangle in the vertex arrays. Suppose I want to draw 2 triangles. Triangle 1 : Vertex 1, position:(x1,y1) , color:…
viktorzeid
  • 1,521
  • 1
  • 22
  • 35
5
votes
2 answers

Why does OpenGL's glDrawArrays() fail with GL_INVALID_OPERATION under Core Profile 3.2, but not 3.3 or 4.2?

I have OpenGL rendering code calling glDrawArrays that works flawlessly when the OpenGL context is (automatically / implicitly obtained) 4.2 but fails consistently (GL_INVALID_OPERATION) with an explicitly requested OpenGL core context 3.2. (Shaders…
metaleap
  • 2,132
  • 2
  • 22
  • 40
4
votes
1 answer

iPhone Cheetah 3D OpenGL ES Vertex Buffer Object (VBO) Example

I'd like to use Vertex Buffer Objects (VBOs) to improved my rendering of somewhat complicated models in my Open GL ES 1.1 game for iPhone. After reading several posts on SO and this…
PhilBot
  • 748
  • 18
  • 85
  • 173
4
votes
3 answers

Handle multiple meshes in Open GL ES 2.0 (iOS GLKit)?

I've managed to create a single mesh in Open GL ES 2.0 using iOS's GLKit. What I can't figure out is how to create a second mesh that looks identical to the first except with a different position. I think what would be most helpful would be if…
ArtOfWarfare
  • 20,617
  • 19
  • 137
  • 193
4
votes
2 answers

OpenGL ES 1.1 Vertex Buffer Object Not Working

I am developing an iPhone game using OpenGL ES 1.1 and need to use vertex buffer objects in order to render 500+ particles without the performance decreasing. My game was able to draw successfully using the non-VBO method, but now that I've…
BigSauce
  • 1,830
  • 3
  • 21
  • 27
4
votes
1 answer

Drawing using Vertex Buffer Objects in OpenGL ES 1.1 vs ES 2.0

i am new to openGL. Iam using apple documentation as my major…
alexpov
  • 1,158
  • 2
  • 16
  • 29
4
votes
1 answer

Broken Vertex Data in Mesh Class

I'm trying to implement model loading, but I'm stuck with one problem. When i try to draw a mesh (a single textured quad written by hand for test purposes) for some reason duplicated data associated with the first vertex is passed to the vertex…
4
votes
2 answers

The classic "nothing is getting rendered" OpenGL problem

I know, it's quite frustrating. I can't get anything to show up in my OpenGL application - all I see is an empty viewport. When I first started writing the application, I was manually drawing the vertices (using GL_QUADS) and everything worked fine.…
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
4
votes
2 answers

openGL glDrawElements with interleaved buffers

Thus far i have only used glDrawArrays and would like to move over to using an index buffer and indexed triangles. I am drawing a somewhat complicated object with texture coords, normals and vertex coords. All this data is gathered into a single…
DavidG
  • 1,796
  • 4
  • 21
  • 33
4
votes
2 answers

how can I update dynamic vertex buffer fastly?

I'm trying to make a simple 3D modeling tool. there is some work to move a vertex( or vertices ) for transform the model. I used dynamic vertex buffer because thought it needs much update. but performance is too low in high polygon model even though…
4
votes
2 answers

OpenGL: problem with vertex indices buffer

I just started using VBOs, and everything seems to be fine except for the vertex indices buffer. If I call glDrawElements after enabling the indices buffer I get an access violation error (can't find the indices) and if I simply call it with a…
Zepee
  • 1,640
  • 3
  • 20
  • 40
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
  • 165
  • 1
  • 4
  • 11
4
votes
3 answers

OpenGL 3.x: Access violation when using vertex buffer object and glDrawElements(...)

I have trouble rendering some geometry by using a vertex buffer object. I intend to draw a plane of points, so basically one vertex at every discrete position in my space. However, I cannot render that plane, as every time I call…
Walter
  • 396
  • 1
  • 5
  • 16
1 2
3
21 22