Dario3d Dario3d - 1 year ago 134
C++ Question

OpenGL large data 3d plot

I'm trying to make a 3d plot of large data sets (for example 1000 x 500 points) in which x,y is uniformly spread (for example 0, 8, 16, 24 so on), and z describes a value. I were trying to do this with Qt and OpenGL as in here. The problem is that i don't know how many points i will need (it varies), but their amount will be large, and on initialization of VBO i need to specify the amount:

#define N 256
GLbyte graph[N][N];

... /* fill graph here */

/* Upload the texture with our datapoints */
glGenTextures(1, &texture_id);
glBindTexture(GL_TEXTURE_2D, texture_id);

So as in this example, in my case N value would be much higher to hold all the points, but i get stack overflow error.
What is the best way to cope with this problem? How can i specify not known amount, other than specifying max amount available? Is there another way to optimize generation of 3dplots of large datasets?

Answer Source

Of course a vector was a reliable answer to my question, thanks to all who commented on my post :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download