4407 Commits

Author SHA1 Message Date
Paul Speed
1f148fc3d7 Added a large scene stress test. Defaults to:
Total nodes:4681  Total Geometry:32768  Total controls:314

...the split depth can be increased for even more ridiculous
scenes.
2014-12-07 04:43:49 -05:00
Paul Speed
05c6986492 Significantly changed the way updateLogicalState
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.
2014-12-07 04:39:22 -05:00
shadowislord
d3258429ec Use unified renderer architecture for LWJGL by default (other backends pending) 2014-12-05 22:36:55 -05:00
shadowislord
f189b94a4d Implement the new GL interface for the LWJGL backend 2014-12-05 22:34:54 -05:00
shadowislord
bd318f5d1b Introduce the unified renderer architecture for the OpenGL renderer
* 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
2014-12-05 22:29:58 -05:00
shadowislord
d8b9c6dab5 Make Renderer.initialize() a standard method since everyone already uses it anyway 2014-12-05 22:15:40 -05:00
shadowislord
ad26e916ee Update renderer capabilities
* Add capabilities not normally supported by GLES2 for unified renderer
 * Remove ARBProgram since it isn't used by jME3
2014-12-05 22:13:28 -05:00
shadowislord
d7b3cfe287 GLAutoGen updates
* 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
2014-12-05 22:09:42 -05:00
shadowislord
ae70667104 Deprecate WrapMode.BorderClamp since it is deprecated in OGL3+ 2014-12-05 22:07:30 -05:00
shadowislord
610ac6ae24 Make sure Mesh.isAnimated() works for hardware skinning 2014-12-05 22:04:26 -05:00
shadowislord
a8c5e0f10d Fix crash in tests that use the tree model
- Since UseAlpha material parameter was removed from lighting
2014-12-05 22:01:22 -05:00
shadowislord
bf603b8f28 Mark "jme3-android-native" as a native project 2014-12-05 21:58:00 -05:00
shadowislord
798ec94b11 Minor cleanup for previous merge 2014-12-05 21:09:55 -05:00
shadowislord
10ee96d839 Merge branch 'updateGeometricStateOptimization' of https://github.com/Bebul/jmonkeyengine 2014-12-05 18:46:55 -05:00
Bebul
c19842c55f clear RF_CHILD_LIGHTLIST even when there are no children 2014-12-04 15:17:39 +01:00
Bebul
a400cb1c58 Optimize updateGeometricState to not recurse all children when not necessary
Conflicts:
	jme3-core/src/main/java/com/jme3/scene/Node.java
