[osg-users] Appending dynamic 3d line

Ertan Ataman ertanataman at gmail.com
Thu Jan 11 07:58:11 PST 2018


Hi
I updated my code and reattached.

Yes. Since I tried on many solutions I left unnecessary lines
[/quote]General comments : You don't need to add VertexArray and ColorArray as
well as VertexAttribArray for each of the vertex and color arrays.
You only need to use VertexAttirb's when using shaders that you
specifically want to name differently than the defaults. My
recommendation would be to just use the setVertexArray/setColorAray,
You also don't need to pass the ColorBinding twice - passing it as a
parameter of setColorArray is sufficient.
> 
> 
> About setUseDisplayLists function:
> I already called setUseDisplayList (wihout plural suffix -s at the end).  
> setUseDisplayLists does not exist in osg include directories.
> Also calling setUseDisplayList each step did not differ so I removed it.
> 
> 
> 
The next thing I would recommend is when doing dynamic data you
shouldn't use display lists, so just do a geometry->setUseDisplayLists(false) 

> 
> 
> 
> If I do not call dirtyDisplayList or setVertexArray just few line segments are drawn and possibly they are not mines.
> 
> 
and then you don't need to call
dirtyDisplayList() and there won't be any performance blimps that
would happen each time the display list is regenerated.
> 
> 
> I've forgotten to mention that I run the code under both Ubuntu and Windows and have same result.
> 
> Thanks.


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72738#72738




Attachments: 
http://forum.openscenegraph.org//files/route_345.cpp




More information about the osg-users mailing list