78 Commits

Author SHA1 Message Date
pspeed42
c0465b73a8 Added a newFrame() method to UniformBindingManager
to signal the beginning of a frame.  Currently this
just grabs the time and tpf values once so as to avoid
per-material Float allocation and time drift within a
frame.
RenderManager now calls this at the beginning of the
root-level render() method.
2014-08-12 03:11:43 -04:00
pspeed42
852ae28605 Removed the redundant camera.update() calls.
Switched many of the lists to SafeArrayList to avoid
per frame iterator allocations.
2014-08-12 02:52:55 -04:00
pspeed42
5d6d2b9bd7 Commented out the onFrameChange() in update() because
its redundant.
Modified setGuiBounding to call the new setCenter(x,y,z)
method instead of allocating a Vector3f each time. (This
method is called any time someone sneezes.)
Fixed a missing line feed in a javadoc comment.
2014-08-12 02:50:08 -04:00
pspeed42
efd6f0bf66 Avoid per-render iterator allocations by using the
SafeArrayList.getArray() method.
2014-08-12 02:48:06 -04:00
pspeed42
6625e572f5 Keep the scene and processor lists as SafeArrayList
for faster/cleaner iteration.
2014-08-12 02:47:34 -04:00
pspeed42
34b4eebb81 Avoid allocation of a temporary float[] array
and avoid allocation of a needless Vector3f array.
2014-08-12 02:46:42 -04:00
pspeed42
28adc784a9 Allow the center to be set without creating a
new Vector3f first.
2014-08-12 02:46:11 -04:00
pspeed42
97b8cb7435 Let triangle intersections fall right on the edge
the diagonal.
2014-08-12 02:45:36 -04:00
pspeed42
1b0f6d0f59 Fix for proper collision distance based on
precedent.  "I had one job..."
2014-07-27 21:47:55 -04:00
pspeed42
0633c0c5bc Fixed an accidental sharing of temp vars vects
that turned out to matter.
2014-07-27 18:31:44 -04:00
pspeed42
d5e20d53d0 Implemented accurate bounding sphere to triangle
collision.  The old code had an implementation but
it missed tons of cases.

For 100,000 random points, the old way would process
that in about 12+ ms.  The new way does it in about
18+ ms... but the old way missed 643 collisions
(180 versus 823).

