Hello,
I’m currently trying to implement the geomipmapping LOD technique for a heightmap based terrain using jogl as OpenGL wrapper.
The technique basically divides the terrain into quadratic tiles and then renders, depending on distance from viewer, the tile with different resolutions (e.g. leaving out every second vertex, etc). Since there is only a fixed number of resolutions (and the vertices used stay the same), I want to create an index-array (stored in graphics memory with VBO-support) for each one.
The vertices of the terrain are all put in a single VBO, first the vertices of the first chunk, then for the second and so on.
Since the chunks are all organized in the same way, I could use the same set of index arrays for all of them, if I can specify and offset in the glVertexPointer call (which works in C, according to the spec).
Currently I’m using something like this:
gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, vboID);
gl.glVertexPointer(3, GL.GL_FLOAT, 0, (Buffer)null);
and what I would like to to is something like this
gl.glVertexPointer(3, GL.GL_FLOAT, 0, (Buffer)null + chunk*chunksize);
Is it possible to do this somehow in java?
I hope I could make clear what my problem is. Any ideas would be greatly appreciated.
Jan Eickmann
P.S.: Same thing applies to “normal” vertex arrays. I have to have them as a fallback, since apple has not yet implemented the Vertex Buffer Objects ARB extension in their drivers.