[osg-users] [About VertexArrayObject Branch] FeedBack and Insight
Robert Osfield
robert.osfield at gmail.com
Thu Aug 18 12:52:39 PDT 2016
HI Jannik,
On 18 August 2016 at 13:50, Jannik Heller <scrawl at baseoftrash.de> wrote:
> Have you done benchmarking to see if avoiding these if checks makes a difference?
Yes. It helps just doing one check.
> Have you considered checking the individual arrays could be advantageous if not all arrays have changed?
The new implementation does one high level check to see if any array
has been updated, and if so then individual checks for each array to
see if it needs to be updated.
> For example, with a skeletally animated model, you would update only the vertices (and possibly normals) every frame while the texture coordinates, indices and colors will remain static. Here we could save a whole bunch of GL calls (possibly even buffer uploads?) by testing the arrays individually.
This is how it works right now :-)
> Perhaps we could have one "dirty" flag for the whole VAO, and if it's dirty, we start testing the arrays individually to see which ones changed. If VAO isn't dirty, no need to test the arrays.
The VertexStateState effectively has a dirty, I'm away for a long
weekend so can't check the code.
THis dfirty flag is set to on when you set Drawable DataVaraince to
DYNAMIC and can be invoked manually by calling
drawable->dirtyGLObjects();
Robert
More information about the osg-users
mailing list