I guess this would be regarded a chunk of the whole world and would be sent to the gpu in one blast using a VBO? Also need some perlin/simplex noise for the heights, as mentioned just using a simple random number for them.

Don't be scared of display lists. I'm running my game with displaylists in State of Fortune and it performs quite well. It even outperformed VBO's for drawing on my gfx card thanks to some driver optimization magic. It is a lot slower to update them though (factor 10 or so for my 66x66 chunks). VBO's are very useful when doing things like particle engines and dynamic animations, but other than that it isn't all too bad to use display lists.

So just to clarify, VBOs really aren't all that useful and don't offer much performance over Display Lists when used in static geometry?

With my tests (using the different Riven VBO/VA techniques) I managed a more stable fps with VBO's (constantly in the 80's) while with display lists it fluctuated a bit more when looking around, but it was constantly higher (90-110).

Display lists have been completely removed from OpenGL 3.1 (still compatibility with ARB supported) and in 3.2 it is up to the driver writers if they want to support them - in compatibility profile.

Luckily LWJGL doesn't force you to use the 3.1 profile then I can just talk for myself and I've had less compatibility issues with State of Fortune which uses Displaylists than I have with State of Profit that uses VBO's. Sure, you need to have a really crappy (intel...) gfx driver to not be able to use VBOs correctly, but they are out there.

As the voxels are static is display list the best way, although, the player will be able to remove blocks so does this mean the display lists will need rebuilding?

When you remove blocks the display lists will need rebuilding, but if you try out State of Fortune you'll notice that the time it takes to rebuild the displaylist isn't even noticable as long as you spread out the rebuilding of several containers over several frames (which you should do with VBO's as well).

I'm not saying to use displaylists instead of VBOs, I'm just saying that it isn't as bad as people say they are. Especially seeing as at least my NVIDIA drivers optimize the (semi) static ones so heavily that they outperform what I can do with VBOs, even while following Riven's latter examples (http://www.java-gaming.org/topics/introduction-to-vertex-arrays-and-vertex-buffer-objects-opengl/24272/view). For anything dynamic that needs to be rebuilt more or less every frame, use VBOs, especially as you can multithread the creation of them with ease.

I'm quite new to OpenGL, was stuck on the direct3d band wagon for a while.

Have you any advice on a simple technique to get heights for my voxels, just using a simple random value at the moment which looks crud, need it look smoother, I've got the SimplexNoise class, but not tried to use it as yet.

It is looking like you shouldn't use glTranslatef - so if not using a translate, do the blocks need to be in some form of local coordinate space? Sorry for not understanding fully, just trying get my head around how you would draw a block without glTranslatef and put another block at the side of it?Do you have to translate all the blocks first then send to the GPU?

So you put one chunk into VBO then render it, then get next chunk, put that into VBO, translate, then render it etc?...

I'm using display list atm, doesn't seem too bad...but should it be in a VBO?

Thanks again

VBO's are just like display lists, so you only have to store data inside it when the data changed.Each chunk, block or object can have its own VBO.With VBO's its possible to update only a small part of the data, what would be much faster then updating all data like with display lists.

glTranslatef(x,y,z); can be removed by making the list (or the VBO in the future) draw the whole chunk instead one block.

So, we can just use an offset on the vertex data for a block to position it?

Also, how would I store all the blocks for a chunk into one display list?

I guess I should do this next:

1. Put chunk into a VBO (all blocks for a chunk) - add an offset to each vertex in block to position it (modify vertex position directly) instead of using glTranslatef...2. Render chunk3. Get next chunk, repeat 1 until all chunks done

Does this seem ok? Then in (3) we add offset to chunk position (width of chunk)?

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org