The update optimization will not visit child nodes unless the
parent has any refresh flags set. However if a "partial update"
occurs which only clears some of the flags (e.g. getWorldBound()),
then a situation could occur where a child node has refresh
flags set but not its parent, thus causing the aformentioned issue.
To allieviate this, we must always propagate the specific flag
required, regardless of whether or not the parent has some other
flags already set.
* Add new "Limits" enum to hold maximums of various renderer capabilities such as texture size
* Add support for seamless cubemap (enabled by default for mipmapped cubemaps)
* Fix conflict when using GL tracing with GL debugging
* Add new "Limits" enum to hold maximums of various renderer capabilities such as texture size
* Add support for seamless cubemap (enabled by default for mipmapped cubemaps)
* Fix conflict when using GL tracing with GL debugging
* Relax NPOT texture restrictions on OpenGL ES 2:
allow non mip-mapped, non repeating NPOT textures - mainly used for GUI elements
* Fix various texture array issues:
- compressed textures were causing a GL error
- the array size was always set to 1 instead of the actual number of images in the array
Depreciated InputManager.getSimluateMouse and replaced with InputManager.isSimulateMouse for consistancy.
Removed depreciated TouchInput.getSimulateMouse().
Added InputManager.isSimulateKeyboard() to keep consistancy with mouse methods.
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.