Plus, with the new way accurate contact normal and
contact point can be provided trivially... so it is.
2014-07-27 18:11:43 -04:00
pspeed42
1ad6a57b32 Added a version of createFloatBuffer that takes
a ColoRGBA array.
2014-07-27 18:08:28 -04:00
Jan Ivenz
dacaaa5477 Fixed clamp method in ColorRGBA. 2014-07-18 18:31:40 +02:00
pspeed42
216f874175 Added support for instancing at the mesh level.
(so far only for lwjgl because I'm lazy)
Went ahead and added in divisor support while I was
at it because it doesn't cost anything and there might
be use-cases for it.
Mesh now knows about instances and you can directly
ask it for an instance count.  I haven't added support
for proper bounding box calculation but it should
at least be possible now.
2014-07-11 01:14:47 -04:00
pspeed42
cce7b0f6de More tab eradication. 2014-07-10 02:49:21 -04:00
pspeed42
9b8b730c44 Added a license header. 2014-07-10 01:55:29 -04:00
Paul Speed
1a4f07b36a Fixing tabs to spaces. 2014-07-10 01:38:19 -04:00
Nehon
7356b727c3 Instancing now works with Lighting material, and shadows are supported with instanced geometries 2014-06-29 18:41:32 +02:00
Nehon
a11bfa5e63 Fixed a bug where grouped geom were rendered in shadow pre-pass because they were still in the shadow cast queue 2014-06-29 18:40:31 +02:00
shadowislord
fa41da59a4 * Fix outstanding cloning related issues in InstancedNode
* Throw exception if the geometry's material does not support instancing
 * Test the cloning function in TestInstanceNode
2014-06-28 20:52:30 -04:00
shadowislord
6ddc68278b * Make sure InstancedGeometry is non-batchable spatial 2014-06-28 20:50:10 -04:00
shadowislord
4ae99f9d5d * Fix incorrect reset of Geometry members after cloning 2014-06-28 20:49:21 -04:00
shadowislord
4fdce777b5 * Fix ParticleEmitter.control reference which became incorrect after cloning 2014-06-28 20:02:25 -04:00
shadowislord
564a08672f * Remove InstancedNode.setCullHint(CullHint.Never) from TestInstancedNode example as it is not neccessary 2014-06-28 19:34:53 -04:00
shadowislord
eee43b470e * Added InstancedNode: easy to use instancing with similar API to BatchNode. The underlying scene graph will be automatically optimized so instancing is used as much as possible, thus reducing number of draw calls and improving performance. Unlike BatchNode, it does not copy the geometry's mesh around, but only its transform. In order for it to work, it requires the Renderer to support the GeometryInstancing capability.
* Replaced existing instancing test with TestInstanceNode, which demostrates how to use the new InstancedNode by changing the transform, mesh, and material of every instance periodically.
 * The lower-level InstancedGeometry API rewritten: Users don't need to manage the number of instances they have and their indices. Instead, they can use addInstance() and removeInstance() to add and remove instances as desired. Unlike InstancedNode, InstancedGeometry requires all Geometries to have the same mesh and material, but they can have different transforms.
 * Instancing.glsllib now requires the InstanceData to have world transforms instead of world view transforms. As a consequence, users of instancing must specify in the material the world parameters ViewProjectionMatrix and ViewMatrix instead of ProjectionMatrix.
2014-06-28 19:27:26 -04:00
shadowislord
52b93ba933 * Made Geometry.associate/unassociate To/From GroupNode methods public so they can be GeometryGroupNode implementations outside the com.jme3.scene package
* Added ability to get the geometry start index for GeometryGroupNode implementations
2014-06-28 19:15:39 -04:00
shadowislord
5b7a408bcc * Fix issue where BatchNode.clone() would still re-use the previous BatchNode's data structures 2014-06-28 19:09:20 -04:00
shadowislord
ef1e69c182 * Instanced objects are now considered a single object when generating rendering statistics 2014-06-28 19:05:04 -04:00
neph1
8738f961ea This is the long-overdue initial check in of KinematicRagdollControl with IK support. It also contains some modifications to Bone. Tested with TestBoneRagdoll to ensure backwards compatibility. Please review. 2014-06-28 14:58:57 +02:00
neph1
ed6256ef47 Fix for handling multiple channels in AnimationEvent
new constructor (variant)
(First commit in github repo)
2014-06-28 12:57:18 +02:00
Nehon
330b53671a Upped JME version to 3.1.0 with the tag "snapshot-github"
Somehow trying to get nightly back...
2014-06-18 21:51:45 +02:00
Nehon
3f43d7832f Updated documentation of the Bone class and changed names of the transforms variables and accessors so that they properly describe what they are an are misleading anymore.
Kept old methods as deprecated to not break user code.
Changed all calls to the deprecated methods in the engine.
2014-06-17 22:08:55 +02:00
Nehon
6d9a7fbcfb Fixed issue in shadows15.glsllib, edge bilinear filtering was wrong when using tetxureGather 2014-06-14 22:05:53 +02:00
shadowislord
d3ba691600 * Introduce GeometryGroupNode as abstract class for implementations that group / optimize geometries
* Reimplement BatchNode on top of GeometryBatchNode
2014-06-07 18:34:37 -04:00
Nehon
d8bbb4e9f9 Fixed an issue where you couldn't chain several shadow renderers. Thanks to Perjin for narrowing down the issue.
Now a shadow renderer properly cleanup the parameters set to a material when the post shadow pass in done
2014-06-07 21:27:10 +02:00
shadowislord
67f402df75 * Remove use of instance variable in BIHTree, instead use TempVars 2014-06-07 15:26:04 -04:00
shadowislord
17fd3d466e * Fix Remy's grammar and spelling 2014-06-06 20:09:20 -04:00
shadowislord
844e468eac * Fix two more un-compliant PostShadow shaders 2014-06-05 23:40:34 -04:00
shadowislord
bd500608dd * Fix "m_LightPos redefined" shader compile error in PostShadow.vert 2014-06-05 23:25:32 -04:00
shadowislord
be3a6c03b2 * Put comment markers around imported library contents when loading shader 2014-06-05 23:16:10 -04:00
shadowislord
ad7fdb6fab * Deprecate texture wrap modes not supported in OpenGL 3
* Make sure engine is not using them anywhere
2014-06-05 22:51:51 -04:00
shadowislord
c925104f5e * Ensure the statistics properly represent number of objects / triangles / vertices rendered when using instancing 2014-06-05 22:37:00 -04:00
shadowislord
948fdb21eb * Add new flag to Platform enum which specifies if its 32-bit platform or 64-bit.
* Add new but currently unused native extraction engine which supports user-specified native libraries as well as deferred extraction of libraries.
2014-06-05 22:32:06 -04:00
shadowislord
65d83b37f0 * Deprecated LTC and LATC texture formats, OpenGL3+ does not support them. Instead RGTC / BC5 must be used.
* Add missing license to InstancedGeometry.
 * Minor cosmetic / doc changes.
2014-06-03 22:58:33 -04:00
shadowislord
bf9a30f8ba Merge pull request #140 from phr00t/master
Ability to emit a certain number of particles
2014-06-02 12:04:52 -04:00
Phr00t
dd042344d8 reduced code duplication 2014-06-02 09:12:39 -04:00
Phr00t
0f76dc2cbd Ability to emit a certain number of particles 2014-06-01 16:46:52 -04:00
shadowislord
76147fc5f7 * Throw exception if the spot light computed cosine angle is not valid 2014-06-01 14:32:49 -04:00
shadowislord
6680a1dec4 * FilterPostProcessor now crashes early if packed float texture isn't supported - since it is now required by all filters 2014-05-31 19:11:50 -04:00
shadowislord
0989d40256 * Ensure mipmapping is disabled for skies 2014-05-31 18:51:22 -04:00