Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

27. May 2012, 02:32:25 am
Xith3D CommunityGeneral CategoryNews (Moderators: Marvin Fröhlich, 'n ddrylliog)OpenGL resource freeing
Pages: [1]
Print
Author Topic: OpenGL resource freeing  (Read 881 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« on: 17. December 2007, 03:01:52 pm »

I have replaced the old resource cache system, that never worked and was never really used with a new robust system, that automatically frees OpenGL resources when a SceneGraph object is being GCed or when the Canvas is being destroyed. Do don't have to do anything manually except for the case, if you store objects in a local cache and don't have them (or a shared copy) in the scenegraph. In this case you have to manually call the freeOpenGLResources() method, before destroying the Canvas. This method is defined on any Node and NodeComponent and automatically traverses the sub-graph. The ResourceBag also has this method. So if you're using the ResourceBag as your local cache, you can simply call this method on the ResourceBag and everything is fine.

These news allow you for recreation of the Canvas for resolution changes etc. at runtime. There is absolutely no problem with limited canvasIDs anymore. You should be able to recreate the canvas any number of times. Separate Canvases should be no problem, too. But this is a rare case and should anyway not be done in favor of multiple viewports on one canvas.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic