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.

311 questions
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
  • 1,344
  • 17
  • 70
  • 143
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
  • 17,763
  • 14
  • 122
  • 177
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,780
  • 3
  • 20
  • 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,068
  • 2
  • 13
  • 28
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,767
  • 4
  • 20
  • 31
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,362
  • 2
  • 15
  • 36
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
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
  • 386
  • 1
  • 5
  • 16
4
votes
1 answer

OpenGL buffers - Stride vs Tightly packed

What are the pros and cons for using strided vertex buffers vs tighly packed buffers for each attribute? What I mean is for instance: Stride: xyzrgb xyzrgb xyzrgb Tight: xyzxyzxyz rgbrgbrgb At first glance it might look like you easily can change…
bofjas
  • 1,146
  • 7
  • 19
4
votes
2 answers

DirectX - halfs instead of floats in vertex buffer

Recently I decided to compress my vertex data to make rendering more efficient, and I came across a solution - using half (specifically, half4 and half2) instead of float for storing my vertex data. My vertex struct is given below: …
RaZeR RawByte
  • 238
  • 1
  • 10
4
votes
1 answer

Binding a second vertex buffer seems to spoil my first vertex buffer, OpenGL OES ios 5.1

I'm creating two different vertex buffers, that use two different shaders to render them. As soon as I bind the second vertex buffer, the data I parked in the first vertex buffer seems to be corrupted or lost. If I generate and draw one vertex…
bobobobo
  • 57,855
  • 58
  • 238
  • 337
4
votes
2 answers

How to use glBufferData() in PyOpenGL?

How do you use glBufferData() in the PyOpenGL python bindings to OpenGL? When I run the following code import sys from OpenGL.GL import * from PySide.QtCore import * from PySide.QtGui import * from PySide.QtOpenGL import * class…
Johan Råde
  • 18,399
  • 19
  • 62
  • 103
3
votes
2 answers

How do I fix the following gcc warnings?

I've started learning OpenGL and managed to create a spinning cube using vertex buffer objects. However, when I compile my code, gcc issues the following warnings: || sdlogl.c: In function ‘initGL’: sdlogl.c|48| warning: implicit declaration of…
Alexandros
  • 2,906
  • 1
  • 21
  • 34
3
votes
1 answer

Most generally correct way of updating a vertex buffer in Vulkan

Assume a vertex buffer in device memory and a staging buffer that's host coherent and visible. Also assume a desktop system with a discrete GPU (so separate memories). And lastly, assume correct inter-frame synchronization. I see two general…
Blindy
  • 55,135
  • 9
  • 81
  • 120
3
votes
1 answer

Memory management for vertex buffer data

Assume that I need to render static picture (100 stars). I generate star data (position, color, size) to std::vector stars; Then I create a class for D3D rendering, which consist a buffer: CGalaxyMapRenderer { … CComPtr
ToughDev
  • 117
  • 1
  • 5
1 2
3
20 21