This commit updates Nifty to version 1.4.1 and makes all
the necessary changes to the JME-Nifty integration to be
compatible with this version of Nifty (manily support of multiple
texture atlases in the batch renderer and some minor changes
like the removal of some *Null classes).
Most User code should still be able to compile with this change.
However, the NiftyJmeDisplay constructor that requires the
width and height of the texture atlas has been deprecated in
favour of the newly added static factory methods:
NiftyJmeDisplay.newNiftyJmeDisplay(). The new methods
add support for the Nifty BatchRenderConfiguration class that
allow further configuration of some rendering details.
The testcase jme3test.niftygui.TestNiftyGui has been modified
to use the new methods and seems to render fine for me.
Most of Nifty 1.4.1 should be compatible with old versions of
Nifty. However some compile-time incompatibilities might
exists to old 1.3.x code. Additionally some internal mechanism
have been modified with 1.4 so there might be additional runtime
incompatibilities as well.
It modifies a texture on a material from another thread, which changes the material's sort ID,
thus causing the OpaqueComparator's compare method to violate the compare method contract.
* 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.
- Add instanced geometry support. This is performed by uploading 4 vertex buffers each containing 4 floats. The top 3 rows are the world matrix and the bottom row is a quaternion representing the normal matrix. Hence, both unshaded and lit geometries can be rendered through instancing.
See Instancing.glsllib for more information as well as the comment in LwjglRenderer.
One can now mark a texture param in a material definition as linear by using -Linear at the end of the parameter declaration (case insensitive).
An Image bound to a material texture param in a linear color space will have its ColorSpace set to linear when bound to the material by mat.setTexture("name", texture);
Added the -LINEAR flag to all texture param that needed it in stock materials (lighting.j3md, terrainLighting.j3md, different Filter materials).
- All images constructors now take the isSrgb flag as a parameter, all engine classes has been changed to accommodate the change, old constructors has been deprecated for backward compatibility. One should always ask himself in which color space is an image if dealing with gamma correction
- Gamma correction has been defaulted to false in the appSettings