A few questions about using Polylines

Started by Wyatt, January 08, 2014, 01:51:44 AM

Previous topic - Next topic

Wyatt

Thank you for this awesome engine!

I have a few noob questions about the implementation of Polyline.

1. Are the arrays for Polylines automatically pushed into VBO's behind the scenes?

2. If an array of a certain arbitrary length is declared, and then one of the vertices is changed, does the change push the whole array into the VBO all over again, or does it use something like glBufferSubData?

I ask because I want to render lines like a line graph based on incoming data, so I had the thought that I could initialize a large array, push vertices into it one by one as they come in, then increment the visibility percentage.  And use the excellent camera controls you provided for zoom and pan after all my samples are loaded.

Thanks for any clues you can give me.

--Wyatt--

Wyatt

On further investigation, as best as I can tell it looks like the Polyline arrays are held in main memory, not VBO's.

EgonOlsen

That's only the local copy. Finally, they will be pushed to the gpu, but i can't remember how that happens ATM. I'll look into it this evening.


EgonOlsen

They are stored in a vertex array which will then be rendered. I don't use VBOs in this context.