Remove locking confusion

The current lock creates display lists, however VBO is preferred in some circumstances.



Would be nice just to call lock on the spatial and have the spatial decide its locking policy - VBO or Lists

The jME2.1 design document I present here: http://www.jmonkeyengine.com/jmeforum/index.php?topic=9379.0

has a geometry system that takes care of it. A user simply specifies a "usage mode" and the engine makes the decision which optimization path to use depending on the video card capabilities.

Branches (Nodes) cannot be locked, display lists do not handle texture switches and don't handle shaders. If it was me to decide, i would drop display lists altogether.



It may be a valid strategy to reorganize the buffers during gameplay, but i did not ever hear of something like that.



The scene graph changes, so you could call lock after some changes, and the engine would need to reorganize all the buffers at the moment the lock is called, this is not acceptable during runtime.  Instead, i think it would be a better idea to implement saving of geometry packs based on a provided scenegraph, with possibility to save all the geometry of a branch into a single pack. This is however a task for a game editor like MW3D, and not to be done during actual gameplay, nor during the game startup. If you know how the geometry should be in memory, why not load it like that in the first place?


vear said:

If you know how the geometry should be in memory, why not load it like that in the first place?


Perhaps some worlds evolve ??