To build my landscape I use Beizer surfaces, rendering them with glEvalMesh2.
All it well, however when I use an exceeding number of control points (50+) my frame rate is terribly effected.
I've used display lists only to find the fps remains the same?
import static org.lwjgl.opengl.GL11.*;
......
public void compileLists() {
........
glMap2f(GL_MAP2_VERTEX_3, 0.0f, 1.0f, 3, getSurface().getLength(), 0.0f, 1.0f, getSurface().getStride(), getSurface().getLength(), getSurface().getLandscape());
glMapGrid2f(detail, 0f, 1f, detail, 0f, 1f);
glEnable(GL_MAP2_VERTEX_3);
glNewList(landscape, GL_COMPILE);
........
[*]glEvalMesh2(Game.getGame().getHub().isGridView() ? GL_LINE : GL_FILL, 0, detail, 0, detail);
........
glEndList();
.......
}
Then on rendering all I call is
glCallList(landscape);
It works well, except with 25+ control points the fps declines.
I geuss my questions are:
- Why is the glList the same speed as just rendering without the lists (Same decline at 50 points+)
- Is there another way I can render this to improve frame rate
I've pondered vbo's however I don't believe Ill get the same Beizer surface effect.
Here's a video of my program:
http://www.youtube.com/watch?v=6ZHvdR48HGA