Hi Ertan,

Just had a quick look at your .cpp file.

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.

The next thing I would recommend is when doing dynamic data you
shouldn't use display lists, so just do a
geometry->setUseDisplayLists(false) 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.

Make these changes are things should run smoother.

Robert.

On 11 January 2018 at 14:24, Ertan Ataman <[email protected]> wrote:
> Hi,
>
> In the program I append random points to my line sements array( Route 
> instance) and after a while it stucks (and I think appends(0,0,0) as the last 
> point but not very sure about its coordinate.)
>
> The strange thing is when I increase the frequency (decrease STEP_DURATION), 
> the number of drawn segments increases. I think something is corrupted but 
> could not find the reason.
>
>
> I also attached 3 screenshots for 1, 100 and 1000(May not be really 1000) 
> frames per second. By changing STEP_DURATION, the change in numbers of line 
> segments can be seen.
>
> All I want is to be able to append my segments forever without the undesired 
> other point.
>
>
> My problem is possibly same with another 
> topic(viewtopic.php?t=2190&postdays=0&postorder=asc&start=0) in this forum 
> but with a new clue. Since an other problem is appended there I created a new 
> topic.
> And attached Route.cpp is  Route.cpp, based on a source 
> code(//files/osgdinamicline_180.cpp) in the topic, shared on that topic. 
> Since it is my first post I can not share their url's here
>
> Thank you!
>
> Cheers,
> Ertan[/img][/code][/quote]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72728#72728
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/randomroutes_with_different_fpss_837.jpg
> http://forum.openscenegraph.org//files/route_762.cpp
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to