[SOLVED] VBO issue - having trouble with rendering

Started by Suds, October 13, 2011, 07:04:55

Previous topic - Next topic

Suds

Hey, I'm experimenting with setting up a VBO to render my (cube based) world. This code should draw a cube (at least that's the intention), it generates no errors:

http://pastebin.com/UrqHLmb7

I've been over the code on "Using Vertex Buffer Objects" at http://lwjgl.org/wiki/index.php?title=Using_Vertex_Buffer_Objects_(VBO) a fair few times now. The trouble I am having, is that my game does not draw a cube at all. There are two classes in that paste - the VBOHandler class that I wrote is at the bottom. To rule out camera issues, I set up a camera that points at a reference grid around the origin too. This is what my game sees http://dl.dropbox.com/u/18809996/game.png

The reference grid is made with just plain vertices - not buffered, not using an index buffer, nothing. Just vertices.

Can anyone see what is wrong with my code there?

EDIT: My issue was solved on this cross post http://www.java-gaming.org/index.php/topic,24915.msg212630.html#msg212630

I just needed to flip buffers, and I had forgotten to actually VBOHandler.bufferData(_coloursID, bufferedColours);