I try to draw around 20.000 vertexes with textures but the motion animation is slow when run the program.
I have a file (.txt) with 20.000 vertexes vectorial directions; the program read the file perfectly; charge the arrays with the data; and show the scene but very slow. How I do for the motion will be normal (fast) and not slow.
the structure is read array file (.txt) use glvertexf();
So your object data is static ? Then use a display list or better a VBO (vertex buffer object).
20000 vertices is very small, should not be a problem. What is you hardware ?
i’m not sure that would be the problem but, either way, you could (should!) try a better solution for rendering those vertex.
glVertex*() is the slowest way possible to draw geometry.
Better than that are Display Lists, Vertex Arrays and then VBO as options.
You can google those terms around and learn a bit more about each.
You could start with Vertex Arrays as they are basically rendering from an array of vertex coordinates, and you seem to have one. You basically enable the feature and tell OpenGl which is your array and draw it all (or parts of it) with a single call, rather than looping for the whole it and making a call for each vertex.
Hi;
Yes, I need a some example code about vertex arrays but in delphi+opengl; I see what its the problem; so I believe so glvertexf() is so very slow way to draw many vertexes.
VBO no is support by my AGP card
PD. the data is dinamic. get from a file (.txt) this records are generated and saved with the same program.