glob3mobile / g3m

The multiplatform advanced visualization framework
http://www.glob3mobile.com/
Other
116 stars 56 forks source link

Add and remove marks #206

Closed octavianiLocator closed 7 years ago

octavianiLocator commented 7 years ago

Hi guys,

Which is the recommended method to add and remove marks on the fly?

I am using the following :

Add mark:

// runs on UI thread
    mark = new Mark(....);
    _marksRenderer.addMark(mark);

Remove Mark:

// runs on UI thread
    _marksRenderer.removeMark(mark);

Clear globe of all marks:

// runs on RendererThread
    _marksRenderer.removeAllMarks();
DiegoGomezDeck commented 7 years ago

Please see issue #17

Basically, every call to every method for every classes of g3m must be done form the OpenGL thread. G3M provides an utility method for this: IThreadUtils::invokeInRendererThread().

octavianiLocator commented 7 years ago

Awesome. Made all the g3m-method calls to run on OpenGL thread and everything is nice and smooth. Thanks a ton, @DiegoGomezDeck