Jump to content
  • Advertisement
Sign in to follow this  
JacekKuzemczak

OpenGL OpenGL VBO Questions

This topic is 2364 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!