[QUOTE=alicana;1265865]Assume that an application, which is placed outside, sends point data sequentially. Point structure contains ID, (X,Y) position, color and point size information.
Also, this data can be reach 2 million. Obviously, its impossible that drawing 2M glVertex2f() between glBegin()/glEnd(). So, I tried to use VBO with initial capacity by giving 2M.
[/QUOTE]
To draw 2M or 20M or 200M into memory is not a problem for todays device.
glBegin()/glEng() is really inefficient. instead you can use vbo as you said. which can add, delete and modify contents.
In fact, you could assign several vbo to content your big data requirement flexibly.
But, VBO approach does not allow me to add (resizing capacity), update or removing data from itself. (maybe VBO can be updated but I don’t know?)
To draw 2M or 20M or 200M into memory is not a problem for todays device.
glBegin()/glEng() or list is really inefficient or inconvinient. instead you can use vbo. which can add, delete and modify contents.
you may refer to glBufferData(), glMapBuffer(),etc.
Then, I thought that, insignificant to draw 2M point in a window. Most of them will not able to be shown (am I still right here?)
My following question is now:
- What would you do if you have big number of data to be drawn, that are added-removed sequentially?
I really need some advice
you do certainly not draw up to 2M points in a window, you may make an error calculation, or they are not in a window(or frame). even if for 4k definition, you can not.
suppose you fill all the screen with primitives, the points will be far less than 300k at most.
But you hve to know, to draw them and to show them on the screen is totally not a same concept.
for example, if you would have two triangles, a vertex of one is covered by another one, you do certainly not lose this vertex for imagine to reduce store size. otherwise, the computer or gl will not construct this triangle. you will be shown only two points, or get another different one, or get a warning in build.
- Is Fragment shader or vertex shader is vital in this situation ?
of cuase not, agree to above fellows idea. if you don’t deal with rendering, ignore it.