Author Topic: to delete an Object3D  (Read 86 times)

Offline MichaelJPCT

  • long
  • ***
  • Posts: 145
    • View Profile
to delete an Object3D
« on: October 28, 2018, 09:03:18 am »
Hi Egon, long time no see. i am still using JPCT for my hobby project , and i'm happy with it so far.
now i need to add/delete Object3D , like a lot. i see dispose() of Light , but no such thing of Object3D. does it mean it's safe to just remove it from World and set the field to null and let JVM do garbage collection?
and for other object types, are they all safe if there is no dispose() method?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11924
    • View Profile
    • http://www.jpct.net
Re: to delete an Object3D
« Reply #1 on: November 05, 2018, 08:25:56 am »
Yes, it should be save to do that, but you have to make sure that each and every reference is gone, of course. It should then queue the GL buffers and dispose them eventually. Or you could disable vbo support in Config at all. In that case, there's nothing that has to be disposed GL wise in the first place. Performance might suffer a little though.