OpenGL VBO Questions

Started by
1 comment, last by JacekKuzemczak 11 years, 10 months ago
Hi guys,

Like a lot of people here I recently decided I was going to get into game development. I have a pretty good knowledge of Java so I picked that as my language and LWJGL for OpenGL bindings.

I got something working pretty quickly, I'm making a top down shooter and so far have made a 3D level that can scroll around the screen. I did this using what I believe is referred to as immediate mode since that is how most of the tutorials seem to go about things. I then did a bit of reading on here about how that is the wrong way to do things and that I should use VBOs instead.

My level is made up of tiles, each tile is either a wall block or a floor tile. So my question is, should I be trying to put the whole level into one big static VBO or can I keep doing it in a similar way to how I am now and create a VBO for each tile ?

Also, I don't really understand how to convert from the current immediate mode code to the better style VBO code. I know this probably gets asked a lot but could someone point me to an example of the correct way to render a simple shape ? I have searched for quite a while but the only examples I found seemed a bit overcomplicated.

Sorry for sounding noobish, I know I used some of the terminology wrong. Only been doing this for a few days ;)

Any advice would be great biggrin.png
Advertisement
Put many tiles into a single VBO, maybe the whole level. For really large levels or when you need to change the level dynamically, divide the whole level into blocks and put a single block into a vbo.

Put many tiles into a single VBO, maybe the whole level. For really large levels or when you need to change the level dynamically, divide the whole level into blocks and put a single block into a vbo.

Okay thanks, I was thinking that made the most sense anyway so that's good.

This topic is closed to new replies.

Advertisement