2014-12-04 15:17:38 +01:00
Kirill Vainer
41580062b8 Merge pull request #194 from tejbirwason/master
Added steps for proper Eclipse setup and steps to build project with Gradle
2014-12-02 00:14:40 -05:00
shadowislord
e3497dcf50 Switch from gradle 1.12 to 2.2.1 2014-12-01 23:41:13 -05:00
Paul Speed
308e88fd21 Fixed what I'm pretty sure is a typo. I didn't test it
but I can see no reason to clear the refresh flag on these
methods but setting it seems entirely logical.
2014-12-01 03:12:38 -05:00
tejbirwason
22de97ef9a update steps for eclipse setup and building project 2014-11-30 14:23:35 -08:00
shadowislord
af58aeb779 Fix Renderer.copyFrameBuffer() exception 2014-11-28 11:43:52 -05:00
shadowislord
c7b6445a35 Fix exception when stopping non-cached audio stream 2014-11-27 11:51:45 -05:00
shadowislord
44db44ee56 Add updated bullet native android libs 2014-11-25 19:16:25 -05:00
shadowislord
17998b4006 Make sure core openal package is listed in SDK baselibs 2014-11-25 19:10:30 -05:00
shadowislord
9e02ef0d5d Fixed various assertion errors in audio renderer
Added additional assertions and other checks where appropriate
2014-11-25 19:04:31 -05:00
shadowislord
9ce69eee62 Fix two issues with streaming OGG/Vorbis
- 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
2014-11-25 18:57:54 -05:00
shadowislord
595eb56f9b Throw exception if seeking a non-seekable audio stream 2014-11-25 18:51:23 -05:00
shadowislord
2ca1305ff5 Fix bullet native android build on latest NDK 2014-11-25 18:49:52 -05:00
jmekaelthas
05bdd7b1c9 Bugfix: fixed artifacts that were caused by adding bones with no weight
to bone index buffer.
2014-11-25 18:55:40 +01:00
jmekaelthas
e6787f5c2e Merge branch 'master' of https://github.com/jMonkeyEngine/jmonkeyengine.git 2014-11-24 20:53:36 +01:00
jmekaelthas
40c942ff66 Bugfix: fixed NullPointerExceptions and IndexOutOfBoundExceptions in
Inverse Kinematics and several other constraints.
2014-11-24 20:53:06 +01:00
shadowislord
ec6befeeaa AWT panels: fix flipped coords when mouse pressed or released 2014-11-23 18:54:09 -05:00
shadowislord
595183fb64 Fix items in Translucent bucket not be rendered in AWT panels 2014-11-23 18:39:19 -05:00
shadowislord
64b3be5334 Fix incorrect animation when dynamically switching from SW anim -> HW anim 2014-11-21 21:44:16 -05:00
shadowislord
8426bb7baf Officially switch to the new Android audio system (PART 2..) 2014-11-20 20:36:36 -05:00
shadowislord
be1f219f29 The old Android MediaPlayer based audio renderer is now deprecated 2014-11-20 20:33:30 -05:00
shadowislord
6cad69e067 Officially switch to the new Android audio system
Now uses OpenAL Soft 1.16 by default with the Tremor-based OGG/Vorbis decoder.
All jME3 audio features now work on Android.
2014-11-20 20:27:43 -05:00
shadowislord
915b0b8c61 Replace AtomicBoolean with Object as the audio thread lock 2014-11-20 20:24:23 -05:00
shadowislord
2ec7366fde Initialize OpenAL context in the render thread
Also remove useless AndroidAudioRenderer from jme3-ios
2014-11-20 20:21:37 -05:00
shadowislord
62a235fbf7 Add streaming + looping support for Android vorbis audio 2014-11-20 20:07:42 -05:00
shadowislord
96c3e554f4 Disable NDK downloading for Travis CI build
NDK is multi-platform, so natives can be updated by developer.
2014-11-20 20:01:47 -05:00
shadowislord
4241ce9ead Fix ESSL version parsing (incorrect prefix) 2014-11-20 20:00:28 -05:00
shadowislord
de0027eee3 Fix OGL version parsing 2014-11-20 19:40:31 -05:00
shadowislord
e1910fdff2 Fix OGG/Vorbis stream looping
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.
2014-11-19 23:59:52 -05:00
shadowislord
6bdebb937a Assume OpenGL ES 2.0 is supported on ICS and higher devices
Fixes running jME3 in Android Emulator
2014-11-18 22:05:14 -05:00
shadowislord
18807cf175 Fix issue #138
Texture arrays not supporting compressed formats
Also fixed loading texture arrays with mipmaps
2014-11-18 21:13:50 -05:00
shadowislord
9965d20c44 Make sure we copy the mipmap sizes when generating texture array from images 2014-11-18 21:12:15 -05:00
shadowislord
a947bcb64b Fix build error 2014-11-17 22:42:41 -05:00
jmekaelthas
6a642ae1be Feature: added support for 'Use tail' option in Inverse Kinematics
constraint.
Bugfix: fixed a bug that could cause bad computations when bones were
not directly 'in touch' with their parents.
2014-11-16 21:34:10 +01:00
shadowislord
a5699e9d82 Streaming audio data now works in a similar way to buffered data.
It is possible to loop streaming sources, as well as play
them again after they finished playing. It is possible to stop()
and then play() a streaming source to start playing from the
beginning. Essentially the lifecycle of a streaming audio
is now completely controlled by the user, in the same fashion
as buffered data.
In addition, AudioNode status updates (when an audio stops playing)
now occur every frame rendered, as opposed to every 50 milliseconds.
2014-11-16 13:14:33 -05:00