You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but in general, pi3d doesn't really have a well-defined lifecycle of "things we keep track of" that lets you remove something and make sure for sure that all of its parts will stop rendering and that all its resources will be freed.
The text was updated successfully, but these errors were encountered:
Building is a bit of special case because it combines standard Shape objects with the special collision system. Generally everything that is displayed inherits from Shape so maybe we could add something to that class that registers itself in Display. There is already a facility for this in the Display.sprites list and Display holds lists of the glbuffer and texture objects so it might not require much else. Possible issues are to do with trailing/circular references stopping the del() or gc working and the 'clone' mechanism where multiple Shapes can share Buffers. Having said this the clean up process for Shapes is now pretty good but I suppose it might be useful sometimes to get a full list.
The other point is that it would be nice to have a method in Shape that could do collision detection so that Building could be significantly simplified. We already do this for the ElevationMap but it's less trivial for more complicated nets with lots of vertices. I might scout around for some ready made algorithms!
Circular references are only an issue if there's an del method, but
registering your class with Display will keep the reference so your class
will never be deleted...
Remember that you can always use weak
referenceshttp://docs.python.org/2/library/weakref.html to
deal with the garbage collection issues - if you're careful!
Building is a bit of special case because it combines standard Shape
objects with the special collision system. Generally everything that is
displayed inherits from Shape so maybe we could add something to that class
that registers itself in Display. There is already a facility for this in
the Display.sprites list and Display holds lists of the glbuffer and
texture objects so it might not require much else. Possible issues are to
do with trailing/circular references stopping the del() or gc working
and the 'clone' mechanism where multiple Shapes can share Buffers. Having
said this the clean up process for Shapes is now pretty good but I suppose
it might be useful sometimes to get a full list.
The other point is that it would be nice to have a method in Shape that
could do collision detection so that Building could be significantly
simplified. We already do this for the ElevationMap but it's less trivial
for more complicated nets with lots of vertices. I might scout around for
some ready made algorithms!
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/153#issuecomment-23605875
.
See this thread: https://groups.google.com/forum/#!topic/pi3d/I0YCo9fd594
There's now a simple solution for Building...
but in general, pi3d doesn't really have a well-defined lifecycle of "things we keep track of" that lets you remove something and make sure for sure that all of its parts will stop rendering and that all its resources will be freed.
The text was updated successfully, but these errors were encountered: