works internally to avoid full-scene graph traversals
once per frame.
Random unrelated things first:
Spatial constructors were modified to be protected since it
is an abstract class and it's good practice. I also flipped
them to be this(default values) instead of this() to delegate
constructors.
Geometry and Node constructors were modified in similar ways
to at least call the this(name) version of the constructor
everywhere.
removeControl(Class) was modified to do what it's javadoc
says and only remove the first encountered control. Prior
to this change, it was removing all matching controls.
The meaty stuff:
Node.updateLogicalState() no longer traverses all children
and never traverses any children at all unless it is the root.
If it is the root node, it keeps a list of all Spatials that
require updates and only iterates that list.
Spatial was modified to have a package-private requiresUpdates()
method that returns true if the requiresUpdates flag is set
or the Spatial has controls.
The requiresUpdates flag can be set by subclasses that require
updateLogicalState() to be called even if they have no controls.
(BitmapText is such an example.) By default, subclasses will
_always_ have this flag set to true, ie: default to the OLD behavior
and avoid silently breaking.
Subclasses that wish to have the new-hotness optimal behavior
must call setRequiresUpdates(false) in their constructors.
They can opt in to better performance rather than silently
breaking with an upgrade.
The only negative side effect of this change (other than
slightly increased complexity) is that for large scene
graphs with lots and lots of controls or children requiring
updates, a large list of spatials will be kept in the root
node. This will never exceed "number of spatials in the
scene graph" and so already had a fairly small upper bound
with the old code due to performance.
I think I've captured all of the edge cases... but we'll
see. :)
Stress test example to follow.
* Similar to the OpenAL URA, OpenGL calls are now made to an interface
which is implemented by the backends
* Major cleanups in the texture util code to handle GLES2 texture formats
* Split the GL interface into several interfaces depending on API and version:
- GL (common denominator for all GL APIs)
- GL2 (desktop GL2)
- GL3 (desktop GL3)
- GLFbo (framebuffer object functions)
- GLExt (desktop GL and OpenGL ES extensions)
* Added GLTracer class which traces OpenGL calls made by the engine when activated
* Remove caps generation since it is no longer used by LWJGL renderer
* Generate a separate interface GLExt for features only available in extensions to more easily detect their usage
* Fix some extension references
- In certain cases, padding was present at the end of streams causing noticeable clicking when looped. This is handled by truncating the stream to its actual size.
- When playing an ogg stream without stream cache, an exception would be raised since the stream was closed prematurely
Previously, a discontinuity occurred when looping an OGG/Vorbis stream,
this happens due to a bug in J-Ogg library. To work around this issue,
we load the logical ogg stream and vorbis stream from scratch based
on the already loaded existing OGG pages instead of using the
buggy setTime(0) call.