vbo

Debugging VBO Vertex buffers crashes

I'm using the VBO extension for storing Vertex, normal and color buffers (glBindBufferARB) For some reason when changing buffers or doing some operation the application crashes with an access violation. When attaching The debugger I see that the crash is in some thread that is not my main thread which performs the opengl call with the ex...

Can I use indexed primitives when using vertex buffer objects in OpenGL ES 1.x?

Hi, I have an array that contains a list of vertices which I copy to the GPU using a vertex buffer object. However the vertex coordinates on their own are meaningless as I also have an integer array that contains a list of indices into the vertex array. In this scenario is it possible to create another buffer object to store the indice...

Texturing Vertex Buffer Objects

What I want to do is drawing a (large) terrain with OpenGL. So I have a set of vertices, lets say 256 x 256 which I store in a vertex buffer object in the VRAM. I properly triangulated them, so I've got an index buffer for the faces. // vertexes glBindBufferARB(GL_ARRAY_BUFFER_ARB, vertexBufferId); glVertexPointer(3, GL_FLOAT, 0, 0); //...

When are VBOs faster than "simple" OpenGL primitives (glBegin())?

After many years of hearing about Vertex Buffer Objects (VBOs), I finally decided to experiment with them (my stuff isn't normally performance critical, obviously...) I'll describe my experiment below, but to make a long story short, I'm seeing indistinguishable performance between "simple" direct mode (glBegin()/glEnd()), vertex array ...

OpenGL: efficient way to render a batch of geometry?

This is something I've been looking into for while, but I have yet to find any concrete information or good examples. I have, say, a bunch of unconnected objects (triangle strips for instance). What is the efficient way to render these? I've heard about putting several objects in one VBO to reduce openGL calls, but have not seen a prope...

Problem with using OpenGL's VBO

I just tried to render the first redbook example ( the white Quad ) by using VBOs. It works fine with immediate mode and vertex arrays. But when using VBOs the screen stays black. I think i must have missed something important. init: unsigned int bufIds[2]; glGenBuffers( 2, bufIds ); GLfloat vertices[] = { 0.25, 0.25, 0.0, 0.7...

How do I use Vertex Buffer Objects to render many different circles?

I'm trying to write a game that deals with many circles (well, Triangle Fans, but you get the idea). Each circle will have an x position, a y position, and a mass property. Every circle's mass property will be different. Also, I want to color some groups of circles different, while keeping a transparent circle center, and fading to opaqu...

How do I use OpenGL 3.x VBOs to render a dynamic world?

Although there seem to be very few up to date references for OpenGL 3.x itself, the actual low level manipulation of OpenGL is relatively straight forward. However I am having serious trouble trying to even conceptualise how one would manipulate VBOs in order to render a dynamic world. Obviously the immediate mode ways of old are non ap...

Managing OpenGL VBO's and color

I'm creating an app that uses VBO's for drawing. The app draws line segments of multiple colors. Therefore, I'm creating a vertex and index array for each color, and sorting the segments into the appropriate array by color. However, I'd like the user to be able to set the color of any line segment. Therefore, my potential number of c...

Does it make sense to use Vertex Buffer Objects even when changing the Model View matrix?

I'm looking to get some additional performance (FPS) increases on my iPhone App. I'm already using interleaved data, GL_SHORT and a single texture atlas. See this question for details of what I've already done. Now I want to look at using VBOs to increase performance. According to Apple's OpenGL ES documentation this is a good step t...

Problem mapping textures to VBO in OpenGL

I'm having trouble getting a texture to map onto geometry properly with OpenGL. In fact I seem to have even broken the colour interpolation that used to work fine. I've created a test case in C99 that uses SDL, GLee and SOIL. #include <stdbool.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <S...

Is VBO effective for drawing 2D animation-sequence-sprites in iPhone's MBX chip?

VBO is effective complex geometric 3D object. But I think plain DrawArray with transformed vertices/texcoords are better for 2D animation sequence sprites. Because there are a only 4 vertices for a box. With VBO, those vertices duplicated for each texcoords, and draw function should be called many times. But with DrawArray, just pushes...

How do VBOs/FBOs/DisplayLists work in Haskell's OpenGl bindings?

Haskell is about computation by calculation of values. DisplayLists / FBOs / VBOs are very very stateful by nature. I.e. "give me a display list / buffer object". How do these bindings work in Haskell? [I do understand monads; so a technical explaination, as opposed to a fluffy one, is preferred]. Thanks! ...

Vertex Buffer Object not drawing in SDL window

I'm just using the opengl SDL template with Xcode, and everything runs fine. I removed the Atlantis code, and changed the main extension to .mm, then added some testing code to drawGL. Drawing a simple triangle (using immediate mode) at this point inside drawGL gives me a white triangle, but when I add the code to draw using a vertex buf...

OpenGL fast texture drawing with vertex buffer objects. Is this the way to do it?

Hello. I am making a 2D game with OpenGL. I would like to speed up my texture drawing by using VBOs. Currently I am using the immediate mode. I am generating my own coordinates when I rotate and scale a texture. I also have the functionality of rounding the corners of a texture, using the polygon primitive to draw those. I was thinking...

OpenGL Vertex Buffer Object code giving bad output.

Hello. My Vertex Buffer Object code is supposed to render textures nicely but instead the textures are being rendered oddly with some triangle shapes. What happens - http://godofgod.co.uk/my_files/wrong.png What is supposed to happen - http://godofgod.co.uk/my_files/right.png This function creates the VBO and sets the vertex and textu...

How do I get the length of a VBO to render all vertices when using glDrawArrays()?

I create a VBO in a function and I only want to return the VBO id. I use glDrawArrays in another function and I want it to draw all the vertices in the VBO without needing to also pass the number of vertices. The VBO also contains texture coordinate data. Thank you. ...

Problem when trying to use simple Shaders + VBOs

Hello I'm trying to convert the following functions to a VBO based function for learning purposes, it displays a static texture on screen. I'm using OpenGL ES 2.0 with shaders on the iPhone (should be almost the same than regular OpenGL in this case), this is what I got working: //Works! - (void) drawAtPoint:(CGPoint)point depth:(CGFloa...

How to apply multiple textures to a VBO of a cube?

Dear reader, I'm new to VBO's and read some articles on creating and using VBO's. I am working on a application where I want to create a dozen of rotating cubes. I'm connected to a server which pushes text messages to my application. When I receive 6 text messages, I render these messages using Pango and Cairo. Then I want to create t...

OpenGl VBO technicalities in C++

I'm a little confused as to the proper usage of VBOs in an OpenGL program. I want to create a terrain paging algorithm, using a map called from a 4096x4096 greyscale heightmap as the "whole" map. From what I've read, each vertex stored in the VBO will take up 64 bytes. The problem I have is that most sources state that a single VBO sh...