Compare commits

..

1463 Commits

Author SHA1 Message Date
Stephen Gold
6402aad452 InstancedNode: protect the no-arg constructor and javadoc it 2020-06-14 02:06:00 -07:00
Trevor Flynn
e78f303a9d
Add ability to remove morph targets from mesh (#1378)
* Add ability to remove morph targets from mesh

* Add return values to removeMorphTarget functions

* Add null saftey

* Fix typo
2020-06-13 12:40:27 +04:30
kkolyan
dd0c169d62 avoid NegativeArraySizeException if input string is "\\#FFF#" 2020-06-09 08:50:24 -07:00
René Kraneis
32e8b68ea0
Adding getters/setters to AnimComposer (#1376)
* Add getCurrentAction

* Add removeCurrentAction (default layer)

* Add setTime (default layer)

* Add getTime (default layer)

* Improve documentation
2020-06-07 23:44:19 +04:30
kkolyan
eb7aab9704 Camera#contains javadoc updated 2020-06-05 10:30:58 -07:00
pspeed42
d29d8f5100 Fixing the angle ordering in the fromAngles() javadoc. 2020-05-23 17:39:07 -04:00
Stephen Gold
acc5cfa995 AppSettings: correct a typo in the javadoc 2020-05-20 12:11:42 -07:00
Stephen Gold
f34e660f03 AppSettings: change the "VSync" default from false to true 2020-05-17 23:04:48 -07:00
kkolyan
0f06c14c28 OBJLoader enhancement: named groups support 2020-05-16 13:21:19 -07:00
Stephen Gold
6ade1a027e AppSettings: change the gamma-correction default from false to true 2020-05-15 14:28:22 -07:00
Davis Rollman
30bddef8c0 Replaced Netbeans auto license with real license 2020-05-14 12:01:05 +02:00
ItsMike54
f808187142
Add Proper License to com.jme3.anim files (#1359)
* Update Weights.java

* Update SkinningControl.java

* Update SeparateJointModelTransform.java (#2)

* Update SeparateJointModelTransform.java

* Update MorphControl.java

* Update MatrixJointModelTransform.java

* Update Joint.java

* Update ArmatureMask.java

* Update Armature.java

* Update AnimationMask.java

* Update AnimTrack.java

* Update AnimComposer.java

* Update AnimClip.java

* Update Weighted.java

* Update Primitives.java

* Update JointModelTransform.java

* Update HasLocalTransform.java

* Update AnimMigrationUtils.java

* Update ContainsTweens.java

* Update LinearBlendSpace.java

* Update ClipAction.java

* Update BlendableAction.java

* Update BlendSpace.java

* Update BlendAction.java

* Update BaseAction.java

* Update Action.java

* Update AnimTrack.java (#3)

* Update AnimTrack.java

* Update ArmatureMask.java

* Update MatrixJointModelTransform.java

* Update SeparateJointModelTransform.java

* Update Weights.java

* Update Action.java

* Update BaseAction.java

* Update ContainsTweens.java

* Update SkinningControl.java

* Update AnimTrack.java (#6)

* Update AnimTrack.java

* Update BlendAction.java

* Update BlendSpace.java

* Update BlendableAction.java

* Update AnimMigrationUtils.java (#7)

* Update AnimMigrationUtils.java

* Update HasLocalTransform.java

* Update JointModelTransform.java

* Update Primitives.java

* Update Weighted.java

* Update ClipAction.java

* Update AnimInterpolator.java

* Update AnimInterpolators.java

* Update FrameInterpolator.java

* Update LinearBlendSpace.java

* Revert AnimTrack.java to original state.

* Delete AnimTrack.java

* Add files via upload
2020-05-09 06:19:11 -07:00
Stephen Gold
d6b0069407
restore the JOGL/JOAL hooks (#1368)
* restore the "hooks" for using JOGL/JOAL instead of LWJGL as the backend

* clarify the AppSettings javadoc related to JOGL and JOAL

* clarify some JmeDesktopSystem diagnostics related to JOGL and JOAL
2020-05-08 12:01:59 -07:00
Stephen Gold
c0692df207 Revert "Fixes issue #1336: AWTPanels forcing OpenGL 2.0 (Compat Profile)"
This reverts commit fa6295945109743f55602df592593b0f286da287.
2020-05-08 11:39:44 -07:00
Github Actions
036b08a385 [skip ci] update natives snapshot 2020-05-08 18:27:45 +00:00
Stephen Gold
407ebc9d5e gradle.properties: trivial delta to test the recent fix for issue #1365 2020-05-08 11:08:44 -07:00
Github Actions
f7352ffcfe [skip ci] update natives snapshot 2020-05-08 17:01:17 +00:00
Stephen Gold
599a0d5c56 possible fix for issue #1365 2020-05-08 09:42:19 -07:00
Stephen Gold
8aa50e9b48 Fix issue #1283 (collision-group filter not applied to CCD) 2020-04-26 23:11:45 -07:00
Stephen Gold
5ae9285903 add a test for issue #1283 2020-04-26 23:09:42 -07:00
Stephen Gold
bb6ac612ff make TestMorph (in jme3-examples) more user-friendly 2020-04-24 13:27:08 -07:00
Stephen Gold
9751e23cd7 Fix issue 1360: ArmatureDebugAppState causes OpenGLException 2020-04-24 10:36:50 -07:00
Stephen Gold
ceea055cc4 T key had to be pressed 2x before worked in jme3test.terrain (4 files) 2020-04-23 12:42:36 -07:00
Stephen Gold
d636049a6f improve initial camera orientations in jme3test.terrain (9 files) 2020-04-23 12:32:54 -07:00
Stephen Gold
917509a04e remove an unused empty file jme3test/light/DlsfError.java 2020-04-22 12:16:16 -07:00
rvandoosselaer
3fa85bc139 Set the minimum required OpenGL profiles for the geometry and tessellation shader test cases. Resolves #1357 2020-04-22 09:55:32 -07:00
jayfella
f3d81d11a1 Merge remote-tracking branch 'origin/master' 2020-04-22 09:39:32 +01:00
jayfella
37f1e7fabe Add methods to modify each channel (RGBA) that return 'this'. 2020-04-22 09:38:58 +01:00
jayfella
a057a6d74d Add method to convert RGBA255 colors to ColorRGBA 2020-04-22 09:32:55 +01:00
Stephen Gold
15e3acbe4d Fix issue #1353 (TestUseAfterFree causes AssertionError) 2020-04-21 17:40:03 -07:00
Stephen Gold
e3161f4622 remove an unused empty file jme3test/collision/Main.java 2020-04-20 21:45:00 -07:00
Stephen Gold
c9357b4db1 Fixes issue #1350 for getters (MorphTrack documentation) 2020-04-20 17:08:42 -07:00
Stephen Gold
2e56e1f24c Fixes issue #1350 (MorphTrack documentation) 2020-04-20 17:01:49 -07:00
Stephen Gold
32f71397c5 convert tabs to blanks in FixedScale100.frag 2020-04-20 16:51:24 -07:00
Stephen Gold
f6c467b495 improve javadoc in Triangle: "center" -> "centroid", "point" -> "vertex" 2020-04-20 16:44:44 -07:00
Stephen Gold
84c88709b5 correct a typographic error in TestUseAfterFree output 2020-04-20 15:40:47 -07:00
pspeed42
221acaadfe Removing the jme3-blender subproject and related references since it now lives in its
own repository: https://github.com/jMonkeyEngine-Contributions/BlenderLoader
2020-04-19 18:32:07 -04:00
pspeed42
94451c4d35 Moving all of the blender-related stuff under the jme3-blender subdirectory
to make it easier to move to its own repository and keep all of the history.
2020-04-19 17:53:24 -04:00
Stephen Gold
7212f9b2b2 improve format and rm trailing whitespace (10 files in com.jme3.opencl) 2020-04-18 18:08:32 -07:00
Stephen Gold
a5e0213b01 add some more missing javadoc (11 files in com.jme3.math) 2020-04-18 16:42:11 -07:00
Stephen Gold
a1dcbf9b06 correct javadoc errors in Matrix3f and Quaternion 2020-04-18 14:36:39 -07:00
Stephen Gold
a42103651c correct the javadoc of Matrix4f.set(float[][]) -- missing "not"! 2020-04-18 14:30:22 -07:00
Stephen Gold
cd7d497c79 clarify the javadoc of Quaternion.toString() "displaced"? 2020-04-18 14:22:35 -07:00
Stephen Gold
1e7c95cbb8 correct the javadoc of toString() methods (5 files in com.jme3.math) 2020-04-18 14:15:45 -07:00
Stephen Gold
ee910859ac javadoc corrections: Vector4f differs from Vector3f, has 4 components! 2020-04-18 13:52:09 -07:00
Stephen Gold
5a2499ccbe improve formatting & rm trailing whitespace (21 files in com.jme3.math) 2020-04-18 13:46:44 -07:00
Stephen Gold
4c62d5008e add missing javadoc tags to BufferUtils 2020-04-18 13:25:44 -07:00
Stephen Gold
4d81fc6035 add some missing javadoc (2 files in com.jme3.util) 2020-04-18 13:15:08 -07:00
Stephen Gold
fa62959451 Fixes issue #1336: AWTPanels forcing OpenGL 2.0 (Compat Profile) 2020-04-18 11:35:51 -07:00
Stephen Gold
607e068f76 FastMathTest: test the reversibility of coordinate transformations 2020-04-17 13:00:26 -07:00
Stephen Gold
bb7d2cab01 add missing javadoc tags to 10 files in the com.jme3.math package 2020-04-17 12:11:07 -07:00
Stephen Gold
6cbf62a3b5 resolve an unknown HTML tag in the ColorRGBA javadoc 2020-04-17 11:04:02 -07:00
Stephen Gold
03673ac1f7 add some missing javadoc (13 files in com.jme3.math) 2020-04-17 10:44:29 -07:00
Stephen Gold
32ab16e026 javadoc correction: Quaternion.negate() doesn't "invert" anything 2020-04-17 00:07:37 -07:00
Stephen Gold
84836c6260 don't refer to transforms as "matrices" in the Transform javadoc 2020-04-16 23:50:25 -07:00
Stephen Gold
851793cde6 improve formatting & rm trailing whitespace (5 files in com.jme3.scene) 2020-04-16 23:14:35 -07:00
Stephen Gold
bee3d36f16 remove the javadoc reference to the mythical USE_FAST_TRIG setting 2020-04-16 22:12:51 -07:00
Stephen Gold
50dc8349a1 remove all javadoc references to the mythical JmeException 2020-04-16 22:07:21 -07:00
Stephen Gold
e99c8a74a3 improve formatting and rm trailing whitespace (16 files in jme3-core) 2020-04-16 21:46:31 -07:00
Github Actions
f46a6fac11 [skip ci] update natives snapshot 2020-04-16 01:40:48 +00:00
Stephen Gold
64bfe42878 build with -Xlink:unchecked 2020-04-15 18:22:44 -07:00
Stephen Gold
1c3ed5122f suppress still more javac warnings about unchecked casts 2020-04-15 18:22:18 -07:00
Stephen Gold
70ae48af1e avoid using raw types 2020-04-15 18:18:58 -07:00
Stephen Gold
c7a734d590 Merge branch 'master' of https://github.com/jMonkeyEngine/jmonkeyengine 2020-04-15 17:44:22 -07:00
Stephen Gold
822bcd1300 suppress more javac warnings about unchecked casts 2020-04-15 17:33:59 -07:00
Github Actions
ae9854df2b [skip ci] update natives snapshot 2020-04-16 00:13:51 +00:00
Stephen Gold
88c9371a4d avoid unchecked casts due by premature casting of Class objects 2020-04-15 17:04:45 -07:00
Stephen Gold
297443ada4 suppress javac warnings about unchecked casts in read() and write() 2020-04-15 16:51:48 -07:00
Stephen Gold
60967b9f04 IndexBuffer: resolve a javadoc warning 2020-04-15 13:35:55 -07:00
Stephen Gold
a6f2c12700 jme3-terrain: handle 2 more ByteBuffer cases 2020-04-15 13:32:19 -07:00
ItsMike54
6c5611d3e2
Remove jogl (#1339)
* Remove JOGL

* Update build.gradle

* Update AppSettings.java

* Update settings.gradle

* Update TestMultipleApplications.java

* Update build.gradle

* Update JmeDesktopSystem.java

* Update AppSettings.java

* Update package-info.java

* Update TestApplet.java

* Update HelloOpenCL.java

* Update TestContextSwitching.java

* Update TestOpenCLLibraries.java

* Update TestVertexBufferSharing.java

* Update TestWriteToTexture.java

* Update TestMultiPostWater.java

Co-authored-by: Mike Burnett <mikejme4@gmail.com>
2020-04-15 12:55:50 -07:00
matthias plasser
89df7909d3
Fixes #1341: AudioBuffer.updateData only allows direct buffers (#1342)
* only allowing direct buffers now, see: https://hub.jmonkeyengine.org/t/solved-playing-audio-from-audiobuffer-in-audionode-causes-jre-to-die/43091/12

* style correction

Co-authored-by: Stephen Gold <sgold@sonic.net>
2020-04-15 12:33:39 -07:00
Jérôme
b92e7a0abe
Migrate TestSkeletonControlRefresh to new anim system (#1334)
* Migrate TestSkeletonControlRefresh to new anim system

Migrate SkeletonControl to new SkinningControl

* Update TestSkeletonControlRefresh.java

* Update TestSkeletonControlRefresh.java

* Update TestSkeletonControlRefresh.java

* Update TestSkeletonControlRefresh.java

* Update TestSkeletonControlRefresh.java

* Update TestSkeletonControlRefresh.java

* Update TestSkeletonControlRefresh.java

* Eleminate inner class

* Update TestSkeletonControlRefresh.java

* Update TestSkeletonControlRefresh.java
2020-04-13 16:04:08 -07:00
rvandoosselaer
26f393d09c Clean up the test case and add some more context. #1340 2020-04-13 16:02:06 -07:00
rvandoosselaer
2e1a8dcb52 Add a check to see if the NB_PROBES identifier is defined. Fixes #1340 2020-04-13 16:02:06 -07:00
rvandoosselaer
76210fe415 Add a check to see if the NB_PROBES identifier is defined. Fixes #1340 2020-04-13 16:02:06 -07:00
Jérôme
b48391399b Using Tweens methods instead of the inner class
Simplification using Tweens methods instead of NoLoopAction inner class
2020-04-13 16:01:27 -07:00
Jérôme
4c8e400a83
Migrate TestOgreAnim to new anim system (#1333)
* Migrate TestOgreAnim to new anim system

* Removing tabs

* Update TestOgreAnim.java
2020-04-10 18:09:36 -07:00
Riccardo Balbo
d109e4739e Fix last query not closed in profiler 2020-04-10 22:52:19 +02:00
Ali-RS
16a3e7630c
Fixed an issue with AndroidNativeImageLoader which was opening stream twice. (#1338) 2020-04-08 13:14:04 +04:30
Stephen Gold
b8287a2d0d correct some typographic errors in Billboard100.frag comments 2020-04-07 16:23:22 -07:00
Stephen Gold
fef5c101d8 elimiate incidental hard tabs from jme3-examples 2020-04-07 11:06:31 -07:00
Stephen Gold
51022fd521 elimiate incidental hard tabs from jme3-core 2020-04-07 10:51:33 -07:00
Jérôme
b613be35fa Removes tabs 2020-04-07 10:15:42 -07:00
Jérôme
2a0fa2554a Migrate TestOgreComplexAnim to new anim system
Lots of code that did nothing in old test (on feet, hand). Only eft hand anim with the bone anim in simpleUpdate works. So I rework the test to do how actionSquence work and manipulate Armature and Joint with ArmatureMask apply.
So I think there is a bug in ArmatureDebugger when apply PointSize in material. In the render view all points on armature debug have same size.
2020-04-07 10:15:42 -07:00
Jérôme
3385cdaa3f Migrate TestBlenderObjectAnim to new anim system 2020-04-06 23:32:33 -07:00
Jérôme
1433f98ad3 Migrate TestBlenderAnim to the new anim system
Migrate to the new animation system, migration of old Spatial object containing animation and adding method to list all animation name in AnimComposer.
2020-04-06 11:29:00 -07:00
Jérôme
11d3bc67f8 Migrate TestCutomAnim to the new Animation system 2020-04-06 11:28:11 -07:00
Jérôme
bd4691e06b Migrate TestSpatialAnim to the new Anim class
Remove all deprecated class and migrate to the new animation system.
2020-04-06 11:27:07 -07:00
Grabli66
fafe8a74fe Fixes error of loading assets 2020-04-06 11:25:39 -07:00
MeFisto94
efc1962092
Merge pull request #1320 from MeFisto94/fix-lwjgl3-double-stop
Fixes #1319 - LWJGL2: start(true) should not freeze when context could not be initialized
2020-04-04 20:15:52 +02:00
MeFisto94
989b2a66cf
Merge pull request #1322 from MeFisto94/fix-mesa-invalid-enum-ssbo
Fixes SSBO causing GL_INVALID_ENUM in Debug Mode
2020-04-04 20:05:23 +02:00
MeFisto94
0115616652 UBO: Re-order the caps detection for a more clean code. 2020-04-04 17:19:10 +02:00
MeFisto94
64797f9bff UBO: GL_INVALID_ENUM on Mesa 2020-04-04 16:19:56 +02:00
MeFisto94
21b7a71cf8 Fixes SSBO causing GL_INVALID_ENUM in Debug Mode 2020-04-04 15:41:36 +02:00
MeFisto94
8f8fc19043
Merge pull request #1321 from MeFisto94/fix-pbr-opengl2-part2
Fixing PBR on <= GLSL 130:
2020-04-04 14:15:57 +02:00
MeFisto94
646e6741b9 GLSLCompat: The Matrix3 Sub-Constructor is called mat3_sub and defers to the builtin mat3 if available. 2020-04-04 14:07:58 +02:00
MeFisto94
2276197a2b Fixing PBR on <= GLSL 130:
- GLSLCompat now implements mat3(mat4) and determinant() and inverse() for mat2 and mat3
 - PBR.glslib uses this functions again instead of one-off workarounds
2020-04-04 13:44:10 +02:00
MeFisto94
2379cfba77
Merge pull request #1276 from MeFisto94/fix-gldebug
Fixes #1272 - Improve GLDebugDesktop by reducing manual overrides
2020-04-04 03:09:19 +02:00
MeFisto94
df39677381 GLDebug: Throw an IllegalArgumentException instead of an IllegalStateException 2020-04-04 02:50:31 +02:00
MeFisto94
c198b1d546
Merge pull request #1318 from MeFisto94/fix-pbr-opengl2
Fixes #1304 - Don't use mat3() constructor to keep compatibility with…
2020-04-03 22:54:24 +02:00
MeFisto94
d19ae582a1 Fixes #1319 - LWJGL2: start(true) should not freeze when context could not be initialized 2020-04-03 12:09:15 +02:00
MeFisto94
461227bdef Fixes #1304 - Don't use mat3() constructor to keep compatibility with GLSL110 2020-04-02 23:07:33 +02:00
Riccardo Balbo
728a05c4f3 lambda 🎉 2020-04-02 14:56:49 +02:00
Ali-RS
0c6f240222
Check culling on the instanced geometries. (#1315) 2020-04-02 10:47:11 +04:30
MeFisto94
4d81d00f45 GLDebug: Throw an unchecked exception instead of returning null to enforce a crash when glGetError is not present. 2020-04-01 19:45:37 +02:00
MeFisto94
312fb5bb57 GLDebug: Use a method handle instead of a string comparison to increase the performance 2020-04-01 14:23:01 +02:00
Riccardo Balbo
7c01019f0c
Don't fail if there is no javadoc to commit. 2020-03-30 11:02:44 +02:00
Riccardo Balbo
f505bdeb21
Update checkout action to v2 2020-03-29 23:05:49 +02:00
Daniel Perano
ff58abca3d
Merge pull request #1306 from jMonkeyEngine/envcam-viewports
Expose ViewPorts
2020-03-22 18:47:49 -07:00
Toni Helenius
59793d4c06
Fix for resizing the window (issue 1191) (#1308)
* Listen for framebuffer size callbacks and set the resolution from that

* Also check the window size on the framebuffer size callback
2020-03-22 15:31:46 -07:00
Daniel Perano
0aa50a0f15 Expose ViewPorts
This commit allows EnvironmentCamera users to access the ViewPorts used
for rendering the snapshots. This allows incorporating screenspace and other
SceneProcessor-based effects into the snapshots as well as the scene geometry.
2020-03-16 00:28:44 -07:00
Stephen Gold
0252c1b623
README.md: add "Jumping Jack Flag" to game list 2020-03-06 09:24:07 -08:00
Stephen Gold
a407fc3224 main.yml: add Gradle-wrapper validation to several jobs 2020-03-04 15:21:15 -08:00
Toni Helenius
b93ea18fa2
Lwjgl3 restart input handle (#1268)
* Reinit inputs on context restart

* Added test issue from issue #1013

* Verify that the inputs are already initialized
2020-02-25 17:20:09 -08:00
Lou Hamersly
c1d359ca59
Fix #1289 Matrix3f/Matrix4f equals() should require an exact class match (#1302) 2020-02-25 15:14:03 -08:00
Stephen Gold
8e334aa756
BufferUtils: resolve issue #1288 (rewrite isDirect()) (#1299) 2020-02-24 08:40:02 -08:00
Github Actions
426969daeb [skip ci] update natives snapshot 2020-02-13 18:40:22 +00:00
Stephen Gold
f652591281
remove unnecessary casts and tests for null, discovered using NetBeans (#1285)
* remove unnecessary tests for null, discovered using NetBeans

* jme3-core: remove unnecessary casts

* jme3-examples: remove unnecessary casts

* jme3-vr: remove unnecessary casts

* jme-plugins: remove unnecessary casts

* jme3-terrain: remove unnecessary casts

* jme3-desktop: remove unnecessary casts

* jme3-android: remove unnecessary casts

* remove unnecessary casts, discovered using NetBeans

* TerrainQuad: back out one casting delta that's not a removal

* TerrainPatch: simplify generateLodEntropies() after removal of the cast

* TerrainPatch: simplify reIndexGeometry() after removal of the cast
2020-02-13 10:21:51 -08:00
MeFisto94
12481c08f6 Use a reflection-based approach to call checkError() after every call to the openGL API to reduce Code Duplication and increase Maintainability, while also fixing the regression caused by GLDebugDesktop extending from GLDebugES and thus making the Renderer think it is on mobile. 2020-02-12 23:56:06 +01:00
MeFisto94
ab96460853
Fix small things (#1287)
* JmeVersion: Don't throw a NullPointerException when version.properties can't be found.

* ImplHandler: Reduce Code-Duplication by using a multi-catch statement
2020-02-12 10:48:46 -08:00
Stephen Gold
f268d00222 Fixes issue #1286 2020-02-10 05:35:59 -08:00
Paul Speed
5584c93d4a
Merge pull request #1282 from stephengold/master
re-assign Simsilica LLC copyrights with Paul's permission (issue #1001)
2020-02-07 17:09:12 -05:00
MeFisto94
8219d7fc02
Add two convenience flags to AppSettings: GraphicsTrace and GraphicsTiming. (#1279) 2020-02-03 17:56:36 -08:00
Stephen Gold
dde0906963 re-assign Simsilica LLC copyrights with Paul's permission (issue #1001) 2020-02-02 23:27:43 -08:00
Github Actions
e3b44db4aa [skip ci] update natives snapshot 2020-02-03 07:22:28 +00:00
Riccardo Balbo
31476679be Fix openal-soft dead link 2020-02-03 08:04:02 +01:00
Riccardo Balbo
0244ab230b
Update link for stb_image.h 2020-02-03 07:54:38 +01:00
Stephen Gold
1a0b6ecac3
jme3-blender: remove TextureGeneratorWood and its dependencies (#1274) 2020-02-02 19:45:23 -08:00
MeFisto94
acbddc2763
Merge pull request #1252 from MeFisto94/add-opengl31-lwjgl
Fixes #1251 - Support OpenGL3.1 on LWJGL2 and LWJGL3
2020-02-01 14:29:51 +01:00
Github Actions
3c5dd5c168 [skip ci] update natives snapshot 2020-01-30 17:35:48 +00:00
Stephen Gold
0fd70b81c9
Add missing @Override annotations (#1270)
* jme3-core: add the missing @Override annotations

* jme3-desktop: add the missing @Override annotations

* jme3-bullet and jme3-jbullet: add the missing @Override annotations

* jme3-effects: add the missing @Override annotations

* jme3-terrain: add the missing @Override annotations

* jme3-examples: add the missing @Override annotations

* jme3-android: add the missing @Override annotations

* jme3-blender: add the missing @Override annotations

* jme3-ios: add the missing @Override annotations

* jme3-jogg and jme3-jogl: add the missing @Override annotations

* jme3-plugind: add the missing @Override annotations

* jme3-lwjgl and jme3-lwjgl3: add the missing @Override annotations

* jme3-networking: add the missing @Override annotations

* jme3-vr: add the missing @Override annotations
2020-01-30 09:16:47 -08:00
Toni Helenius
427ae0a28b
Added Override annotations, finals, some cleanup and better null checks (#1271)
* Added Override annotations, finals, some cleanup and better null checks

* More general null check

* Follow naming conventions
2020-01-29 11:05:12 -08:00
Ali-RS
2023440acf
Removed extra PostShadow Technique from PBRLighting.j3md (#1273) 2020-01-29 01:31:22 -08:00
Toni Helenius
867e46190e Issue 801 (#1269)
* Test case for issue #801

* Reset the context with the initial values
2020-01-28 10:35:17 -08:00
MeFisto94
eee37022f2 Fixes #1241 - Add a convenient Graphics Debug Option for the AppSettings (#1256) 2020-01-27 10:52:36 -08:00
MeFisto94
124ad35677 Fixes #1249 - Don't hang up when destroy is called multiple times (#1250) 2020-01-27 00:03:25 -08:00
Ryan McDonough
233bc6f0da PreShadow & PostShadow Support for PBRLighting.j3md (#1265)
* Update PBRLighting.j3md

* Create PreShadowPBR.frag

* Create PostShadowPBR.frag
2020-01-27 10:12:52 +03:30
Toni Helenius
ffd9cfcf25 Upgrade Gradle 4.10 -> 5.6.4 (#1238)
* Upgrade Gradle 4.10 -> 5.6.4

* Use Gradle wrapper
2020-01-23 23:17:42 -08:00
Paul Speed
81f9b9d92a
Merge pull request #1262 from MeFisto94/fix-terrain-picker
Fixes #1261 - Clone the Terrain Picker, so that loading a terrain from file still works (after cloning, the picker would have the wrong terrain quad instance)
2020-01-18 11:53:26 -05:00
MeFisto94
9b29e05968 Fixes #1261 - Clone the Terrain Picker, so that loading a terrain from file still works (after cloning, the picker would have the wrong terrain quad instance) 2020-01-18 10:53:58 +01:00
MeFisto94
933b0912e6
Merge pull request #1255 from MeFisto94/fix-bullet-natives
Fixes Bullet-Native Artifacts not containing natives when not building from cpp source and not using the build target.
2020-01-13 15:56:48 +01:00
MeFisto94
ec491575be Fixes Bullet-Native Artifacts not containing natives when not building from cpp source and not using the build target. 2020-01-12 16:55:06 +01:00
MeFisto94
04e7bed5e7 Fixes #1251 - Support OpenGL3.1 on LWJGL2 and LWJGL3 2020-01-12 15:22:26 +01:00
Stephen Gold
77c521fefa
README.md: add pixelapp's Leap to list of games 2020-01-11 11:44:00 -08:00
Stephen Gold
bc64238635 TestPBRLighting: fpp.setNumSamples() to facilitate study of issue #1246 2020-01-10 02:38:49 -08:00
Stephen Gold
3f59008566
README.md: add Nine Circles of Hell 2020-01-02 08:43:55 -08:00
Riccardo Balbo
b059c7c0dd
Fix #1236 non-lvalue cannot be out parameter 2019-12-30 18:41:54 +01:00
joliver82
68fb1afe5d GLRenderer.modifyTexture on GLES fix (#1235)
* Update GLImageFormats.java

* First implementation to solve the glTexSubImage issue

* Setting proper format to the image

* Removed the Image.convertToFormat method and its usage from GLRenderer.modifyTexture. Added a warning instead for the potential failing cases
Fixing the issue in JmeBatchRenderBackend.loadImage transforming it to RGBA8 if required
2019-12-22 21:23:31 -08:00
Paul Speed
b2ae269ede Updating the version.gradle to fix an issue with auto-versioning on the
master branch. (On master we want to default to the gradle.properties
version and not the latest tag for non-specific-commit tags.)
Updated gradle.properties to set master to be 3.4.0 for further development.
2019-12-21 21:55:47 -05:00
Paul Speed
5db3ac4fac Refactored how versions are auto-built to provide more normal versions
when building locally.
Normal auto-detected versions will be based on the base version parsed
from the most recent tag on the branch with a -SNAPSHOT appended.  If
the current commit is the tagged commit then it is used directly to
preserve backwards compatibility... but really that should be a CI
only option for most use-cases.
A new includeBranchInVersion option was added to allow the old behavior
of including the branch name in a munged version string for those
wanting to keep their experimental branch builds separate from their
normal master/version-branch builds.
2019-12-21 08:37:21 -05:00
Riccardo Balbo
124ef031d4
Remove "v" from version tag to maintain consistency with old releases 2019-12-17 14:30:42 +01:00
Stephen Gold
cdcf0512d9
com.jme3.scene.shape.Line: protect the no-argument constructor (#1234) 2019-12-14 21:12:00 -08:00
Stephen Gold
6b7dd5b325
AnimControl: correct javadoc for the no-arg constructor (#1233) 2019-12-11 23:43:05 -08:00
Stephen Gold
8d9d091576
Mesh: avoid NPE in getMorphTargets() when there are no targets (#1231) 2019-12-09 07:39:30 -08:00
Stephen Gold
98f6d326e1
re-publicize InstancedGeometry no-arg constructor, correct erroneous javadoc (#1230)
* re-publicize 3 no-arg constructors, correct/remove erroneous javadoc

* re-protect 2 no-arg constructors, restore javadoc
2019-12-04 12:01:40 -08:00
Github Actions
584bb79392 [skip ci] update natives snapshot 2019-12-03 05:23:37 +00:00
Stephen Gold
75001d8abd
protect 52 no-arg constructors in the jme3-bullet/jme3-jbullet libraries (#1229) 2019-12-02 21:01:11 -08:00
Stephen Gold
9d2d393fc3
protect 47 no-arg constructors in the jme3-core library (#1228) 2019-12-01 14:35:52 -08:00
Paul Speed
c73fd99dd6 Fixed the null child check to throw IllegalArgumentException instead of NullPointerException
because user code should never throw NullPointerException.
Also made trying to add a child to itself an error instead of a no-op.  Attempting
to do something like guiNode.attachChild(guiNode) will now throw an IllegalArgumentException.
2019-11-28 15:56:15 -05:00
Paul Speed
c23f28b51c Modified Line to keep its own start/end instances. This is less of a surprise if
a user later chooses to call updatePoints() after having created the line with
JME constants... since updatePoints() would actually call set() instead of just
replacing the references.  The constructor and updatePoints() should match and I chose
to err on the side of caution and make them both operate on local instances.
2019-11-26 04:08:16 -05:00
Paul Speed
45b1908906 Added an app state that will verify some of the JME constants (easy to expand later)
to see if they've changed in the current frame.  SimpleApplication will configure
this by default to use asserts but the application is free to change it to throw
regular exceptions or just log the error as desired.
2019-11-26 03:34:55 -05:00
Paul Speed
37bb494709 Fixing the default versioning to be compatible with continued development.
-SNAPSHOT releases should be based on real version numbers and not partial
prefixes or it makes it harder to continuing development on the branch.
2019-11-26 02:12:13 -05:00
joliver82
30df2f1b87 Android morph fix (#1221)
* Fixed MorphAnim.glsllib to compile on android and avoid enabling GL_VERTEX_PROGRAM_POINT_SIZE in android as it's not supported
2019-11-24 09:20:09 +03:30
Matthew Universe
48f28974f9 Closes #1210 Quaternion.lookAt now has a return value (#1223) 2019-11-23 10:43:00 -08:00
Riccardo Balbo
b07a11c9d4 Improve support for subimage copying. Allow to copy a part of an image to a texture2D. 2019-11-20 11:02:20 +01:00
joliver82
d935347bde Android buffer allocator implementation (#1214)
* Implemented basic android buffer allocator for newer wrapped buffer classes to be used instead of the default ReflectionAllocator
2019-11-19 08:39:43 +03:30
Riccardo Balbo
816ab99ac5 Fix version naming. Use version-branch-SNAPSHOT for local builds, add custom version name property. 2019-11-17 14:15:42 +01:00
Github Actions
e304c5bb6d [skip ci] update natives snapshot 2019-11-17 12:33:52 +00:00
Riccardo Balbo
128e079a22 Update MacOS build: removed 32 bit support (since deprecated by apple). Update bullet library to the current master branch (needed for compatibility patch with recent clang). 2019-11-17 13:13:57 +01:00
joliver82
663c9776e8 Android openGL ES 3 support (#1147)
* Update GLImageFormats.java

* Added basic support for openGL ES 3.0 and GLSL300 for android

Added instancing support for android which is core feature in GLES3.0

Added fix for shadows in android

* Fixed required types of GLES30.glDrawElementsInstanced

* Properly check GLES3 version and setting precision for shaders for all GLSL ES versions

* Added support for Opengl ES 3.1 and 3.2 and their shader versions
Added proper checkings for new OpenGL ES versions
Fixed some issues with shadow rendering in GLES 3.0 or better (strict type checking, OpenGL ES specific extensions and percision definition)
Added GLSL320 and GLSL300 to Unshaded and Lighting materials

* Added depth texture 24bit for OpenGL ES

* Added geometry shaders and tessellation to GLES 3.1 as extension and GLES 3.2 as core
Modified test materials to use GLSL310

* Added FB blit for android GLES30

* Added GlSL300 or better to all effects not able to run in GLSL100
Mods on Shadows.glsllib to try to fix android shadow rendering
Fixed ssaoBlur.frag that was using a reserved word
Fixed precision type missmatch from vertex to fragment shader

* Partial multisample support
Framebuffer MRT support

* Temporarily removed texture multisampling (not being able to compile using GLES31)

* Updated android.jar to api28
Enabled multisampling

* Better checking for GLES3

* Removed insert precision for all shaders. This avoided some random precision missmatch error but created rendering issues

* Removed border check for GLES, caused filtered shadows not to render on GLES2.0 devices

Added texture compare mode for GLES3.0 and better to be able to use sampler2DShadow

Modified base materials (Lighting and Unshaded) to use only GLSL100 for post shadow pass

* Corrected texture comparison function that were incorrectly changed

* Added precision to samplers for GLESSL300 also

* Created a subclass of Glsl150ShaderGenerator (Glsl300ShaderGenerator) to support ShaderNodes in GLES SL30 and included it's usage in DesktopAssetManager. Nowadays just copied and overwrote the version string. Needs a full review
Added image format RGB16F to be used as texture format only in GLES30 (cannot be used as FB format)
Added GLSL300 and/or GLSL310 to different materials

* Cleaned GLSL300 generator
Fixed shadows glsl lib removing use of GL_EXT_gpu_shaders5

* Fixed usag of textureCubeLod in fragment shader of envMapping which is unsupported in GLES2.0
Modified PBRLighting frag to properly compile on GLES3

* Added GLSL300 and 310 to PostShadowFilter material definition

* Make post shadow filter use GLSL100 for GLSL300
Set highp as default precision to fix glitched shadows caused because not enough precision

* Changed water_normalmap.dds to uncompressed RGB8 because DXT1 is mostly unsupported in GLES

* Fixed GLES30 compilation issues in Water shaders and added GLSL300 to LightScattering material. ** Not fully tested

* Added RGB8 dds formatted FullskiesSunset to be used in any platform. Previous file moved to _dtx1.dds

* Set GL_TEXTURE_MAX_LEVEL in GLES30 contexts fixing issue with not fully mipmapped images and PBR rendering

* Fixed compilation of jme3-android-examples and upgraded sdk version to use

* Fixed Geometry Shader and Tessellation Shaders in testdata package to properly compile on GLES320

* Added non-compressed textures to be able to run all examples on android

Enabled texture arrays and 3d textures on opengl es 3.0. Peding to implement wrappers to android gl functions (currently getting NullPointerException)

* More GLES30 functions included to properly support texture arrays, 3d textures and multisampling matching jme core code

* Fixed 3D texture tests for GLES30
Fixed texture 3D and texture array example shader compilation on GLES30
Fixed some random missing precision compilation errors on GLES30

* Fixed TestTextureArray for GLES30

* Some multisample additions and removal of GLES3 multisampling enable caps
Added RGBA16F as valid format for GLES32 and using it by default in env camera instead of RGB16F. kept fall back to RGB8

* added float and half float formats for gles30
added rgb10a2 format for gles30
fixed usage of glTexImage2D
removed EnvironmentCamera fallback image format as it's useless now

* Added more image formats for GLES30
Fixed rgb8 if having Caps.Rgba8

* Enabled RadialBlur for gles30

* Fixed luminance texture formats for gles

* Added more depth image formats for gles3

* Enabled multisampling in gles3

* Added GLES30 functions to GLDebugES
Reverted TestTexture3D and TestTextureArray to use RGB8 format
Updated EnvMapping100.frag to use EXT_shader_texture_lod in gles sl 100 if available

* Removed all aditional not used compressed dds files
Removed also Pond and rock png files previously used in TestTextureArray

* Removed compressed water_normalmap_dxt1.dds

* Changed GLES_30 and AndroidGL implementing GL2 to avoid duplicated code checking GL2 vs GLES30

* Added aditional checking to avoid gles30 calls from gles20 only devices
2019-11-16 08:24:30 +03:30
Ali-RS
7ae1ff23af
Fixed a typo 2019-11-09 15:54:27 +03:30
Riccardo Balbo
d0186664f2 Fix extraction for non-unix paths. 2019-11-05 16:18:56 +01:00
Stephen Gold
92b161f38e fix issue #1202 2019-11-02 10:52:17 -07:00
Riccardo Balbo
3217cdc74c Remove migration code 2019-11-02 11:37:36 +01:00
Thodoris Sotiropoulos
4d734ac297 Separate getNativesZipFile and getPrebuiltNatives. Improve code quality.
* Fix the task 'getPrebuiltNatives'

* Do not replace native if it's newer than zip
2019-11-02 11:32:24 +01:00
Github Actions
d8a42d0817 [skip ci] update natives snapshot 2019-10-31 22:51:55 +00:00
Riccardo Balbo
973d8be894 Hotfix expired certificate for macOS_SDK_headers_for_macOS_10.14 2019-10-31 22:51:43 +01:00
Riccardo Balbo
b571840bd0 Fix missing bullet natives when running tests from within the engine project. 2019-10-31 21:47:15 +01:00
Ali-RS
2c6161ecd8 Added AnimComposer.hasAnimClip() 2019-10-24 10:43:19 +03:30
Ali-RS
d4c9a9ad1e
Added Joint.getInitialTransform() (#1206) 2019-10-24 10:32:42 +03:30
Ali-RS
3b8665fe93
Fixed an issue with BlendableAction.setTransitionLength()... (#1205)
...which was not setting new length to transition tween and causing the new length to have no effect.
2019-10-23 13:43:56 +03:30
Ali-RS
5c75af1d38 AnimComposer: added getTime() and setTime() methods (#1201)
Resolves #1200
2019-10-13 10:52:40 -07:00
Github Actions
96b16884ce [skip ci] update natives snapshot 2019-10-10 10:20:50 +00:00
Riccardo Balbo
a4c694ba36
Trigger rebuild 2019-10-10 12:00:42 +02:00
Riccardo Balbo
69ef8efcce Github Actions 2019-10-10 11:38:21 +02:00
Riccardo Balbo
88e9c8482c Store prebuild libraries outside the source folder, download prebuilt libraries from bintray 2019-10-10 11:11:49 +02:00
Riccardo Balbo
8a6bd1947c Remove fixed structure for version names 2019-10-10 11:11:49 +02:00
Riccardo Balbo
273f65b651 Fix toolchain. Add way to select wich platform you want to build. 2019-10-10 11:11:49 +02:00
MeFisto94
88385ba647 Build Bullet for Linux ARM (Raspberry Pi) 2019-10-10 11:11:49 +02:00
Ali-RS
b1db497a00 Fix issue #1197: ClassCastException in LODGeomap.createMesh() (#1198) 2019-10-08 11:52:52 -07:00
Daniel Perano
f312608725 Fixed ClassCastException in RMI implementation. (#1195)
jME's RMI registry uses an internal SharedObject class to track
metadata about objects that have been shared. The problem is that when
you retrieve the shared object, the RMI implementation mistakenly
attempts to cast the SharedObject holder to the class of the actual
shared object. This PR fixes that bug by casting the actual shared
object instead of the SharedObject holder.
2019-10-06 10:25:31 +03:30
Ali-RS
f506e2a5a5 Updated mockito-core to v3.0.0 2019-09-23 12:01:55 +02:00
Ali-RS
a6a35b370f Fix issue #1176: mergedJavadoc task fails on java 11 2019-09-23 12:01:55 +02:00
appveyor
3b6a602f96 [ci skip] bullet: update windows natives 2019-09-21 21:39:01 +00:00
Stephen Gold
62faa9a873 post-release cleanup 2019-09-21 14:32:59 -07:00
appveyor
84d3e0615d [ci skip] bullet: update windows natives 2019-09-21 19:26:21 +00:00
Stephen Gold
bb32b882a0 gradle.properties: ready for 3.3.0-alpha5 build 2019-09-21 12:21:08 -07:00
Stephen Gold
2010c819cb travis: upload JARs and deploy from UPLOAD builds only 2019-09-21 12:20:40 -07:00
appveyor
4c8cd56c50 [ci skip] bullet: update windows natives 2019-09-21 16:24:26 +00:00
sgold
b57d8239b4 gradle.properties: ready for 3.3.0-alpha4 build 2019-09-21 09:19:17 -07:00
sgold
52fbc17f4f travis: compile Linux natives on openjdk8, upload JARs from oraclejdk8 2019-09-21 09:00:46 -07:00
appveyor
1f02d87793 [ci skip] bullet: update windows natives 2019-09-21 01:11:47 +00:00
Stephen Gold
001b59344d gradle.properties: ready for 3.3.0-alpha3 build 2019-09-20 18:03:34 -07:00
Stephen Gold
0425c61dd4
fix for issue #1178 (BulletAppState violates AppState contract) (#1187)
* fix for issue #1178 (BulletAppState violates AppState contract)

* BulletAppState: make isRunning volatile (potential multithreaded access)
2019-09-20 17:51:44 -07:00
Stephen Gold
dcb66977ba fix issue #1188 (TestNiftyExamples crash) 2019-09-20 13:33:32 -07:00
Ali-RS
621a4ab6a9 Bump LWJGL3 version to '3.2.3' on jme3-vr as well 2019-09-20 12:13:59 -07:00
Ali-RS
981aa1d181 Bump LWJGL3 version to '3.2.3' 2019-09-20 12:13:59 -07:00
Stephen Gold
46a52af2f5 README.md: fix linkrot in the powered-by-JME list 2019-09-19 10:35:36 -07:00
travis-ci
bc38b9b7ef [ci skip] bullet: update linux natives 2019-09-19 04:57:54 +00:00
Stephen Gold
89e753bf47
.travis.yml: use openjdk8 for the uploading build 2019-09-18 21:47:55 -07:00
Stephen Gold
3e89cd1377
define 2 new Platform values for Linux ARM, register BulletJme lib paths (#1182) 2019-09-18 20:50:45 -07:00
sgold
126874873c .travis.yml: try xenial dist for the oraclejdk8 build 2019-09-18 20:22:48 -07:00
travis-ci
6640436b03 [ci skip] update android natives 2019-09-19 03:07:46 +00:00
travis-ci
cc9fcd7173 [ci skip] bullet: update osx natives 2019-09-19 03:04:41 +00:00
appveyor
8f6c88413f [ci skip] bullet: update windows natives 2019-09-19 03:02:53 +00:00
sgold
3482904c76 CollisionShape: add isNonMoving() and test buildscript 2019-09-18 19:56:39 -07:00
travis-ci
4ccdd7aae0 [ci skip] update android natives 2019-09-19 02:46:36 +00:00
sgold
814ab1b106 upload_native.sh: single commit per Travis CI job 2019-09-18 19:34:17 -07:00
travis-ci
4e56a6e24a [ci skip] bullet: update osx natives 2019-09-19 01:48:22 +00:00
appveyor
06c07fe0df [ci skip] bullet: update windows natives 2019-09-19 01:45:44 +00:00
Stephen Gold
42530de219 PhysicsCollisionObject: add getDeactivationTime() and test buildscript 2019-09-18 18:40:10 -07:00
Stephen Gold
2c2f76cca1 upload_native.sh: use "git diff" instead of "git diff-tree" 2019-09-18 18:15:37 -07:00
travis-ci
91f304272a [ci skip] bullet: update osx natives 2019-09-19 00:17:24 +00:00
appveyor
1484107c92 [ci skip] bullet: update windows natives 2019-09-19 00:14:56 +00:00
Stephen Gold
392a3c5cff SixDofJoint: add getAngles() and test recent buildscript changes 2019-09-18 17:09:12 -07:00
Stephen Gold
0f3bc6cdcf upload_native.sh: add debugging aids and comments 2019-09-18 16:46:16 -07:00
Stephen Gold
5eaf653de9
address issue #1119 (serialization with protected/private constructor) (#1181)
* address issue #1119 (serialization with protected/private constructor)

* remove an unnecessary step in findNoArgConstructor()

* use getDeclaredConstructor() in place of the for-loop

* simplify by throwing the exception in findNoArgContructor()
2019-09-17 17:58:44 -07:00
travis-ci
909ea30216 [ci skip] bullet: update osx natives 2019-09-17 20:37:21 +00:00
appveyor
637ccf91db [ci skip] bullet: update windows natives 2019-09-17 20:34:42 +00:00
Stephen Gold
30d1ecaec2 fix for issue #1157 (can't enable a TranslationalLimitMotor) 2019-09-17 13:27:08 -07:00
Stephen Gold
3c74fe539c
test and fix for issue #1138 (#1177) 2019-09-17 08:53:19 -07:00
MeFisto94
6aac1a21bd Continuous Integration: Change else-if to if, so that when multiple natives have been changed that multiple commits are issued. 2019-09-17 13:02:34 +02:00
MeFisto94
ad64b7e4b6 Continuous Integration: Fix regression in 21d0854b6132cf450c4eeba470594f16a4b76eba. Variable was misnamed. 2019-09-17 12:37:01 +02:00
MeFisto94
21d0854b61 Continuous Integration: Also upload natives from bullet-native-android and android (#1171) 2019-09-17 12:28:49 +02:00
MeFisto94
c461a1b43d .travis.yml: remove deployment of android-natives from ubuntu build so they don't conflict with the android build matrix (#1171) 2019-09-17 11:51:48 +02:00
Stephen Gold
9aa25ad3ef
build.gradle: the clean task should remove merged javadoc 2019-09-16 17:27:03 -07:00
Stephen Gold
04953341d4
.travis.yml: continuous integration shouldn't need root privileges 2019-09-16 13:13:51 -07:00
mitm001
7a4e881bc6 Adding link to project tab. (#1170) 2019-09-16 20:49:56 +04:30
appveyor
970eb7fa15 [ci skip] bullet: update windows natives 2019-09-16 13:55:03 +00:00
MeFisto94
1bde90d1a1 Build android bullet-native on Travis (#1175)
* First attempt at building android-natives.

*  Use OpenJDK because native build is broken without

* Try OpenJDK 10

* Try openJDK 9

* Try openJDK11 again but "enable" the EE Module

* OpenJDK 11 has no Java EE Module anymore.

* Try to fix Android Header Generation

* Fix invalid flag error with javac by removing empty quotes

* Try to fix build of decode.

* Remove jni generated headers from the repository.

* Adjust .gitignore as those header files won't appear at that location anymore

* Fix Android Build: Fill the jme3-android-native headers during the build of jme3-android. This works because jme3-android-native already depends on jme3-android.

Due to technical reasons, the headers share the same location and thus the include directives have been adjusted slightly.

* Copy jni headers to the jni directory.

* Adjust the path slightly

* Try to silence android sdk's license print out

* Also fix openAL

* Solve task name conflict

* Really silence license now

* Tasks seem shared but Strings are not...

* Only build Android-Native

* Trying to reduce the amount of dependencies needed.

* Remove even more dependencies

* Even more removal

* Prepare Deployment

* Fix Deployment

* Cleanup: Remove feature branch from branches for travis.

* Revert a few unnecessary things

* Removed NDK Comments.

* Bullet Android: Some cosmetic changes (removed commented debug code) and generate bullet-native headers during jme3-bullet compilation.

* Fix Bullet Build by using GNU libstdc++ instead of STLPort (discontinued)

* Fix Bullet-Native Compilation
2019-09-16 06:49:45 -07:00
Stephen Gold
194ae883c5
fix for issue #99 (pr #1082) 2019-09-15 21:43:11 -07:00
MeFisto94
3ec89ce499 Fix and Improve TerrainPicking (#1049)
* Fix TerrainPicking by not adding "ghost" collisions to the CollisionResults (which weren't removed).

Improve TerrainPicking by allowing to do more ray tracing (previously, it stopped on the first hit, now it will stop on the first hit within range).

* Upgraded TerrainTestCollision to support multiple collisions and print the collision results detailed. MultiCollision can easily be turned on/off in simpleInitApp().
During testing, I noticed a bug where in very rare cases the first collision isn't what is expected but the back side of the clicked mountain. It has to be validated if this is due to the following changes or was already present.

* Added Basic Unit Tests for Collision

* TerrainPicker: Change API to return int to conform with collideWith

* TerrainQuad: Conform with Picker now returning the number of collisions and allow to set multipleCollisions true or false.

* TerrainPicking: Fixed a bug where the perpendicular collision always returned true, no matter the result of checkTriangles.

Also add support for multiple collisions (which is toggleable to the old behavior, because the picker can early out then).

* Try to fix Travis Build

* Fixed a Regression which occurred due to Multi Collision Handling:
The method used to provide duplicate results, which is why I commented it out. This lead to corner-cases not colliding at all anymore, thus I added a unit-test and removed the commented code and instead made addCollision de-duplicate entries.
2019-09-15 19:57:06 -07:00
Paul Speed
1ffd11fae4 Added a basic unit test for some of the AppStateManager functionality.
(Specifically the stuff that deals with IDs.)
Also added the ability to use groovy tests for those who like a little
testing but aren't complete masochists.
2019-09-15 20:54:53 -04:00
Paul Speed
36afe829c6 Part 2 of the small AppState refactoring: added methods to AppStateManager
for retrieving an AppState by ID.  Also modified attach() to throw an
IllegalArgumentException if the ID is already registered.
Updated TestAppStateLifeCycle to add a small ID demonstration.
2019-09-15 20:27:46 -04:00
Paul Speed
3dd2755c20 Merge branch 'master' of https://github.com/jMonkeyEngine/jmonkeyengine 2019-09-15 19:40:36 -04:00
Paul Speed
3b8314a36f Part 1 of small refactoring to give AppState a unique ID for lookup purposes.
This is a breaking change for direct implementers of AppState as they must
add a getId() method.  (Which is also a good time to evaluate if they should
be extending AbstractAppState or BaseAppState and/or if their life cycle is
implemented correctly. e.g.: BulletAppState is breaking the AppState contract
a bit.)
2019-09-15 19:38:50 -04:00
MeFisto94
90d3b69bd1 Build Android Natives (OpenAL, Vorbis, TextureLoading) on Travis (#1171)
* First attempt at building android-natives.

*  Use OpenJDK because native build is broken without

* Try OpenJDK 10

* Try openJDK 9

* Try openJDK11 again but "enable" the EE Module

* OpenJDK 11 has no Java EE Module anymore.

* Try to fix Android Header Generation

* Fix invalid flag error with javac by removing empty quotes

* Try to fix build of decode.

* Remove jni generated headers from the repository.

* Adjust .gitignore as those header files won't appear at that location anymore

* Fix Android Build: Fill the jme3-android-native headers during the build of jme3-android. This works because jme3-android-native already depends on jme3-android.

Due to technical reasons, the headers share the same location and thus the include directives have been adjusted slightly.

* Copy jni headers to the jni directory.

* Adjust the path slightly

* Try to silence android sdk's license print out

* Also fix openAL

* Solve task name conflict

* Really silence license now

* Tasks seem shared but Strings are not...

* Only build Android-Native

* Trying to reduce the amount of dependencies needed.

* Remove even more dependencies

* Even more removal

* Prepare Deployment

* Fix Deployment

* Cleanup: Remove feature branch from branches for travis.

* Revert a few unnecessary things

* Removed NDK Comments.
2019-09-14 11:26:18 -07:00
Paul Speed
0d8fe2ac22 Created a LazyMessageBuffer class that differs from GreedyMessageBuffer only
in that it delays serialization until the message is requested.  This should
fix the issue where the initial server messages would sometimes fail to
deserialize because the serialization registration message hadn't been processed
before the other messages in the block were deserialized.  Now each message will
be deserialized as it is encountered.
In the end the fix was simple enough that it's probably only a 2-3 line change to
MessageProtocol in JME 3.2 if someone wants to back port the fix.  (Just queue
up ByteBuffer instead of Message.)
2019-09-08 21:17:04 -04:00
Paul Speed
1c37d5a92d Refactored the base networking imlpementation's "MessageProtocol" to be an
interface and strictly implement the to/from ByteBuffer protocol.  In the future
this will allow the message protocol to be swappable.  Also moved out the buffering
aspect since often buffers need to be created 'on the fly' and are separate from
the protocol.  This will allow me to play with fixing the issue related to messages
being deserialized before the serialization registry message has been processed by
swapping out the GreedyMessageBuffer implementation for a LazyMessageBuffer implementation.
2019-09-08 20:40:53 -04:00
Riccardo Balbo
a9afcecc41
Recognize .glsl files as glsllib. 2019-09-02 09:25:41 +02:00
grizeldi
484d192467 Some fixes in jme-vr (#1163)
* Added Valve Index to the recognized HMD list

* Fix lwjgl version mismatch

* Removing linux from the blacklist
2019-08-28 23:15:57 -07:00
Ali-RS
3d7a5ee01b
Fixed an issue with previous commit 2019-08-13 11:39:02 +04:30
Ali-RS
740832d699
Renamed class to TestRtlBitmapText 2019-08-13 11:17:37 +04:30
Ali-RS
16ccd36d56
Rename TestRTLBitmapText.java to TestRtlBitmapText.java 2019-08-13 10:49:17 +04:30
Ali-RS
53839ca528
Added TestRTLBitmapText for issue #1158 (#1159) 2019-08-13 10:22:10 +04:30
Dima Myroniuk
ae67b9c6f8 Update the link of the "Lightspeed Frontier". (#1160)
The old link leads to the site for adults.
2019-08-12 22:12:55 -07:00
Ali-RS
467d7b2f0f Modified TransformTrack.jmeClone() return type to TransformTrack (#1155) 2019-07-30 06:33:08 -07:00
sgold
3fe896300d README.md: 3.2.4 is the latest stable version of the SDK 2019-07-27 13:31:34 -07:00
Lou Hamersly
b864372256 Fix for NPE when running TestGImpactShape via TestChooser (#1151) 2019-07-25 08:08:40 -07:00
Stephen Gold
acdeef54fe
.travis.yml: specify "precise" Linux distro for JDK8 build
Travis's default Linux distro is now "xenial" !
2019-07-24 13:50:36 -07:00
empirephoenix
80aed88f82 fix for NPE when being called from CombinedTexture with null baseImage (#1146)
* fix for NPE when being called from CombinedTexture with null baseImage

* formating only
2019-07-24 09:09:55 -07:00
Lou Hamersly
de092b92bb Wrap potential IOExceptions during native file extraction 2019-07-16 13:40:37 +02:00
travis-ci
e31a047746 [ci skip] bullet: update linux natives 2019-07-12 03:34:03 +00:00
travis-ci
9f51de98a5 [ci skip] bullet: update osx natives 2019-07-12 03:33:47 +00:00
appveyor
e7bf627e9d [ci skip] bullet: update windows natives 2019-07-12 03:31:43 +00:00
sgold
23ee02071e fix for issue #1141 2019-07-11 20:25:37 -07:00
Ali-RS
02ccce08ec
Updated CONTRIBUTING.md (#1139)
* Updated CONTRIBUTING.md

Added "Customs around integration, branching, tagging, and releases" section to contribution guide.

* Clarify that the admonition to squash PRs is directed at integrators
2019-07-11 09:56:05 +04:30
Trevor Flynn
57db8f618f Add support for gltf morph names. (#1100)
* Add support for gltf morph names.

* Fix formatting stuff

* Add morph name to be saved

* Testing changes to gltf plugin

* Review changes

* Fix comments

* Fixes for review

* Remove getMorphNames from Geometry class
2019-07-11 09:51:25 +04:30
Riccardo Balbo
7058439e7d
Merge pull request #1132 from riccardobl/fixfspace
Fix forced colorspace in matdefs working only once.
2019-07-08 09:33:27 +02:00
Sebastian Teumert
0ffc612bfb jme-core: IndexBuffer fixes & API improvements (#1136)
* jme-core: IndexBuffer fixes & API improvements

As discussed in:
https://hub.jmonkeyengine.org/t/indexbuffer-suggestions-improvements-consistency/42022/4

* [Fix] createIndexBuffer(int, int): return IndexByteBuffer as well for
	vertexCount < 128
* [Enhancement] Make put(int i, int value) fluid interface
* [Enhancement] Add relative put(int i) to allow easier chaining (parity
	with other buffer implementations)
* [Enhancement] Add getFormat() to allow setting an IndexBuffer to a
	Mesh directly without type inspection.
* [Fix] Fix WrappedIndexBuffer
	API changes make it possible that IndexByteBuffer is now a valid  type
for outBuf, leverage the new getFormat() method to set the buffer to the
mesh regardless of its type.

* Update VirtualIndexBuffer to @72f8019566fa4d1379caa820c0c9dc000f489444
2019-07-07 20:42:18 -07:00
Lou H
827d4ebd52 Test for issue #1120 - JBullet GImpactShape fall-through (#1137) 2019-07-07 20:40:02 -07:00
travis-ci
1d5fe496e0 [ci skip] bullet: update linux natives 2019-07-04 15:38:33 +00:00
appveyor
69319738e6 [ci skip] bullet: update windows natives 2019-07-04 15:38:00 +00:00
travis-ci
918d90a637 [ci skip] bullet: update osx natives 2019-07-04 15:37:31 +00:00
Stephen Gold
f831301a2a fix for issue #1135 (ConeJoint causes rigid body to disappear) 2019-07-04 08:29:30 -07:00
sgold
2ab0319202 jme3-examples: apply the "dirt_normal.png" normal map where appropriate 2019-07-01 10:10:20 -07:00
Lou H
8856ba7d25 GImpactShape Test Added (#1117)
* GImpactShape Test Added

* GImpactShape Test Updates (WIP)

* Minor tweaks based on feedback

* Minor corrections + documentation added

* Final tweaks
2019-07-01 09:16:05 -07:00
sgold
cff4dec57d README.md: a v3.2.3 SDK was released on 28 June 2019 2019-06-30 11:50:04 -07:00
Riccardo Balbo
e603845fa5 Fix forced colorspace in materials when a matparamtexture value is changed. + unit test 2019-06-26 23:10:18 +02:00
Stephen Gold
fca8bcf470 make native Bullet the default for jme3-examples (instead of JBullet) 2019-06-26 12:33:34 -07:00
Remy
adb88dcaeb when the image object has a ColorSpace value we pass it on, else we leave it at the default value. fix for #1106 (#1110) 2019-06-26 09:26:28 -07:00
sgold
23759820e5 fix GImpact scaling in jme3-jbullet: issue #1120 2019-06-20 11:29:33 -07:00
travis-ci
12e513c8ee [ci skip] bullet: update linux natives 2019-06-20 14:47:01 +00:00
travis-ci
ad6232c297 [ci skip] bullet: update osx natives 2019-06-20 14:44:47 +00:00
appveyor
5b9693f000 [ci skip] bullet: update windows natives 2019-06-20 14:43:36 +00:00
sgold
56d37cb866 fix GImpact scaling in jme3-bullet (native Bullet) 2019-06-20 07:34:38 -07:00
Stephen Gold
2cd3dac543 jme3-bullet fix for issue #1125 (physics shapes don't match TerrainQuad) 2019-06-18 12:30:54 -07:00
Stephen Gold
df02333cd2 add test for issue #1125 (heightfield shapes don't match TerrainQuad) 2019-06-18 12:18:50 -07:00
Stephen Gold
5586c28c95 fix for issue #1116 (NPE in TerrainGridAlphaMapTest) 2019-06-18 10:05:00 -07:00
Lou H
1687d34eb7 #1107 - Javadoc warning cleanup & Fix for JDK 11 Javadoc NPE (#1118)
* Fixed "broken" @see tags causing Javadoc NPE in JDK 11

* Updated comments to clear Javadoc warnings in JDK 11

* Added @Deprecated annotations to clear JDK 11 Javadoc warnings
2019-06-18 09:06:48 -07:00
Lou H
1f3245b237 #1121-updateBound() call for PQTorus geometry updates (#1122)
* #1121-updateBound() call for PQTorus geometry updates

* World bounds test added for #1121

* World bounds test enhancements for #1121

* Updated test comment
2019-06-18 09:04:26 -07:00
Stephen Gold
a91bcfd678 fix for issue #1127 ("Reset" action in TestHoveringTank) 2019-06-18 08:50:49 -07:00
Stephen Gold
a4b22e4b37 fix for issue #1126 (TestHoveringTank assertion failures) 2019-06-18 08:36:44 -07:00
richardTingle
04f771f7f9 Issue 1113. Allow for Particle emitters that constantly have their particlesPerSec set to still emit (#1114)
Previously if particlesPerSec was constantly set timeDifference could never grow large enough to emit a particle as timeDifference was reset to zero each time. This fixes that problem while still ensuring that timeDifference can't have grown very very large (leading to huge numbers of particles being emitted) by capping the timeDifference at the point where its just about to emit a particle.

Discussed at https://hub.jmonkeyengine.org/t/particle-emitter-cannot-emit-particles-if-its-emissions-per-second-is-updated-every-frame/41930/2
2019-06-08 17:12:04 -07:00
Lou H
f8dae05a52 #1107-Fix Javadoc warnings in OpenJDK 9+ (#1112) 2019-06-08 17:06:23 -07:00
Karan Nehra
9dff704a82 Attempt to fixing 1074 (#1093)
* Attempt to fixing 1074

* Added method implementations in GlRenderer

* Added test.

* Added test to jme-examples

* Some changes to resolve merge conficts

* Fixes

* Indent-fixes

* Documented the class and added stop()

* Fixed a minor error

* Fixed build gradles

* Removed line ending
2019-06-05 08:23:32 -07:00
Lou Hamersly
cde108c2c0 #1107-Fix Javadoc warnings in OpenJDK 9+ 2019-06-05 08:21:34 -07:00
Riccardo Balbo
97049630eb
Merge pull request #1109 from karanehra/fix-1051
Fix for 1051
2019-06-04 09:21:14 +02:00
Karan Nehra
ddeb4549a2 Fix for 1051 2019-06-03 23:11:56 +05:30
Lou H
930090dfa0 #1097-Fixed inconsistent OpenGL version constants (#1099) 2019-06-03 09:35:12 +02:00
Lou Hamersly
cf45e66d11 Fix Javadoc warnings in OpenJDK 9+ 2019-06-02 20:15:28 -07:00
James Khan
b145268004
Merge pull request #1104 from jayfella/master
Add unInterpolateLinear to FastMath class
2019-06-01 04:50:45 -07:00
James Khan
82faaca87c Add unInterpolateLinear to FastMath class 2019-06-01 12:39:13 +01:00
James Khan
a8f5ac0589
Merge pull request #1094 from jayfella/master
Add support for fog in materials.
2019-05-30 09:54:09 -07:00
James Khan
1116df31c9 Add fog to Single-Pass lighting. 2019-05-30 15:31:18 +01:00
Riccardo Balbo
a68d8b50e3
Add support for opengl versions > 3.2 in lwjgl2 renderer 2019-05-27 18:37:44 +02:00
lifeinwild
7e11a6c0fe Use UTF-8 in gradle builds 2019-05-26 22:09:54 +02:00
James Khan
4f47e5602b Add support for fog in materials. 2019-05-23 20:49:18 +01:00
appveyor
a43ad8ecfe [ci skip] bullet: update windows natives 2019-05-22 23:38:37 +00:00
Stephen Gold
5451e3eaf0 post-release fixup 2019-05-22 16:32:54 -07:00
Stephen Gold
3f1f2e8356 trivial commit with tag for v3.3.0-alpha2 2019-05-22 14:01:51 -07:00
Paul Speed
33ade6b874
Merge pull request #1087 from jayfella/master
Add support for listening to joystick connection/disconnection.
2019-05-22 14:40:35 -04:00
Stephen Gold
6a71a1c273 trivial commit with tag 2019-05-22 10:47:47 -07:00
Stephen Gold
ac01203c80 gradle.properties: ready for 3.3.0-alpha2 build 2019-05-22 09:47:59 -07:00
James Khan
b9b4a2d75b Reference the joystick that changed state instead of the ID.
Use separate connection methods (onConnected/onDisconnected).
2019-05-13 09:59:49 +01:00
James Khan
2f6185b5cf Remove JoystickState enum and replace with boolean value. 2019-05-12 08:31:14 +01:00
James Khan
d3be2f332f Use enum constants instead of integer ID's 2019-05-11 20:19:44 +01:00
James Khan
76fcc2c497 Remove magic number translations and remove uppercase names. 2019-05-11 20:18:56 +01:00
James Khan
682d8c9fd8 Use RawInputListener for InputManager instead of creating another field.
Set methods to use JoystickState enum instead of event integers.
2019-05-11 20:18:15 +01:00
James Khan
80adca6dce Translate JoystickState directly from LWJGL context.
Set the logger to the correct class
2019-05-11 20:17:05 +01:00
James Khan
318d6d0e89 Add support for listening to joystick connection/disconnection.
Fixes bug causing NullPointerException when removing joysticks.
Allows adding joysticks after the application has started.
2019-05-11 15:25:11 +01:00
Ali-RS
c4d2de1656
AnimComposer: updated to save globalSpeed on export and fixed issue with Layer cloning (#1080)
* AnimComposer: save globalSpeed on export

* Updated TestModelExportingCloning to test AnimComposer.globalSpeed

* Fixed issue with AnimComposer.Layer cloning
2019-04-30 08:22:09 +04:30
Stephen Gold
50aed6f59e
Travis: use "xenial" Linux dist to solve TLS issue (#1081)
Fixing the broken build. Thanks to @Ali-RS for providing the hint:  https://travis-ci.community/t/install-of-openjdk11-is-failing-again/3061/16
2019-04-29 10:11:29 -07:00
Stephen Gold
fff16c2328 TestIssue99: specify panel widths, clarify interpretation of results 2019-04-27 12:47:48 -07:00
Ali-RS
36ddb5b0ce
Added ambient light support in PBR shader (#1077)
* Added ambient light support in PBR shader

* Updated to auto inject the define value if ambient light found
2019-04-27 14:56:45 +04:30
Stephen Gold
40be1b42b8 DynamicAnimControl: remove all mention of attachments incl. isReleased() 2019-04-26 10:20:08 -07:00
Stephen Gold
432085c191 TestBoneRagdoll: reduce jumpiness during "toggle" actions 2019-04-26 10:13:01 -07:00
Stephen Gold
234bd476f3 implement contact-response for jme3-jbullet's PhysicsRigidBody 2019-04-25 19:50:42 -07:00
Remy
8d3980bbe9 Refactor collection to set in anim composer (#1076)
* returns an unmodifiable set when retrieving the available animation names and available animation clips instead of an unmodifiable collection. fixes: #1070

* remove unnecessary set wrapper.

* Remove the unnecessary creation of a new hashset everytime getAnimClips() is called.
2019-04-24 16:11:51 -07:00
Stephen Gold
0bf931bf79 revert integration of PR #1071 which wasn't ready 2019-04-22 03:15:04 -07:00
Greg Hoffman
0bc060d474 Added an easy way to add sub steps to the profiler (#1067)
* Added an easy way to add sub steps to the profiler and enhanced the App State Manager to profile the update method of each app state

* Added the profiler step to the android profiler

* Fixed missing profiler extensions
2019-04-22 01:41:40 -07:00
Remy
ffa1df2aff returns unmodifiable sets (#1071)
* returns an unmodifiable set when retrieving the available animation names and available animation clips instead of an unmodifiable collection. fixes: #1070

* remove unnecessary set wrapper.
2019-04-22 01:39:43 -07:00
Trevor Flynn
9c1452b63b Fixed classes location while building natives (JDK11 Support) (#1073)
* Fixed classes location while building natives
* Fix minor formating issue
2019-04-20 10:43:16 -07:00
appveyor
41f88cd5eb [ci skip] bullet: update windows natives 2019-04-15 20:17:31 +00:00
Trevor Flynn
ad2ba95e99 Jdk 11 Build Support 2019-04-15 22:03:18 +02:00
remy
74588d96f3 adapt the caption of the string 2019-04-15 18:42:06 +02:00
Remy Van Doosselaer
988537987a calculate the total line height before aligning the letters, calculate the total line height from the font line height and total line count. Include a test case with alignment examples. fixes: #363 2019-04-15 18:42:03 +02:00
travis-ci
35b9d9df4e [ci skip] bullet: update linux natives 2019-04-13 06:13:33 +00:00
travis-ci
4bd8cfb218 [ci skip] bullet: update osx natives 2019-04-13 06:12:46 +00:00
appveyor
28cba18cbf [ci skip] bullet: update windows natives 2019-04-13 06:11:40 +00:00
Stephen Gold
9e532009da fix for issue #1037 (TestHoveringTank hull-shape performance issue) 2019-04-12 23:03:56 -07:00
Stephen Gold
ba340cf13a add a test case for issue #99 (blendMode="multiply" in NiftyGUI) 2019-04-12 22:10:31 -07:00
travis-ci
3696074c9a [ci skip] bullet: update linux natives 2019-04-12 18:19:20 +00:00
travis-ci
18cc15254b [ci skip] bullet: update osx natives 2019-04-12 18:19:04 +00:00
appveyor
73c055c37e [ci skip] bullet: update windows natives 2019-04-12 18:18:00 +00:00
Stephen Gold
8a4e5e1177 fix issue #1060: bt32BitAxisSweep3 not implemented 2019-04-12 11:10:44 -07:00
Paul Speed
657c5841aa
Merge pull request #1066 from rvandoosselaer/fix-classcastexception-#1065
fixed wrong reference check #1065
2019-04-09 13:54:07 -04:00
Remy Van Doosselaer
9a80f013fc fixed wrong reference check 2019-04-09 19:24:10 +02:00
Rickard Edén
1a1348983b
Merge pull request #1064 from FennelFetish/jme3-vr_mouse-fix
Adds option to disable VR mouse cursor
2019-04-08 16:00:17 +02:00
FennelFetish
88a9069662 Adds option to disable VR mouse cursor and thus enable the cursor on the desktop.
Fixes repeated attachment of mouseImage as scene to gui viewport (because its parent was always null).
2019-04-08 15:17:19 +02:00
Riccardo Balbo
3b24067a3c Add RGTC format 2019-04-07 10:22:18 -07:00
Paul Speed
7c6e12ed70
Merge pull request #1062 from jMonkeyEngine/revert-1054-export-transparent-png
Revert "Modified JmeDesktopSystem.writeImageFile() to export transparency for…"
...at least until we can fix it properly.
2019-04-06 01:11:43 -04:00
Ali-RS
cd90be13ec
Revert "Modified JmeDesktopSystem.writeImageFile() to export transparency for…" 2019-04-06 09:17:03 +04:30
Stephen Gold
d55776d081 revise TestBoneRagdoll & TestRagdollCharacter to use DynamicAnimControl 2019-04-03 08:07:52 -07:00
Stephen Gold
235b9db2ca publicize Joint.applyBindPose(), add DynamicAnimControl & related stuff 2019-04-03 08:07:52 -07:00
Paul Speed
59af265398 Updated the joystick test to indicate when the new LEFT_TRIGGER/RIGHT_TRIGGER
axes are used.
Also changed the console output to include the logical ID of triggered axes instead
of just the name.
2019-03-31 20:38:33 -04:00
Paul Speed
54b812ca71 Standardized the XBox controller mappings to one XBOX set of entries
and remapped all .*xbox.* names to it.  All of the specific XBOX remappings
have been commented out for now.  They can be removed once it is confirmed
that old working functionality is not newly broken.
2019-03-31 20:33:32 -04:00
Paul Speed
5901a95363 Added new JoystickAxis.LEFT_TRIGGER/RIGHT_TRIGGER.
Updated JoystickCompatibilityMappings to support normalizing joystick names
based on a regex.  For example:
XBOX.regex=(?i).*xbox.*
...will allow configuring all joysticks with xbox in the name with one
XBOX configuration.
2019-03-31 20:18:11 -04:00
quazi-irfan
5bc64800e0 Fix printing if stencil is enable or disable 2019-03-31 13:12:01 -07:00
Paul Speed
ac60a134d2 Updated the axis event processing to pay attention to dead zones.
A little more complicated than just ignoring values in the dead zone since
we have to bring them back to 0... but not much more complicated than that.
2019-03-31 14:56:11 -04:00
Stephen Gold
27bd16979c
Armature.java: correct a typo in the javadoc 2019-03-29 18:32:31 -07:00
Stephen Gold
f0d28a9501
changed Mythruna link to use http instead of https 2019-03-29 11:23:08 -07:00
Stephen Gold
a2df09b2fd
add Spoxel to the list of games in the README.md 2019-03-29 10:29:57 -07:00
Riccardo Balbo
51cadb260c
Merge pull request #1050 from Diffblue-benchmarks/virtual-buffer-tests
Add tests for com.jme3.scene.mesh.VirtualIndexBuffer
2019-03-29 13:00:58 +01:00
Riccardo Balbo
cf7b15bc23 j3md Fix for default textures (#1052) 2019-03-27 10:19:37 -07:00
Stephen Gold
1ad324aa57
fix issue #901 (collision margins initialized to 0) (#1053)
* fix issue #901 (collision margins initialized to 0)

* add a getter for the default collision margin
2019-03-23 15:18:13 -07:00
James Adam
7c2a401c28 Add tests for com.jme3/scene.mesh.VirtualIndexBuffer 2019-03-22 12:51:28 +00:00
Riccardo Balbo
f60ff58ef0 Add bullet extraction directory, bin and vscode config to gitignore 2019-03-22 09:46:05 +01:00
Paul Speed
9a6032a087
Merge pull request #1054 from Ali-RS/export-transparent-png
Modified JmeDesktopSystem.writeImageFile() to export transparency for…
2019-03-22 03:49:37 -04:00
Ali-RS
c43eafc319
Modified JmeDesktopSystem.writeImageFile() to export transparency for PNG format. 2019-03-22 10:21:43 +04:30
appveyor
9f9b443dee [ci skip] bullet: update windows natives 2019-03-21 22:48:26 +00:00
Stephen Gold
dc99bc0731 post-release fixup 2019-03-21 15:41:58 -07:00
Stephen Gold
a6622d4613 trivial commit with tag 2019-03-21 14:32:59 -07:00
Stephen Gold
9d9132d5b6 .travis.yml: work around Travis's tag blindness using a regexp 2019-03-21 14:07:35 -07:00
appveyor
31574f1c65 [ci skip] bullet: update windows natives 2019-03-21 20:01:30 +00:00
Stephen Gold
a03f1fe49c gradle.properties: ready for 3.3.0-alpha1 build 2019-03-21 12:53:18 -07:00
Quazi Irfan
76049c76f3 Add getSpatial to GhostControl, RigidBodyControl, AbstractPhysicsCont… (#1041)
* Add getSpatial to GhostControl, RigidBodyControl, AbstractPhysicsControl and CharacterControl. Fix issue 1008

* Fix doc: control is attached to spatial. Not the other way around.

* Update doc: Clarify what getSpatial returns
2019-03-19 12:52:21 -07:00
Stephen Gold
2124e3e86b TestGltfLoading: comment 2019-03-18 13:21:53 -07:00
Stephen Gold
b9c13a209a JavaDoc correction to AnimComposer (comments only) 2019-03-16 19:15:44 -07:00
Stephen Gold
7e929aacab FbxLoader: comment out some debug spam to System.out - see issue #1025 2019-03-16 19:15:43 -07:00
James Adam
fe03a9b6a3 Add tests for com.jme3.math.Vector3f 2019-03-16 10:46:16 -07:00
James Adam
eba9ef6d58 Add tests for com.jme3.math.FastMath 2019-03-13 14:10:45 -07:00
Ali-RS
6dd737d378 Added AnimComposer.getAction() and AnimComposer.addAction() and improved
JavaDoc.
2019-03-11 00:08:21 -07:00
Stephen Gold
ffa58be3d7 remove more unused imports 2019-03-09 12:37:12 -08:00
Stephen Gold
75112201db more corrections in diagnostic messages 2019-03-09 12:04:43 -08:00
Stephen Gold
2356320d30 more comment-only correction 2019-03-09 11:57:23 -08:00
Riccardo Balbo
3851c35f08 Add blend mode that sums alphas and does alpha blending for colors 2019-03-09 11:07:40 -08:00
Stephen Gold
784106e0c6 Revert "fix for issue #989 (RollingTheMonkey works with JBullet but not native)"
This reverts commit 1bb388d793e6acdf082cb948ad46951ece9ee20a.
2019-03-04 15:04:04 -08:00
travis-ci
ff5124bc93 [ci skip] bullet: update linux natives 2019-03-04 22:11:50 +00:00
travis-ci
d60aec411b [ci skip] bullet: update osx natives 2019-03-04 22:09:27 +00:00
appveyor
f1d9eb37c4 [ci skip] bullet: update windows natives 2019-03-04 22:03:31 +00:00
Riccardo Balbo
2bbf784c96 fix issue #1029, integrate PR #1031
* Use gContactStartedCallback instead of gContactProcessedCallback to detect collision events. ( fix for #1029 )

* Fix  Conversion loses qualifiers
2019-03-04 14:01:08 -08:00
Stephen Gold
7e6fa03009 added a test for issue #1029 2019-03-04 07:15:17 -08:00
Stephen Gold
f33252f4d0 spelling corrections in diagnostic messages 2019-03-02 17:41:21 -08:00
Stephen Gold
72bed74fa1 complete the fix for issue #1027 2019-02-27 09:15:53 -08:00
Stephen Gold
15f9f69611 fix for issue #1027 - result of rayTest() 2019-02-26 17:05:58 -08:00
Stephen Gold
4581b6cb36 jme3-examples/jme3-lwjgl3 JavaDoc corrections (comments only) 2019-02-26 13:15:18 -08:00
Stephen Gold
c7c203853c jme3-networking/jme3-plugins JavaDoc corrections (comments only) 2019-02-26 13:14:30 -08:00
Stephen Gold
8d6900a32a jme3-jbullet JavaDoc corrections (comments only) 2019-02-26 13:13:12 -08:00
Stephen Gold
5bf619cca3 jme3-terrain JavaDoc corrections (comments only) 2019-02-26 13:12:06 -08:00
Stephen Gold
b2381e8aed jme3-vr JavaDoc corrections (comments only) 2019-02-26 12:53:57 -08:00
Stephen Gold
7ad91651f1 jme3-desktop/jme3-effects JavaDoc corrections (comments only) 2019-02-25 23:43:05 -08:00
Stephen Gold
c11fbe4dd8 jme3-core JavaDoc corrections (comments only) 2019-02-25 23:27:52 -08:00
Stephen Gold
8ecddf4fa2 jme3-blender JavaDoc corrections (comments only) 2019-02-25 21:54:04 -08:00
Stephen Gold
ce730e5656 jme3-android JavaDoc corrections (comments only) 2019-02-25 19:54:17 -08:00
Stephen Gold
2c25d77e64 avoid extraneous newlines to stderr during glTF import 2019-02-25 13:26:05 -08:00
Stephen Gold
512b096cb4 fix for issue #1026: TestPhysicsCharacter spins Sinbad too fast 2019-02-21 14:07:17 -08:00
Stephen Gold
6ab7c0d91f fix for issue #910: PhysicsCharacter incompatibilities 2019-02-21 13:54:49 -08:00
Ali-RS
dae85e1598 Removed unused imports. (#1020) 2019-02-11 21:40:32 -08:00
Ali-RS
6679873c9b Added removeAction(), removeLayer() and removeCurrentAction() to AnimComposer (#1016)
* Added AnimComposer.removeAction() and AnimComposer.removeLayer()

* Added javadoc for AnimComposer.setCurrentAction()

* Moved removing of current action to a separate method.

* Added javadoc for new methods.
2019-02-10 20:50:44 -08:00
Ali-RS
9ded31cf1c Added TestUserData. (#1017) 2019-02-08 15:47:40 +01:00
Riccardo Balbo
626af3123a Add double short and byte support to UserData (#946) 2019-02-08 15:47:23 +01:00
Julien Seinturier
835fbd7957 Jme3 vr (#828)
* Updated OpenVR implementation to 1.0.9

User can specify external OpenVR library to load with
openvr.library.path system property.
Usage: java -Dopenvr.library.name=my_path_to_library MyApp

Removed reference to OCCULUS VR and OpenVR from VRAppstate as this class
is generic and does not have to be linked to specific implementation.

VRMouseManager can be buggous using OSVR or Occulus VR. 

Refactored VR implementation packages in order to separate all available
implementation. Modifying or adding implementation should no more impact
other ones. 

Renamed some classes in order to be uniform

* Sample and VR mouse manager update

Adding sample for VR AppState

Added OSVRMouseManager in order to handle VRMouseManager for OSVR
environment

Added OcculusMouseManager in order to handle VRMouseManager for Oculus
environment

Changed OpenVRMouseManager reference within VRAppState and VREnvironment
into VRMouseManager

* Revert previous commit as jme3-examples does not handle java8 and lwjgl3

* Adding AWT component rendering within app state

Adding AWT component rendering capabilities for any JMonkeyEngine
renderer (works with LWJGL 3.1.x and compatible with other
implementations)

This implementation differs from the previous one as it's relies on
AppState (compatible with all JME application) and as it use only
produces framebuffer.

With this implementation, it is possible to use AWT component ad
rendering target and so to integrate JMonkey rendering within AWT /
Swing application. This capability was not available with LWJGL3 as the
version 3.1.x does not provide anymore AWT link.

* AWTComponentAppState update

Added Update within AWTComponentAppState and added getter and setter for
transfer mode within AWTFramePRocessor

* Removing Java 8 related stuff
2019-02-08 15:44:33 +01:00
Ali-RS
7363662f21 Added isSimilar() to Quaternion, Vector2f, Vector3f and Vector4f (#1015)
* Added isSimilar() to Quaternion.

* Added isSimilar() to Vector2f.

* Added isSimilar() to Vector3f.

* Added isSimilar() to Vector4f.

* Modified isSimilar() to consider NaN.
2019-02-07 10:01:07 -08:00
Ali-RS
637162e484 Added AnimComposer.hasAction() method 2019-02-04 08:21:38 -08:00
FennelFetish
254a5839c1 Added tests for traversal order when using SceneGraphVisitor. 2019-02-02 10:14:24 -08:00
FennelFetish
0f9cf090e7 Fixes depth-first-traversal order in Node.
DFSMode needs to be passed to the recursive calls so the selected order is also applied further down the scenegraph.
2019-02-02 10:14:24 -08:00
NemesisMate
304550a0f4 Fix #324. Blender importer now respects the lightNode pos in the graph
The light is still being added, however, to the scene root node as this is the blender behavior and a wysiwyg is desired.
2019-01-27 15:37:32 -08:00
Paul Speed
7b0471c43a
Merge pull request #980 from fba-rio/patch-2
Fixed call to onJoyButtonEvent()
2019-01-27 02:28:55 -05:00
Paul Speed
d415cbb66b
Merge pull request #1010 from boonto/bugfix-float
Fix Billboard ShaderNode cannot compile on Android
2019-01-22 07:30:43 -05:00
Patrick Werner
c7f6aa9ae6
fixed billboard shader bug on android where int is used instead of float 2019-01-22 12:57:56 +01:00
Ali-RS
7b346d2760 Bump LWJGL3 version to '3.2.1' 2019-01-15 01:34:47 -08:00
Stephen Gold
9d6d31d685 GuiEvent: add JavaDoc (comments only) 2019-01-14 09:16:51 -08:00
Stephen Gold
34b32bf29b fix for issue #1003 (Loading multiple GLB files with animations fails) 2019-01-11 14:30:29 -08:00
Stephen Gold
d17376e713 PhysicsTestHelper: fix JavaDoc warnings (comments only) 2019-01-11 11:56:04 -08:00
Stephen Gold
51b12e1b9e test&fix for issue #1004 (RagdollUtils can't handle 16-bit bone indices) 2019-01-10 13:29:15 -08:00
Davis Rollman
c6158bba68 Added getter and setter for LegacyApplication's speed (#986) 2019-01-10 13:23:26 -08:00
Stephen Gold
13d00e0df3 fix for issue #972 (TestModelExportingCloning fails) 2019-01-09 09:25:17 -08:00
Stephen Gold
b9ea661391 fix for issue #993 (TestGltfLoading throws AssetNotFoundException) 2019-01-08 08:40:20 -08:00
Stephen Gold
fceee58546 fix issue #997 (cloning UpdateControl throws IllegalArgumentException) 2019-01-07 21:22:36 -08:00
Stephen Gold
000ac95fd4 fix for issue #982: add town.zip file to repo, load different HTTP image 2019-01-06 19:05:51 -08:00
Stephen Gold
e5fb5bfefe fix for issue #985: use a MaterialKey in TestAssetLinkNode 2019-01-06 18:38:32 -08:00
Stephen Gold
0e9ff83996 fix for issue #998: add ZIP file, remove "Jumps" and HttpZipLocator 2019-01-06 11:48:56 -08:00
Stephen Gold
7c6d828cb5
README.md: latest stable version is 3.2.2 2018-12-31 13:58:39 -08:00
Stephen Gold
8cd5894f55 TerrainTestTile: T key had to be pressed 2x before effect (see PR #827) 2018-12-31 10:59:06 -08:00
Stephen Gold
3c3e3f4af2 fixes for issue #994 (wildhouse.zip not found) 2018-12-31 09:56:56 -08:00
Stephen Gold
64d0e00a49 LwjglContext: correct a typo in a log message 2018-12-31 09:32:46 -08:00
Stephen Gold
bbf1f73a89 fix for issue #983 (TestMusicStreaming crashes due to missing asset) 2018-12-30 23:37:04 -08:00
Stephen Gold
2a904034c2 fix for issue #992 (HelloCollision throws an AssetLoadException) 2018-12-30 23:14:53 -08:00
Toni Helenius
55d5cd7381 Updated Nifty to 1.4.3 and cleaned up the build 2018-12-30 22:51:18 -08:00
Stephen Gold
1bb388d793 fix for issue #989 (RollingTheMonkey works with JBullet but not native) 2018-12-30 22:40:37 -08:00
Stephen Gold
44801da706 fix for issue #988 (assertion failure in jme3test.games.CubeField) 2018-12-30 22:39:28 -08:00
Paul Speed
1f02567739
Merge pull request #987 from grizeldi/patch-2
More XBOX controller remappings
2018-12-30 12:21:42 -05:00
grizeldi
a88fdf99f0
More XBOX controller remappings 2018-12-30 17:59:48 +01:00
Francivan Bezerra
467af4fff5
Fixed call to onJoyButtonEvent()
The method onJoyButtonEvent() was being called on every update(). Now it is called only when the state of a button changes (from not pressed to pressed and vice-versa).
2018-12-28 00:11:28 -02:00
Paul Speed
f73d10bb9c
Merge pull request #979 from mitm001/master
Fixed how AppSetting mergeFrom checks for key mapping.
2018-12-27 16:56:31 -05:00
mitm
416b866c78 Fixed a problem with mergeFrom() where a key that was explicitly mapped to null was taken to mean it had no mapping. Checking that the key has a mapping instead fixes problem. 2018-12-27 14:52:40 -07:00
mitm001
d785caa5ca
Merge pull request #2 from jMonkeyEngine/master
merge
2018-12-27 14:13:12 -07:00
Stephen Gold
06d9194ddf
Update .travis.yml 2018-12-22 20:01:26 -08:00
Stephen Gold
627f4726e5
README.md: latest stable version is 3.2.1 2018-12-21 22:26:41 -08:00
mitm001
8a10738097
Merge pull request #1 from jMonkeyEngine/master
merge
2018-12-21 18:33:06 -07:00
appveyor
c22fac2dce [ci skip] bullet: update windows natives 2018-12-20 17:29:32 +00:00
Stephen Gold
2d621ce24e
enable AppVeyor CI for v3.2 branch 2018-12-20 09:25:36 -08:00
Stephen Gold
b525d6c00d
correct branch name, no longer need CI for v3.1 2018-12-20 09:19:27 -08:00
Stephen Gold
017800251b Revert "test and fix issue #358 (Centered BitmapText is rendered blurry)"
This reverts commit c4e1e7f1f8b8cd5a2c18e52919f059ba97698d7e.
2018-12-16 18:01:53 -08:00
Stephen Gold
552f4a069c fix part B of issue #632 2018-12-16 13:51:02 -08:00
Stephen Gold
c2337e823e fix part A of issue #632 2018-12-16 13:44:01 -08:00
Stephen Gold
c4e1e7f1f8 test and fix issue #358 (Centered BitmapText is rendered blurry) 2018-12-15 23:49:14 -08:00
Stephen Gold
cf7725a56e fix issue #240 (TestBlenderObjectAnim fails with NPE) 2018-12-15 23:12:11 -08:00
Stephen Gold
53d7052301
test and fix for issue #970 (#973) 2018-12-14 18:26:06 -08:00
Ali-RS
a47b4a46ba Added a (hacky) fix for a Java Swing/AWT + GLFW interaction issue… (#968)
* Added a (hacky) fix for a Java Swing/AWT + GLFW interaction issue… 

… on Linux.

* Added a proper comment

* Added an extra call to System.gc() as recommendation from lwjgl’s @Spasi

"Run System.gc(), at least two times. Not sure how AWT handles native
resources, maybe there’s a finalizable/PhantomRef-ed resource that is not
released immediately, but a subsequent GC triggers a (too late) free. "
2018-12-14 09:19:25 +01:00
Stephen Gold
d8acd30a27
implement setContactResponse(boolean) for PhysicsCharacter (issue #964) (#971) 2018-12-12 08:29:08 -08:00
travis-ci
cde3c39c4f [ci skip] bullet: update linux natives 2018-12-08 08:16:06 +00:00
travis-ci
3d1dec7d77 [ci skip] bullet: update osx natives 2018-12-08 08:15:38 +00:00
appveyor
347191f6bd [ci skip] bullet: update windows natives 2018-12-08 08:13:04 +00:00
Stephen Gold
cf33c3c2dd
implement setContactResponse(boolean) for PhysicsRigidBody (issue #964) (#966)
partial
2018-12-08 00:07:44 -08:00
Paul Speed
f44fdb35e6
Merge pull request #965 from Ali-RS/Ali-RS-patch-1
Added AppStateManager.getState(class, failOnMiss)
2018-12-04 02:18:29 -05:00
Ali-RS
a61813ebd8
Added AppStateManager.getState(class, failOnMiss)
that can optionally throw an exception if the state does not exist.
2018-12-03 12:47:01 +03:30
Ali-RS
c0823bb903
Added a getState() method that will optionally fail on state misses. 2018-12-03 12:35:02 +03:30
appveyor
d36deaf8ea [ci skip] bullet: update windows natives 2018-12-02 18:11:51 +00:00
Stephen Gold
938c28fd2b
trigger AppVeyor build for additional changes 2018-12-02 10:06:59 -08:00
travis-ci
2ffebcf044 [ci skip] bullet: update linux natives 2018-12-02 03:08:00 +00:00
travis-ci
a95cf8963f [ci skip] bullet: update osx natives 2018-12-02 03:07:37 +00:00
appveyor
a66cb558c3 [ci skip] bullet: update windows natives 2018-12-02 03:06:29 +00:00
Stephen Gold
e9069a0276
PhysicsSpace.cpp: whitespace changes to trigger an AppVeyor build (#963)
* Edit gradle.properties to trigger a rebuild

* PhysicsSpace.cpp: whitespace changes to trigger an AppVeyor build
2018-12-01 19:00:00 -08:00
Stephen Gold
772af5ac60
edit gradle.properties to trigger a rebuild 2018-12-01 14:12:47 -08:00
Stephen Gold
7da493d1b1 AppVeyor: invalidate cached ZIP file if gradle.properties has changed 2018-11-30 16:12:07 -08:00
Stephen Gold
d3e7d20374 upgrade native Bullet to v2.87, which should fix issue #877 2018-11-30 16:12:07 -08:00
MeFisto94
3d63433b28
Fixes #961 - Remove unused + deprecated Exception 2018-11-27 16:30:11 +01:00
Stephen Gold
c707785a34 test and fix for JME issue #957 2018-11-23 17:10:10 -08:00
Paul Speed
53c788c031
Merge pull request #955 from stephengold/master
test and fix for JME issue #954 (null bounding volume)
2018-11-21 02:55:25 -05:00
Stephen Gold
68ea05eaa6 test and fix for JME issue #954 (null bounding volume) 2018-11-20 23:40:19 -08:00
Stephen Gold
c29a4bb1c6 fix for JME issue #887 (debug mesh ignores scaling) 2018-11-20 08:38:16 -08:00
Paul Speed
d5bfe1e813 Modified the J3M loader to be a little less like a 1980s text adventure.
Added a message to the exception thrown when using an invalid light mode.
Converted it to an IOException instead of the UnsupportedOperationException
(which is a runtime exception) so that the calling code will output a meaningful
error about which asset actually failed.
2018-11-20 03:31:00 -05:00
Paul Speed
c2fe803f53 Added a nicer toString() to DirectionalLight. 2018-11-20 03:29:20 -05:00
joliver82
2b1c3d22e8 Update android bullet native libraries 2018-11-15 10:23:04 -08:00
joliver82
f19ad06820 Update android bullet native, mk files and gradle adding header generation dependency 2018-11-15 10:23:04 -08:00
Eike Foede
07c0df7f1d OrientedBoxProbeArea copy constructor fixed 2018-11-14 08:32:05 -08:00
JESTERRRRRR
7095ad10e0 FlyByCamera rise/fall behaviour (issue #617)
Changed riseCamera to use the up vector set with 'setUpVector(Vector3f upVec)' when pressing Q and Z which should make it go up/down.
2018-10-31 17:06:03 -07:00
Stephen Gold
21454f2ab2 fix issue #923 for native Bullet 2018-10-31 17:04:14 -07:00
Rickard Edén
a8b2ad0869
Merge pull request #937 from jseinturier/jme3-vr-openvr_lwjgl
Updating OpenVR bindings
2018-10-20 11:47:32 +02:00
Stephen Gold
8f21a7eb55 test and fix for issue #931 2018-10-05 16:01:08 -07:00
jseinturier
9661d8c747 Updating OpenVR bindings
Updated OpenVR JNA binding from 1.0.9 to 1.0.16
Added OpenVR/LWJGL binding using KWJGL 3.2.0
2018-10-05 15:06:37 +02:00
JESTERRRRRR
45f7c3a230 Particle tile number/UV calculation change (#930)
* Update ParticlePointMesh.java

* Update ParticleTriMesh.java
2018-10-04 15:29:21 -07:00
travis-ci
03a5a4470a [ci skip] bullet: update linux natives 2018-10-04 21:47:32 +00:00
travis-ci
3f4d47559c [ci skip] bullet: update osx natives 2018-10-04 21:42:07 +00:00
appveyor
58eb2029c1 [ci skip] bullet: update windows natives 2018-10-04 21:40:20 +00:00
Stephen Gold
976d45a230 test and fix for issue #928: disabled native Bullet's QuickProf 2018-10-04 14:31:02 -07:00
David Berrios
95ba65c8c5 Remove JVM arguments for OSX when running examples 2018-10-04 09:07:12 -07:00
Toni Helenius
989fc0a9f0 The mouse pos should be initialized always 2018-10-03 11:21:47 -07:00
Toni Helenius
ca81975988 Get initial mouse pos on init, pass it to the InputManager 2018-10-03 11:21:47 -07:00
Toni Helenius
87023eb3f7 Set as finals 2018-10-03 11:21:47 -07:00
Nebloksiam
e8cb3124f2 Load animated cursor NPE
Potential NPE when loading animated cursors (.ani)
2018-10-02 22:15:19 -07:00
Stephen Gold
02ec12e454 fix for issue #917 2018-10-02 08:57:16 -07:00
travis-ci
c1c08f3a74 [ci skip] bullet: update linux natives 2018-09-30 20:06:58 +00:00
travis-ci
d096f1be20 [ci skip] bullet: update osx natives 2018-09-30 20:06:37 +00:00
appveyor
a492b746c2 [ci skip] bullet: update windows natives 2018-09-30 20:03:46 +00:00
Stephen Gold
8f26a3cc3f tests and fixes for issues #918 and #919 2018-09-30 12:58:45 -07:00
Stephen Gold
697b4a675e resolve issue #916 2018-09-29 11:35:32 -07:00
Stephen Gold
b2be9ce3f2
issue #915: use "precise" environment only for openjdk7 build 2018-09-28 13:26:34 -07:00
Stephen Gold
ac088e4554
issue #915: revert Travis Linux build environment
from "precise" to "trusty"
2018-09-28 11:49:04 -07:00
travis-ci
a31ee80798 [ci skip] bullet: update osx natives 2018-09-28 16:17:33 +00:00
appveyor
b764f1346c [ci skip] bullet: update windows natives 2018-09-28 16:15:02 +00:00
Stephen Gold
618337a81d fix for issue #913 2018-09-28 09:08:56 -07:00
travis-ci
499714507b [ci skip] bullet: update osx natives 2018-09-27 02:59:36 +00:00
appveyor
0fde1b86f8 [ci skip] bullet: update windows natives 2018-09-27 02:57:13 +00:00
Stephen Gold
dc4189afc3 test case and fix for issue #911 2018-09-26 19:50:26 -07:00
Stephen Gold
ce871712a8 fix for issue #908 2018-09-26 14:31:22 -07:00
Stephen Gold
f16974fcb6 jme3-bullet: add and improve comments, mostly JavaDoc 2018-09-25 13:21:12 -07:00
Stephen Gold
84a103fbe4
fix for issue #740 (#906) 2018-09-23 19:19:36 -07:00
Stephen Gold
1c5c5e85c0
Merge pull request #905 from stephengold/master
jme3-bullet: add and improve comments, mostly JavaDoc
2018-09-18 13:38:43 -07:00
Stephen Gold
6e96ee5bf2 jme3-bullet: add and improve comments, mostly JavaDoc 2018-09-17 17:31:19 -07:00
Stephen Gold
025b27c96d test cases and fix for issue #880 2018-09-13 20:48:24 -07:00
Stephen Gold
4323c4101a fix for issue #897 2018-09-12 17:18:53 -07:00
Stephen Gold
e80302728f fix for issue #898 2018-09-11 16:26:42 -07:00
Stephen Gold
0b782b9fb4 fix for issue #886 2018-09-10 14:55:18 -07:00
Stephen Gold
10eef65e73 test case and fix for issue #894 2018-09-09 11:46:49 -07:00
Stephen Gold
a4ca3cbd40 test case and fix for issue #883 2018-09-09 07:46:29 -07:00
Stephen Gold
a28d5ccd16 test case and fix for issue #889 2018-09-07 10:57:39 -07:00
Riccardo Balbo
f12d7e4e60 Fix AudioNode issues when using velocityFromTranslation and small refactoring (#875)
* Fix AudioNode issues when using velocityFromTranslation and small refactoring

* Fix audionode fix
2018-09-06 12:42:49 -07:00
travis-ci
9c949891b0 [ci skip] bullet: update osx natives 2018-09-06 16:32:13 +00:00
appveyor
34126f25e4 [ci skip] bullet: update windows natives 2018-09-06 16:28:41 +00:00
Stephen Gold
570e4850ea rm auto-generated C++ headers from repo, rm unzipped files during clean 2018-09-06 09:23:54 -07:00
Stephen Gold
694232e269 use Gradle v4.10, android tools v3.1.4, bintray plugin v1.8.4 2018-09-04 10:05:16 -07:00
Stephen Gold
40f6a7cc7a avoid JDK10 so Travis CI can succeed 2018-09-01 11:03:19 -07:00
Stephen Gold
ac182e38d5 add a test for JME issue #877 2018-08-30 15:23:07 -07:00
Riccardo Balbo
087197aff4 Fix bullet skipping enqueued tasks - #867 2018-08-25 18:57:46 -07:00
Stephen Gold
2d6aa15526 correct a typographical error in JavaDoc 2018-08-22 17:02:29 -07:00
Toni Helenius
bbcb8c5701 Feature 871 (#873)
* Update LWJGL to 3.1.6

* Change LinkedLists to ArrayDeques

* Call glfwTerminate & set NULL error callback on destroy

fixes crash when context is re-created
2018-07-17 11:42:26 +02:00
Kirill Vainer
d57c362ec3 build javadoc by default 2018-05-21 21:43:28 -04:00
Nehon
6b2af9917b Fixes post shadows compilation issue on android 2018-05-18 23:55:36 +02:00
TehLeo
c72b73ee8b Added Texture Formats R16F, R32F, RG16F, RG32F. (#839) 2018-05-18 08:37:59 +02:00
joliver82
c49a0dc54d Update GLImageFormats.java 2018-05-18 08:35:05 +02:00
Rémy Bouquet
266d8b0828 Implements SSBO (Shader Storage Buffer Object) and UBO (Uniform Buffer Object) support 2018-05-18 08:30:07 +02:00
Nehon
302e746a94 Uses a HashSet for variable names in ShaderNodeLoaderDelegate instead of a String 2018-05-01 09:15:39 +02:00
oualid
c0cdf75603 replace addState() with attach() in the javadoc 2018-04-26 21:19:14 +02:00
b00nation
0d5f18c3a8 Update MaterialDebugAppState.java
I was debugging my application to dig down the issue why the shaders are recognized of change but not actually reloaded. I came to this solution.
2018-04-25 14:36:51 +02:00
theMinka
dd561a0c5b Reworked the TestBlendEquations example (#848) 2018-04-25 14:34:58 +02:00
theMinka
cd7c60cc59 Fixes handling of blend equations and factors in GLRenderer (#848)
* Stronger separation of BlendMode.Custom from the other blend modes
* Custom blend equations and factors now only gets used on BlendMode.Custom
* Updated some JavaDocs in RenderState class
2018-04-25 14:34:58 +02:00
Christopher
2f683c10bc Updated deprecation documentation 2018-04-25 14:27:50 +02:00
Nehon
db48b98a2e Fixes an issue where light probes were used in phong lighting 2018-04-22 10:29:55 +02:00
Nehon
36c1ce713f Moved the render probe function in PBR.glsllib 2018-04-19 08:37:28 +02:00
Nehon
3aeb7350ae Fixes an issue with animation speed being wrongly applied 2018-04-19 08:00:53 +02:00
grizeldi
ce79df9370 Fix a typo which made pbr shader fail to compile 2018-04-18 16:53:33 +02:00
Nehon
0cc97f5653 Deletes obsolete TestPBREnv test 2018-04-17 15:50:57 +02:00
Nehon
83aef82d92 Adds support for light porbe blending and Oriented box light probes with corrected parallax 2018-04-17 15:23:56 +02:00
Nehon
824e99c96e Fixes attachement node when model ignore transforms 2018-04-02 09:36:29 +02:00
Nehon
9df4449f49 Adds animation mask to the animation system 2018-04-02 09:08:29 +02:00
Stephen Gold
06f8a00549 fix JME issue #742 (attachment nodes for ignoreTransform geometries) 2018-03-30 18:54:59 -07:00
Nehon
a463f5515a Negative speed now plays an animation backwards 2018-03-26 06:29:53 +02:00
Paul Speed
7ded33051c Modified AnimComposer.setCurrentAction() to return the Action. Makes it easier
to set the speed and stuff.
2018-03-25 15:13:24 -04:00
Nehon
6b864f2d72 Remobes unused imports 2018-03-24 21:02:52 +01:00
Nehon
f7ccdf486b Removes the default value for NumberOfTargetsBuffers 2018-03-24 21:02:52 +01:00
Nehon
8f4941f529 Some clean up in PBR j3MD 2018-03-24 21:02:52 +01:00
Nehon
daba9b8bc7 Proper serialisation for morph animation 2018-03-24 21:02:52 +01:00
Nehon
4048f8ba26 Adds a cpu fallback for morph animation when all morph targets cannot be handled on the gpu 2018-03-24 21:02:52 +01:00
Rémy Bouquet
42215f4890 Hardware Morph animation implementation and glTF loading 2018-03-24 21:02:52 +01:00
Rémy Bouquet
d9a8666742 Fixes link to original paper in shadow renderer 2018-03-24 21:02:52 +01:00
Rémy Bouquet
829354d990 Better armature debugger 2018-03-24 21:02:52 +01:00
Nehon
072bdbb6be Enhanced hardware skinning test 2018-03-24 21:02:52 +01:00
Nehon
2e323eb7cf fixes some isues with the gltfLoader when there are several skins 2018-03-24 21:02:52 +01:00
Rémy Bouquet
8634509a95 Speed support and some clean up 2018-03-24 21:02:52 +01:00
Rémy Bouquet
79549424f3 Better blending structure 2018-03-24 21:02:52 +01:00
Rémy Bouquet
2fc3bf5cfd Added a BlendAction that allows to blend animations 2018-03-24 21:02:52 +01:00
Rémy Bouquet
05e907acca Added the base of the blending system. Smooth transition between anims 2018-03-24 21:02:52 +01:00
Nehon
c769611f9f Better performance 2018-03-24 21:02:52 +01:00
Nehon
d6b05553b5 Ogre loader now loads animations and armature with the new system 2018-03-24 21:02:52 +01:00
Nehon
02a1fd544a Better armature joint selection 2018-03-24 21:02:52 +01:00
Nehon
a32c34939a Display origin of the Armature debugger 2018-03-24 21:02:52 +01:00
Nehon
886f8da2f7 Further Armature debugger enhancements 2018-03-24 21:02:52 +01:00
Nehon
054d54f4b9 Added a way to toggle on/off the non deforming bones in the Armature debugger 2018-03-24 21:02:52 +01:00
Nehon
abe094e74a Gltf loader now supports the new animation system 2018-03-24 21:02:52 +01:00
Nehon
bbb3cf59b3 New anim system proper serialization 2018-03-24 21:02:52 +01:00
Nehon
728e28857b Adds a MigrationUtil to migrate from old system to new system 2018-03-24 21:02:52 +01:00
Nehon
e5057ad7fa Adds support for different joint model transform accumulation strategy 2018-03-24 21:02:52 +01:00
Nehon
ce170b8b53 better Armature debugger 2018-03-24 21:02:52 +01:00
Nehon
b5ad72b0e9 Joint now uses a matrix for transform accumulation 2018-03-24 21:02:52 +01:00
Nehon
c3cb4ef97f Draft of the new animation system 2018-03-24 21:02:52 +01:00
Nehon
4904d0235e Adds an ArmatureDebugger 2018-03-24 21:02:52 +01:00
Nehon
75f90fb70c New Armature system 2018-03-24 21:02:52 +01:00
Nehon
c2b6e8f407 Allows build of 3.2 branch 2018-03-24 21:02:52 +01:00
Paul Speed
5e06457416 Merge branch 'master' of https://github.com/jMonkeyEngine/jmonkeyengine 2018-03-24 14:45:33 -04:00
Paul Speed
0fb5eeddd7 Fixed an NPE in getNumElements() if the data field was null. 2018-03-24 14:45:11 -04:00
Paul Speed
0a6e8741cf Added ColorRGBA.fromIntABGR() as reciprocal to asIntABGR(). 2018-03-24 14:44:15 -04:00
Stephen Gold
531ff4edb1 correct 2 more typographical errors in comments 2018-03-17 20:09:04 -07:00
Paul Speed
81667f8f45 Fixed the DepthOfFieldFilter to properly get the near/far distance from JME
instead of having it hard-coded.  Previous behavior caused focus to go all out
of whack if you ever changed the near/far plane (and even the default hard-coded
value was not the same as JME's default camera setup.)
While I was here, I made the unfocus threshold configurable and added a debug
toggle that will turn the 'unfocus' amount into grayscale color for better visualizing
where unfocusing is happening.
2018-03-17 02:18:31 -04:00
Nehon
b62fbdbf84 Fixes node version of unshaded material 2018-03-12 23:13:59 +01:00
Nehon
514e809326 Better handling of default values for shader nodes input 2018-03-12 23:01:56 +01:00
Nehon
3ab8466075 Cleans up to reduce the size of test data 2018-03-12 23:01:09 +01:00
Nehon
88a1edd37d Refactors how pbr lighting methods work for easier switchng between PBR workflows 2018-03-12 08:11:07 +01:00
Nehon
47406058a6 Fixes condition parsing for shader nodes 2018-03-12 08:11:07 +01:00
Stephen Gold
f5e11d23b2 follow JME's conventional approach to cloning a SpatialTrack 2018-03-10 23:26:27 -08:00
Stephen Gold
3f473d1205 implement JmeCloneable to simplify BoneTrack cloning, set a good example 2018-03-10 23:26:27 -08:00
Stephen Gold
fc07b541b8 implement the JmeCloneable interface for CompactArray 2018-03-10 23:26:27 -08:00
empirephoenix
d300f74f26
Merge pull request #834 from pdid17/plane-constructor
Add a convenience constructor to Plane
2018-03-08 15:00:32 +01:00
oualid
edc81a8d3e added class with material's constants. 2018-03-05 18:43:03 +01:00
pdid17
9dd46c9232 Add a convenicence constructor to Plane 2018-02-28 17:15:54 -05:00
Stephen Gold
0014ede4d7 make TerrainTestCollision more user-friendly 2018-02-26 10:31:16 -08:00
javasabr
555a348692 refactored and upgraed lwjgl3 module. 2018-02-26 10:35:25 +01:00
javasabr
28353cf747 refactored core interfaces. 2018-02-26 10:35:25 +01:00
Stephen Gold
f40ba25a56 correct more grammar/spelling errors in comments 2018-02-23 22:20:22 -08:00
Paul Speed
989a4a2420 Added a bitmap font layout test. 2018-02-20 02:17:26 -05:00
Stephen Gold
15285cc302 eliminate uses/overrides, deprecate implementations of cloneForSpatial() 2018-02-19 13:47:47 -08:00
Stephen Gold
cf7912720d deprecate Control.cloneForSpatial() 2018-02-19 11:42:58 -08:00
Stephen Gold
826908b042 correct more grammar/spelling errors in comments 2018-02-18 20:49:43 -08:00
Nehon
b0371badaf Bumps main version to 3.3 2018-02-18 16:54:16 +01:00
Stephen Gold
36847602a5 correct more typographical errors in comments 2018-02-17 19:03:49 -08:00
Stephen Gold
ce871d83b0 address issue #825: SpatialTrack.clone() sets the trackSpatial to null 2018-02-13 19:22:48 -08:00
Stephen Gold
72a097682e correct spelling errors in comments 2018-02-06 18:24:44 -08:00
Alexandr Brui
a8c7a85fc1 Implementing value mappings for shader nodes. (#786)
* implemented value mappings for shader nodes.
2018-02-06 19:36:14 +01:00
Ali-RS
7e66911901 Fix an issue with Skeleton deserializing
Fix issue #371
2018-02-06 19:34:42 +01:00
Stephen Gold
72698d7082 address issue #816: BoneTrack.setKeyframes() throws NPE in assertions 2018-02-06 19:31:01 +01:00
Alexandr Brui
ec9bb24807 fixed 2 parameters of shadow renderer. (#819) 2018-02-06 18:30:30 +01:00
Stephen Gold
bc624f1f73 correct more typographical errors in comments 2018-02-01 23:39:31 -08:00
Stephen Gold
c87af1c2aa correct more typographical errors in comments 2018-02-01 19:16:05 -08:00
Stephen Gold
32e3cb658f correct typographical errors in comments 2018-02-01 18:16:32 -08:00
Stephen Gold
bc1af00a32 correct typographic errors in comments 2018-02-01 12:23:34 -08:00
Nehon
9dadc29986 Properly cleanup the DetailedProfilerState when it's detached 2018-01-31 08:15:46 +01:00
Stephen Gold
7ed644f442 add getters to shadow renderers/filters for number of maps and sizes 2018-01-29 00:17:57 -08:00
Yan
1b2c84da2e [taken]Fix issue #764
Fix infinity loop in EmitterSphereShape. issue #764

I test on both method:

    public void getRandomPoint1(Vector3f store) {
        float l = FastMath.pow(FastMath.nextRandomFloat(), 1f / 3f);
        float u = FastMath.nextRandomFloat() * 2f - 1f;
        float o = FastMath.nextRandomFloat() * FastMath.TWO_PI;

        store.z = l * u;
        u = 1f / FastMath.fastInvSqrt(1f - u * u);
        store.x = l * u * FastMath.cos(o);
        store.y = l * u * FastMath.sin(o);
        store.multLocal(radius);
        store.addLocal(center);
    }

    public void getRandomPoint2(Vector3f store) {
        do {
            store.x = (FastMath.nextRandomFloat() * 2f - 1f);
            store.y = (FastMath.nextRandomFloat() * 2f - 1f);
            store.z = (FastMath.nextRandomFloat() * 2f - 1f);
        } while (store.lengthSquared() > 1);
        store.multLocal(radius);
        store.addLocal(center);
    }
    // Test
    public void testGetRandomPoint() {
        int n = 1000000;
        long start = System.nanoTime();
        for (int i = 0; i < n; i++) {
            getRandomPoint1(store);
        }
        long time1 = System.nanoTime() - start;

        start = System.nanoTime();
        for (int i = 0; i < n; i++) {
            getRandomPoint2(store);
        }
        long time2 = System.nanoTime() - start;

        System.out.println("t1:" + time1);
        System.out.println("t2:" + time2);
        System.out.println("t1/t2:" + (float) time1 / time2);
    }

Result:

    t1:352272158
    t2:94436324
    t1/t2:3.7302613

Method2 seems nearly 4 times faster than method1.
2018-01-21 09:37:49 +01:00
Yan
1f4365a1f4 [taken]Fix issue #783
Fix issue #783
2018-01-21 09:37:49 +01:00
Stephen Gold
9675d52745 resolve deprecation warnings in jme3-niftygui 2018-01-18 14:46:09 +01:00
mitm001
d61dbf1349 Added link to the wiki readme. 2018-01-18 14:45:06 +01:00
Stephen Gold
b159c847cc comment corrections: mostly spelling and grammar 2018-01-16 18:35:07 -08:00
Stephen Gold
d8fb815fa9 Merge remote-tracking branch 'refs/remotes/origin/master' 2018-01-16 18:21:02 -08:00
Stephen Gold
d17049e8ac comment corrections in jme3-vr: mostly spelling and grammar 2018-01-16 18:05:34 -08:00
Stephen Gold
21425f81ef more comment corrections in jme3-core: mostly spelling and grammar 2018-01-16 18:03:05 -08:00
demoth
3594a87134 Fix #694 Reduce the logging level for OpenCLObjectManager 2018-01-16 08:20:32 +01:00
MeFisto94
7bcd11e921 Fix Shadow Filters not having a default constructor and hence not being deserializable. 2018-01-16 08:19:39 +01:00
Domenic Cassisi
f61267e803 Adds missing key code for Print Screen (#682) (#806)
* Adds missing key code for Print Screen and update javadoc (#682)
2018-01-16 08:17:57 +01:00
Stephen Gold
74d70c4ee0 comment corrections in jme3-core: mostly spelling and grammar 2018-01-15 22:01:33 -08:00
ThoCed
4f6bfa36b6 Ogre importer ignores receive_shadows issue #647 2018-01-15 20:06:45 +01:00
mitm001
4d67cfedf5 Updated version. 2018-01-15 20:03:11 +01:00
Stephen Gold
26ae3ec806 initialize InputManager.cursorPos to fix issue #792 for LWJGL2 2018-01-14 17:19:20 +01:00
Ali-RS
75aa147eec Fix javadoc for Quaternion.toAngles() method (#802)
* Fix javadoc for Quaternion toAngles and fromAngles

JME treats Z as the main direction or look direction so x is pitch, y is yaw, and z is roll,
2018-01-14 17:18:26 +01:00
Domenic
c4b635bb6f Fixed typo in assert described in issue #538 2018-01-13 20:01:29 +01:00
empirephoenix
76028201bf
Merge pull request #799 from jmecn/master
Fix typo in logger of WeakRefCloneAssetCache
2018-01-12 11:12:22 +01:00
Yan
319656a056
Fix typo in logger
Fix typo in logger.
Change "WeakRefAssetCache" to "WeakRefCloneAssetCache"
2018-01-12 13:12:11 +08:00
Yan
189c8a5a6f
Merge pull request #2 from jMonkeyEngine/master
update fork from jMonkeyEngine to jmecn
2018-01-12 13:08:17 +08:00
Stephen Gold
a3cce29b69 correct javadoc typo in AppSettings.java 2018-01-09 09:37:58 -08:00
Nehon
96b95b9a1e Fixes issues in the gltf loader when there are several skins 2018-01-07 15:34:01 +01:00
Nehon
12004217d1 Ao map now only attenuates indirect lighting in PBR shader 2018-01-04 16:53:48 +01:00
Rémy Bouquet
a6b86ad24d Fixes Lightmap handling in PBR shader 2018-01-01 14:12:00 +01:00
Stephen Gold
950721f926 Uniform.java: avoid ClassCastException when overriding Vector4 params 2017-12-27 20:51:40 +01:00
Stephen Gold
edba4b9844 test override of ColorRGBA mat param with a Vector4f or Quaternion value 2017-12-27 20:51:40 +01:00
Nehon
0d8b86b66f Add default config for glb loader 2017-12-24 22:16:18 +01:00
MeFisto94
11a647a3d4 Blender TextureHelper: Make use of ImageLoader's new loadTexture capability 2017-12-20 23:28:17 +01:00
MeFisto94
3cd96b2053 Blender ImageLoader: Support Loading of HDR Files and many other 2017-12-20 23:28:17 +01:00
Nehon
fc8135412f Fixes normal lighting in world space for PBR 2017-12-18 17:43:57 +01:00
Nehon
435f2d4d05 Prevents NaN time when animation length is 0 (case of a pose) 2017-12-17 18:46:46 +01:00
Stephen Gold
247d5d9324 package protect the MovingAverage class instead of deprecating it 2017-12-17 15:17:10 +01:00
Stephen Gold
f27f568556 remove deprecated shadow renderers from 3 physics tests 2017-12-17 15:17:10 +01:00
Stephen Gold
99f4f20c75 remove deprecated BasicShadowRenderer from TestFancyCar 2017-12-17 15:17:10 +01:00
Stephen Gold
990791b21c remove setFlushQueues(), which is deprecated and has no effect 2017-12-17 15:17:10 +01:00
Stephen Gold
d3f0c2002a in examples, replace deprecated methods and classes 2017-12-17 15:17:10 +01:00
Stephen Gold
e536699d9e remove 3 examples whose purpose was to test deprecated classes 2017-12-17 15:17:10 +01:00
Nehon
8a8d381c0e glTF: Fixes models orientations issues 2017-12-10 22:50:05 +01:00
Nehon
a741dc66f4 glTF: fixed crashes with some models structure 2017-12-10 20:12:50 +01:00
Nehon
1b2cc6a63b SkeletonControl now falls back to software skinning when there are more than 255 bones instead of crashing when the shader compiles. 2017-12-10 19:56:32 +01:00
Nehon
a59b9e6a94 glTF: Skip tracks that belong to a different skin 2017-12-10 10:42:24 +01:00
Nehon
5dbbaf0f06 glTF: Fixes additional issues with bones transforms 2017-12-09 16:35:37 +01:00
Toni Helenius
09f4ae4832 Animated cursor support for LWJGL 3 (#785)
* Simple animated cursor support

* Use primitive array and diamond constructor
2017-12-08 08:26:50 +01:00
Nehon
cfaaec5418 glTF: Fixes a crash when attached nodes contains skinned meshes 2017-12-07 19:01:44 +01:00
Nehon
806663990d glTF: fix animation defautl pose when no track is specified 2017-12-07 18:27:18 +01:00
Nehon
c971a4758f Fixes animation time sampling when source data contains duplicate keyframes 2017-12-06 20:35:13 +01:00
Nehon
f47f865d1d glTF: Fixed when a sub graph is ttached to a bone. Fixed a crash with animation resampling 2017-12-03 16:26:05 +01:00
Remy Van Doosselaer
683bf632f6 add an empty constructor to Grid mesh (#747)
* add an empty constructor with logical values for serialization purposes. eg. the BinaryImporter has issues instantiating the Grid mesh.

* empty constructor for serialization purposes
2017-12-02 13:29:10 +01:00
Stephen Gold
e0230a4b12 roll back PR 746 (worldTransform to identity) in master branch 2017-12-02 09:04:06 +01:00
Nehon
5c9ef17e73 Fixes ReflectionAllocator for android 2017-12-01 08:41:59 +01:00
David Bernard
676251b4d5 nifty-gui: upgrade from 1.4.1 to 1.4.2, available on maven central with the new “official” groupId: com.github.nifty-gui 2017-11-29 20:07:26 +01:00
Julien Seinturier
58a9211879 OpenVR 1.0.9 and Occulus Support (#779)
* Updated OpenVR implementation to 1.0.9

User can specify external OpenVR library to load with
openvr.library.path system property.
Usage: java -Dopenvr.library.name=my_path_to_library MyApp

Removed reference to OCCULUS VR and OpenVR from VRAppstate as this class
is generic and does not have to be linked to specific implementation.

VRMouseManager can be buggous using OSVR or Occulus VR. 

Refactored VR implementation packages in order to separate all available
implementation. Modifying or adding implementation should no more impact
other ones. 

Renamed some classes in order to be uniform
2017-11-29 17:14:04 +01:00
Nehon
96836de6e8 Prevents attachement nodes to have the NumBone parameter set 2017-11-28 08:48:09 +01:00
Kirill Vainer
9c0b977154 upgrade to gradle 4.1 2017-11-28 08:29:55 +01:00
Kirill Vainer
93001ec290 Fix #456 2017-11-28 08:26:41 +01:00
javasabr
06599d1eac fixed the constructor. 2017-11-28 08:25:41 +01:00
javasabr
69b7f7e655 fixed some changes. 2017-11-28 08:25:41 +01:00
javasabr
bc1584d239 made the method as public. 2017-11-28 08:25:41 +01:00
javasabr
15fd80d67f Some improvements with terrain LOD control:
1. Added the new option to use camera from render view port(default false)
2. Removed unnecessary synchronize blocks
3. Replaced each control own executor to global terrain executor
4. Removed unused things
5. Reduced memory allocations
6. Fixed the issue with cloning.
2017-11-28 08:25:41 +01:00
javasabr
6e07a214c6 Added a lit bit improvements for SafeArrayList:
1. improved comparing a SafeArrayList with another SafeArrayList.
2. improved the constructor by other collection
3. added a new constructor with init capacity.
2017-11-28 08:25:41 +01:00
javasabr
43b52cb77c Fixed finding definitions during material loading. 2017-11-27 11:37:37 +01:00
javasabr
a717a5e50f fixed NPE during loading shader node material without vertex nodes. 2017-11-27 08:42:34 +01:00
MeFisto94
9100cff4aa BlenderImporter: Don't silently fail when a packed file couldn't be loaded but use a Placeholder Texture 2017-11-27 08:27:57 +01:00
MeFisto94
1b76160410 Blender Importer: Don't crash when a packed texture couldn't be loaded 2017-11-27 08:27:57 +01:00
NemesisMate
5d729af1c4 Fixed a IndexOutOfBoundsException when residual weights are present 2017-11-27 08:23:13 +01:00
NemesisMate
893741701b Fixed #642
It was overriding the userDefinedUVCoords each time any one of them was used, so if different textures were depending on it, a new texCoord buffer was being created.
2017-11-27 08:22:30 +01:00
NemesisMate
a9cf6a348f Fix #646
Ignoring the alpha influencer (mapping) if the color one was found first.
2017-11-27 08:21:47 +01:00
NemesisMate
ab8ddd5ab5 Added missing var declaration. 2017-11-27 08:20:45 +01:00
NemesisMate
7aafb514bf Fixed #652
The issue was due to the texture blending with the object material. By default the material is gray (hence, a gray border). If the material color in blender is set to another color this is being the artifact's color. It can bee seen where the alpha in the texture isn't totally 0 or 1.
The current implementation weren't taking in account the material transparency when blending, so the fix is basically to use it just like blender does:
2017-11-27 08:20:45 +01:00
javasabr
24e467a871 fixed the problem with the reference to light, when we had incorrect reference to the light after loading/cloning spatial of this control. 2017-11-26 15:28:17 +01:00
javasabr
8674d8af4b fixed detecting varyings during loading shader nodes in the case, when we have several output parameters with the same name but with different name spaces. 2017-11-26 13:20:00 +01:00
Rickard Edén
74f2f703b3 Several changes to load cinematics
Cinematic:
	* Reattach CameraNode to scene
	* Set CameraNode's camera to be app's camera
AnimationEvent:
	* Save modelName
	* Use modelName and try to replace scene's model in initEvent
2017-11-26 13:19:33 +01:00
Rickard Edén
ae97614c83 Trying to make Cinematic serialization work.
This way at least it doesn't crash: Removed anonymous inner class and made new class; CameraEvent
Added a bunch of default constructors for other related classes in the process.
2017-11-26 13:19:33 +01:00
Nehon
2120c9d334 Attempt to fix a direct memory deallocation crash on android 2017-11-26 10:35:33 +01:00
Nehon
87cfae6d7b Fixed InstancedGeometry shadow mode 2017-11-25 15:03:00 +01:00
empirephoenix
ede080ad71
Merge pull request #773 from stephengold/master
fix for issue #772: populate bullet debug mesh using unscaled shape
2017-11-23 08:50:16 +01:00
Stephen Gold
00ce009925 fix for issue #772: populate bullet debug mesh using unscaled shape 2017-11-22 22:46:31 -08:00
javasabr
9578b0410e extended some things from shader node system. 2017-11-12 19:01:24 +01:00
javasabr
839ffdd4f2 fixed the problem with saving/loading light probes. 2017-11-07 18:56:40 +01:00
Stephen Gold
47a46a8250
Merge pull request #763 from stephengold/master
fix issue #762 (WireSphere generates parallels with wrong radii)
2017-11-07 09:50:00 -08:00
Nehon
e4b6bf82a2 Better PBR env map generation 2017-11-05 23:52:22 +01:00
Stephen Gold
3328f2a3a7 fix issue #762 (WireSphere generates parallels with wrong radii) 2017-11-04 16:54:50 -07:00
Nehon
171007693b De duplicate imports when generating a shader from shader nodes 2017-10-28 18:16:17 +02:00
Rickard Edén
eb6ce4d4b4 Merge pull request #755 from ZNixian/master
Prevent double-updating the main scene in VR
2017-10-19 08:11:50 +02:00
Rickard Edén
29726ccb88 Merge pull request #757 from neph1/osvr_viewmanager
reverting orientation changes.
2017-10-15 11:59:00 +02:00
Rickard Edén
7c00561a3c reverting orientation changes. 2017-10-15 11:55:45 +02:00
Rickard Edén
e4ce70d0ba Merge pull request #756 from neph1/osvr_viewmanager
making VRViewManagerOSVR more similar to VRViewManagerOpenVR
2017-10-15 11:24:47 +02:00
Rickard Edén
30de635cdf Changing back orientation quat modification 2017-10-15 11:14:09 +02:00
Rickard Edén
ffed048472 making VRViewManagerOSVR more similar to VRViewManagerOpenVR 2017-10-15 10:22:24 +02:00
Campbell Suter
5273045ddf
Prevent double-updating the main scene in VR 2017-10-14 10:01:42 +13:00
javasabr
ec121f025f simplified version. 2017-10-13 08:08:55 +02:00
javasabr
b9e3788ffa fixed NPE when you try to remove an unused asset loader. 2017-10-13 08:08:55 +02:00
Rickard Edén
22bf08d9e7 Merge pull request #753 from neph1/master
added functionality to use front mounted vive camera. 2nd try. Camera is still unstable and can break down between runs. Solution is to restart SteamVR.
2017-10-10 08:40:54 +02:00
Rickard Edén
c460593000 Merge pull request #752 from ZNixian/master
Add Oculus Rift support
2017-10-10 07:47:40 +02:00
Rickard Edén
a65b0ba3af added functionality to use front mounted vive camera. 2nd try 2017-10-09 09:48:17 +02:00
Rickard Edén
2c044a29c5 Revert "added functionality to use front mounted vive camera"
This reverts commit ae7a134f1e8763bf25ecaf894ef3f2136288feda.
2017-10-09 09:26:16 +02:00
Rickard Edén
ae7a134f1e added functionality to use front mounted vive camera 2017-10-09 09:13:40 +02:00
Nehon
54061124a9 glTF: Fixed animation data interpolation, also renamed AnimData to TrackData to match JME paradigm. 2017-10-08 20:50:59 +02:00
Campbell Suter
42fd964a22
Un-break VR mouse support for OpenVR 2017-10-07 22:36:32 +13:00
Campbell Suter
63dd46b8a3
Switch OculusVR to logger (from system.println), commenting spree 2017-10-07 22:27:16 +13:00
Campbell Suter
0b37e56bd0
Add recentering support for Oculus Rift, improve associated Javadoc 2017-10-07 21:41:31 +13:00
Campbell Suter
2464dcd17a
Add OculusVRInput 2017-10-07 21:41:31 +13:00
Campbell Suter
c26316d81c
Add Oculus Touch mappings to VRInputType 2017-10-07 21:41:30 +13:00
Campbell Suter
fcccdd75a5
Don't create unnecessary FrameBuffer for OculusVR view manager 2017-10-07 21:41:30 +13:00
Campbell Suter
7b30f69c2a
Fix mirror window displaying blank for Oculus Rift 2017-10-07 21:41:29 +13:00
Campbell Suter
9747c556ff
OculusVR: Use correct coordinate space conversions, looking around now works 2017-10-07 21:41:29 +13:00
Campbell Suter
760277f61d
Make OculusVR.getHMDVectorPoseLeftEye return the HMD relative, not world relative, eye positions. 2017-10-07 21:41:29 +13:00
Campbell Suter
d7fc716065
Oculus: Initialize GUI to prevent startup crashes 2017-10-07 21:41:28 +13:00
Campbell Suter
b6b1687450
OculusVR: Fix eye-texture sizing issue, producing correct FOV 2017-10-07 21:41:28 +13:00
Campbell Suter
da52de7f7f
OculusVR: Get basic projections working (mostly), however, VR cameras still don't work properly 2017-10-07 21:41:27 +13:00
Campbell Suter
b1baa26ea1
Use two smaller textures for OculusVR, rather than a single large one 2017-10-07 21:41:27 +13:00
Campbell Suter
5df7f80c04
Clean up Oculus View Manager update() method 2017-10-07 21:41:27 +13:00
Campbell Suter
563c3eabff
OculusVR: Implement getType and rename eyePoses to hmdRelativeEyePoses 2017-10-07 21:41:26 +13:00
Campbell Suter
3082e63cfd
OculusVR: Implement further tracking methods 2017-10-07 21:41:26 +13:00
Campbell Suter
601ba1cfda
OculusVR: Add basic camera positioning 2017-10-07 21:41:25 +13:00
Campbell Suter
8a3336704a
Move rendering setup from Oculus VRViewManager to OculusVR, and implement cleanup 2017-10-07 21:41:25 +13:00
Campbell Suter
1c975918b1
OculusVR: Call GetPredictedDisplayTime to satasfy SubmitFrame 2017-10-07 21:41:25 +13:00
Campbell Suter
f0b4c13515
Use real, not stub, values in VRViewManagerOculus 2017-10-07 21:41:24 +13:00
Campbell Suter
0844c9da04
Add getters to OculusVR input 2017-10-07 21:41:24 +13:00
Campbell Suter
3ac7888dc0
Add initialization logic to OculusVR input 2017-10-07 21:41:24 +13:00
Campbell Suter
7313abf58d
Setup infrastructure for using LibOVR 2017-10-07 21:41:23 +13:00
Campbell Suter
cf28e81480
Add initial VRViewManagerOculus 2017-10-07 21:41:23 +13:00
Campbell Suter
d96bf2c13e
Add skeleton OculusVR input 2017-10-07 21:41:22 +13:00
Campbell Suter
5fd5939807
Add LWJGL-LibOVR gradle dependency 2017-10-07 21:41:22 +13:00
Campbell Suter
4ce05dd0ca
Add pre-render method to VRViewManager in preparation for adding Oculus
Rift support. See
https://hub.jmonkeyengine.org/t/libovr-oculus-rift-support/39427
2017-10-07 21:41:22 +13:00
Rémy Bouquet
132b0abc50 glTF Properly ignore morph animation until they are supported 2017-10-07 10:27:03 +02:00
Alexandr Brui
556e3de1c0 fixed asset linked node to reuse shared data between loaded models. (#739)
* fixed asset linked node to reuse shared data between loaded models.
* updated implementation of binary loader.
2017-10-01 20:48:38 -04:00
Stephen Gold
94e828f92e Merge pull request #750 from stephengold/master
fix issue #749: NPE in CollideIgnoreTransformTest
2017-10-01 00:22:37 -07:00
Stephen Gold
2632c3227c fix issue #749: NPE in CollideIgnoreTransformTest 2017-10-01 00:12:43 -07:00
Nehon
db23985f92 glTf: proper animation data padding when transforms are given as sparse arrays 2017-09-30 15:34:53 +02:00
Stephen Gold
082fea969e Merge pull request #748 from stephengold/master
FlyByCamera: comments, annotations, & imports; address GitHub issue #697
2017-09-27 23:24:46 -07:00
Stephen Gold
083f21d6a2 FlyByCamera: comments, annotations, & imports; address GitHub issue #697 2017-09-27 21:26:59 -07:00
Stephen Gold
0137670487 Merge pull request #746 from stephengold/master
Geometry: set worldTransform to identity if ignoreTranform is true
2017-09-27 12:22:38 -07:00
Nehon
3f99c80109 glTF: properly close opened stream and avoid caching them.
Fixed an issue when an animation track didn't have any translation or scale entries
2017-09-27 10:00:49 +02:00
Nehon
c17c3e9605 Remove leftover sys err 2017-09-24 16:02:45 +02:00
Rémy Bouquet
7b2f1094b1 Gltf fix data reading 2017-09-24 15:55:46 +02:00
Stephen Gold
8a5da0eb0e Geometry: set worldTransform to identity if ignoreTranform is true 2017-09-23 14:36:01 -07:00
Kirill Vainer
ad2a9e6230 Revert "Resolving issue in ticket #661. Creating skelton debugger that allows bones to be extended in any direction instead of only the Y direction. (#681)"
This reverts commit 989c7926df8d1bccb635b97f55da7c05bfad60ad.
2017-09-22 13:51:49 -04:00
Stephen Gold
3b5248766e Merge pull request #745 from stephengold/master
testcase & fix for issue #744: collideWith() versus setIgnoreTransform()
2017-09-22 10:19:33 -07:00
Stephen Gold
e4bfe8a80d testcase & fix for issue #744: collideWith() versus setIgnoreTransform() 2017-09-22 09:36:52 -07:00
Nehon
37e4d4d564 PBR: Applied band factor to sh coefficient.
Regenrerated the default probe in test data
better gloss / spec pipeline
2017-09-22 17:58:29 +02:00
Alexandr Brui
66137d53b8 added auto closing readers. (#738) 2017-09-21 15:33:12 -04:00
Bekreth
989c7926df Resolving issue in ticket #661. Creating skelton debugger that allows bones to be extended in any direction instead of only the Y direction. (#681) 2017-09-21 15:30:58 -04:00
NemesisMate
4251d70b75 Fixed softkeyboard's (simulated) backspace not being recognized (#714)
The fix assumes that if a key-event's device is not recognized and the soft-keyboard is open, it is a touch-input event.
2017-09-21 15:28:47 -04:00
Alexandr Brui
fb99ca90b1 fixed NPE. (#737)
* fixed NPE.
* changed the if condition.
2017-09-21 15:27:18 -04:00
Nehon
97fe9cc49c PBR properly normalize tangent frame 2017-09-20 07:59:38 +02:00
Nehon
c00407da33 PBR : Removed specularColor contribution from direct lighting specular. 2017-09-18 23:00:57 +02:00
Nehon
e6a55e9d3a Dropped the use of the irradiance Map for LightProbes, only the spherical harmonics coeffs are stored and used to recompose indirect diffuse color in the shader.
Also added a tweak to get the specular dominant direction when sampling the prefiltered env maps. It gives better result on low roughness materials.
2017-09-18 11:14:45 +02:00
Nehon
0da2bfe0ba Changed how roughness is stored into prefiltered env map mipmaps for a more consistent method.
Bumped the default size of the LightProbe maps to 256
Change he integrateBRDF approximation method
2017-09-18 11:14:45 +02:00
Kirill Vainer
b56e321218 Avoid calculating whitepoint for each sample for HDR (#722)
* Avoid calculating whitepoint for each sample for HDR
2017-09-17 23:03:39 -04:00
Kirill Vainer
6127f7eb7a Miscellaneous OpenGL ES fixes (#720)
* Use correct HALF_FLOAT constant for GLES
* Support GLTracer and GL debug in Android
* Support instancing in GLTracer
* Don't use unsupported TEXTURE_{BASE,MAX}_LEVEL in GLES
* Support ABGR8 using swizzle extension
* Move glFramebufferTextureLayer to GLFbo
* Avoid RGB111110F in filters unless its actually supported
* Use the same depth format in all places in FPP
* Print the object with the problem in NativeObjectManager
* JMException does not exist on Android
2017-09-17 23:00:29 -04:00
Stephen Gold
4b4cf62008 Merge pull request #734 from stephengold/master
test and fix for issue #651 (inverted rotation in Sky.vert)
2017-09-17 05:41:55 -07:00
Stephen Gold
d1bd48528c test and fix for issue #651 (inverted rotation in Sky.vert) 2017-09-16 11:42:51 -07:00
Kirill Vainer
d2839fd2ab Fix #558 (#729) 2017-09-16 13:25:21 -04:00
Nehon
ef5952bcad Refactored how BatchNode transforms vertex buffers, and fixed issue #731 (NPE when no normal buffer) 2017-09-16 14:27:04 +02:00
Nehon
c1c67f58cf reformat BatchNode before change 2017-09-16 11:50:44 +02:00
Nehon
2b014d194c glTF. support for glb files (binary self contained gltf) 2017-09-15 20:14:58 +02:00
Stephen Gold
ff75671162 Merge pull request #725 from stephengold/master
test and fix for issue #710 (phantom triangles in mesh collision)
2017-09-15 11:09:43 -07:00
Stephen Gold
adb52c5cc8 test and fix for issue #710 (phantom triangles in a mesh collision) 2017-09-11 19:20:39 -07:00
Kirill Vainer
9472c6dc81 Try to fix Travis-CI buffer overflow on JDK7 (#721) 2017-09-09 13:39:46 -04:00
Nehon
21fbaf8f11 glTF: prevent direct loading of .bin files. 2017-09-09 18:34:03 +02:00
Nehon
d606c30a52 Used IndexBuffer instead of the ByteShortIntBufferReader and removed the class 2017-09-09 14:58:27 +02:00
Kirill Vainer
bf18ef3048 Use MPOs for skinning 2017-09-09 14:36:20 +02:00
Kirill Vainer
381d69ccb7 Support LWJGL 3.1.2 2017-09-09 14:34:08 +02:00
Kirill Vainer
7f8fa4d74c Fix depth texture support in OpenGL ES 2.0 2017-09-09 14:33:59 +02:00
Nehon
e09a5a5b09 glTF: fixed data reading to properly support interleaved data. 2017-09-09 14:31:54 +02:00
empirephoenix
0bc6c64311 Merge pull request #716 from JavaSaBr/fixed_problem_with_clonning_shader_info
Missed one collection
2017-09-05 17:07:41 +02:00
javasabr
0a9a76e46d missed one collection 2017-09-04 18:04:46 +03:00
javasabr
94f542912b Fixed NPE and ConcurrentModificationException during cloning TechniqueDef. 2017-09-03 18:33:53 +02:00
Nehon
32b947a0ac Fixed an issue where loaded glTF models couldn't use software skinning 2017-09-03 16:18:09 +02:00
Nehon
510562a62d Fixed a crash when loading a gltf file where textures has no sampler entry.
Also adapted how the light map is handled
2017-09-02 23:51:52 +02:00
Nehon
bed3cc8a17 Some clean up 2017-08-31 21:39:54 +02:00
Nehon
7166906908 Added support for loading "extras" from gltf files. Added some documentation 2017-08-31 21:39:54 +02:00
Nehon
5e79ae3c36 fix bad import in Mesh 2017-08-31 21:39:54 +02:00
Nehon
cac51f542a Added support for packed float data 2017-08-31 21:39:54 +02:00
Nehon
01b48e0357 fixed an issue with transform matrix reading 2017-08-31 21:39:54 +02:00
Nehon
ad03eab01d Fix an issue with material adpater 2017-08-31 21:39:54 +02:00
Nehon
1bdebd5505 Added support for attachment nodes.
JME now supports byte buffers for index buffer
2017-08-31 21:39:54 +02:00
Nehon
d6c74dbf37 Added camera support 2017-08-31 21:39:54 +02:00
Nehon
f14acf305b Added support for extensions, implemented PBR spec gloss extension 2017-08-31 21:39:54 +02:00
Nehon
e9869e5298 Added support for base64 embed data and Images 2017-08-31 21:39:54 +02:00
Nehon
285d6bb86c Pad data when animation doesn't start at 0. 2017-08-31 21:39:54 +02:00
Nehon
94277ac286 Model can now be loaded keeping the specific pose of the skeleton in the file. 2017-08-31 21:39:54 +02:00
Nehon
de78c8deb6 Properly Read and use inverseBindMatrices for skeleton bind pose. 2017-08-31 21:39:54 +02:00
Nehon
225afd0f92 Compute the 4 more weighted bone index for skin animation when there are several Joint buffers for a mesh. 2017-08-31 21:39:54 +02:00
Nehon
911d8d77ef Actually commit the right file... 2017-08-31 21:39:54 +02:00
Nehon
63faeeae87 Some code cleanup 2017-08-31 21:39:54 +02:00
Nehon
4d78a5aef8 Gltf: all demo case of bone animation are now covered.
Though, this put in light a bug in our animation system that needs more work to get fixed.
2017-08-31 21:39:54 +02:00
Nehon
ea6c406979 Implemented bone animation. This is still in WIP state, currently working for the most simple cases. 2017-08-31 21:39:54 +02:00
Nehon
d7b2e08d95 Spatial tracks now can keep a reference to the spatial they apply to. This allows to group multiples spatial tracks in a single animation. 2017-08-31 21:39:54 +02:00
Rémy Bouquet
6b3093aa3e GLTF: armature loading. 2017-08-31 21:39:54 +02:00
Rémy Bouquet
b129d2954f Added a better skeleton debugger 2017-08-31 21:39:54 +02:00
Nehon
42aec10020 Gltf Spatial animation loading 2017-08-31 21:39:54 +02:00
Nehon
4daa0b5d9b Generates mikkt space tangents when a geometry has no tangent bufer but uses a material with a normal map 2017-08-31 21:39:54 +02:00
Nehon
40c4f7936d Implemented texture loading and PBR metalness/roughness pipeline support
Fixed  some mesh loading issues.
2017-08-31 21:39:54 +02:00
Nehon
3bbfabed5e Gltf: added support for PBR colored material 2017-08-31 21:39:54 +02:00
Nehon
7951f5a987 Gltf loader can load mesh data and scene structure. 2017-08-31 21:39:54 +02:00
empirephoenix
50eaa34143 Update ParticleEmitter.java
allow easy manipulation of particleemmite via subclasses
2017-08-31 21:39:54 +02:00
javasabr
fac8266b5c fixed two problems with asset manager:
1. can't load classes from asset class loaders.
2. can't load resources from asset class loaders.
2017-08-31 21:39:54 +02:00
Kirill Vainer
abab0a553f Try to fix JDK7 error (#706) 2017-08-31 21:39:54 +02:00
Kirill Vainer
725983d99e Fix AppVeyor 2017-08-31 21:39:54 +02:00
appveyor
8f1316ce4e [ci skip] bullet: update windows natives 2017-08-31 21:39:54 +02:00
b00nation
06b23ec6ca Fixed: If Instancing is activated you only see shadows
When the pbr material was introduced someone forgot to keep the instancing in mind which uses :
            ViewProjectionMatrix
            ViewMatrix
I added these.
2017-08-31 21:39:54 +02:00
Kai Boernert
6dddb6d418 added missing header function 2017-08-31 21:39:54 +02:00
Kai Boernert
96b355e38c added inertia manipulating methods 2017-08-31 21:39:54 +02:00
travis-ci
ec6c32ecdc [ci skip] bullet: update osx natives 2017-08-31 21:39:54 +02:00
travis-ci
e12261eaa5 [ci skip] bullet: update linux natives 2017-08-31 21:39:54 +02:00
Riccardo Balbo
af60797efd Update to bullet 2.86.1 (#698) 2017-08-31 21:39:54 +02:00
Dennis
02bc779866 Update com_jme3_bullet_objects_PhysicsRigidBody.cpp (#702)
* Update com_jme3_bullet_objects_PhysicsRigidBody.cpp

From docu here: http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Activation_States
..
ACTIVE_TAG
    Means active so that the object having the state could be moved in a step simulation. This is the "normal" state for an object to be in. Use btCollisionObject::activate() to activate an object, not btCollisionObject::setActivationState(ACTIVATE_TAG), or it may get disabled again right away, as the deactivation timer has not been reset. 
..

* Update com_jme3_bullet_objects_PhysicsRigidBody.cpp

Settin RigidBody kinematic and then back dynamic will leave activation state to disabled causing the object never fall to sleep.
2017-08-31 21:39:54 +02:00
javasabr
642b9f4d39 added dependences to native libs 2017-08-31 21:39:54 +02:00
javasabr
97efa6be65 We need to update lwjgl from 3.0.0 to 3.1.0(3.1.2 requires to change code), because start from the version they use other solution with native libraries and other user can overwrite these dependences from jME. 2017-08-31 21:39:54 +02:00
Nehon
de009e2ea7 Added the Glow technique to PBR material so that it can work with the bloom filter. 2017-08-08 19:44:55 +02:00
Julien Gouesse
0dc65efc25 Merge pull request #701 from shamanDevel/opencl-gc-patch
Fix for OpenCLObjectManager
2017-08-07 01:20:26 +02:00
Sebastian Weiß
3a7dedeba0 formatting, as always :( 2017-08-06 16:31:13 +02:00
Sebastian Weiß
28e4c9848f Removed call to Runtime.getRuntime().gc() every 10 frames, added call to Reference.clear() when an object is explicitly deleted. 2017-08-06 16:27:16 +02:00
Alexandr Brui
6785087057 Added a possibility to resize env cameras. (#699) 2017-08-05 16:01:50 +02:00
Alexandr Brui
6e5e85f7ac Update the water filter (#693)
WaterFilter now serializes the different textures textures, and can optionally serialize the reflection scene
2017-07-31 22:48:53 +02:00
Alexandr Brui
3058c218c5 Added missed imports. (#691)
Used GLSL compat on the post shadow filter
2017-07-27 16:27:41 +02:00
Alexandr Brui
10bc250db7 Fix of the one parameter of shadows render. (#688)
* fixed applying the render back faces shadows option during creating a shadow filter.
2017-07-23 17:51:23 +02:00
empirephoenix
b21cff5cfa Merge pull request #687 from JavaSaBr/fix_lwjgl_buffer_2
added synchronizing during freeing memory from a deallocator.
2017-07-23 16:12:33 +02:00
NemesisMate
edd9a78291 Added alpha blending option to terrain lightings to allow alpha stencil textures. (#689)
Updated Terrain materials to allow diffuse textures with alpha
2017-07-23 14:10:33 +02:00
javasabr
a50b1f1d2f added synchronizing during freeing memory from a deallocator. 2017-07-23 11:42:28 +03:00
empirephoenix
c6f1da0602 Merge pull request #684 from JavaSaBr/fix_lwjgl_buffer
added support multi-threading allocations for LWJGL Buffer Allocator.
2017-07-18 21:49:53 +02:00
Nehon
6ed4abf29e ShaderNodes: changed the way condition are used for variable declaration.
Before each input (attribute, varying or uniform) depending on a define was declared inside a #ifdef statement, it appears that most compiler will optimize out any input that has not been set so this computation was useless and costly and the code to to it was kind of ugly.
So basically now it's only done in very particular cases when it's really needed.
2017-07-18 21:09:19 +02:00
javasabr
51876d6ada to prev. 2017-07-16 11:42:26 +03:00
javasabr
76cd4e6eca added support multi-threading allocations for LWJGL Buffer Allocator. 2017-07-16 11:38:31 +03:00
Nehon
85dc89b0aa Shader Nodes: changed the way uniforms were replaced in the code, they are now assigned as any other input except for samplers that can't be assigned. 2017-07-16 00:03:05 +02:00
Nehon
385d2caeed Shader Nodes: Shader compatibility for texture function is now handled at generation time 2017-07-16 00:03:05 +02:00
Alexandr Brui
8abf23b2f2 Added missed gl versions (#680)
* Added missed GL versions and Caps.

* Added supporting 3.3, 4.0, 4.1, 4.2, 4.3, 4.4 and 4.5 GL core profiles.
2017-07-14 14:25:57 +02:00
empirephoenix
b56c9c79fc Merge pull request #679 from stephengold/master
testcases and fix for issue #357
2017-07-13 12:44:45 +02:00
empirephoenix
a2d7ec7f95 Merge pull request #683 from jmecn/master
Fix typo on LightPosition and LightDirection
2017-07-13 09:08:34 +02:00
Yan
22d73a57cd Update UniformBinding.java
fix typo
2017-07-13 15:06:33 +08:00
Yan
e67cb0b0a9 Merge pull request #1 from jMonkeyEngine/master
update to jMonkeyEngine master
2017-07-13 15:04:25 +08:00
Nehon
54f283e8d2 Fixed an issue where the color space of a texture mat param was disregarded when loaded from a j3o. 2017-07-08 23:39:05 +02:00
Nehon
debd62ee87 Display generated source in the ShaderNode test 2017-07-08 14:06:56 +02:00
Nehon
5ac5731ebf Better error reporting when loading shaderNodeDefinition 2017-07-08 14:06:56 +02:00
Stephen Gold
8530b60294 testcases and fix for issue #357 2017-07-06 22:01:57 -07:00
Paul Speed
e860fa6ce6 Merge pull request #678 from Bekreth/skeletonClone
Overrode SkeletonDebugger clone method.  Ticket #660
2017-07-06 17:29:27 -04:00
Christopher Hughes
d3733fba15 Overrode SkeletonDebugger clone method. Ticket #660 2017-07-06 16:52:39 -04:00
empirephoenix
25570ba4b3 Merge pull request #672 from Saucistophe/master
Refactored Cylinder
2017-06-29 20:05:57 +02:00
empirephoenix
d181a84b7c Merge pull request #677 from RemboL/master
fixing documentation link
2017-06-25 13:19:33 +02:00
RemboL
2ff0bf5f75 fixing documentation link 2017-06-25 08:54:04 +02:00
empirephoenix
d1166f40c1 Merge pull request #641 from jseinturier/jme3-vr-dev
Jme3 vr dev
2017-06-23 13:35:57 +02:00
empirephoenix
9116772472 Merge pull request #675 from mazerty/patch-1
LodGenerator should accept a constructor by mesh
2017-06-23 13:22:50 +02:00
empirephoenix
2a09771bc8 Merge pull request #663 from NemesisMate/patch-18
Fixed IllegalArgumentException when removing a LodControl from a spatial
2017-06-23 12:51:37 +02:00
Thomas JOUANNOT
1dd1888b55 LodGenerator should accept a constructor by mesh 2017-06-22 13:26:47 +02:00
stophe
ebaad20f2f Added a unit test and fixed indentation. 2017-06-18 23:56:14 +02:00
stophe
61c22d5709 Providing invalid parameters in cylinders generation throws an exception. 2017-06-18 21:27:57 +02:00
stophe
edf279a06d Refactored Cylinder generation to be more maintainable, readable, and fix #640. 2017-06-18 16:35:35 +02:00
Rémy Bouquet
c2d25ee9d6 Merge pull request #658 from jmecn/master
Fix issue #654
2017-06-06 19:58:17 +02:00
Rémy Bouquet
530596838c Merge pull request #664 from iamcreasy/MeshPointDocFix
Mesh point doc fix
2017-06-04 21:30:43 +02:00
Nehon
ee9c6d366a ShaderNodeVariable now has a prefix attribute that is concatenated to the name when generating the shader (basically g_ and m_ when the variable is an uniform)
It avoid to change the name of the variable when loading the definition and always have weird inconsistencies with mat params because the name has a m_ or not.
2017-06-02 00:37:01 +02:00
Nehon
2f06c9b37b ShaderNodeDefinition path is now set while loading the definition. 2017-06-02 00:37:01 +02:00
Nehon
26ccaaea88 DDSLoader now supports Luminance16f format (r16f) 2017-06-02 00:37:01 +02:00
Quazi Irfan GD
97135fa9bb Add missing override in Geometry 2017-05-27 14:13:57 -05:00
Quazi Irfan GD
cf07e094af Cleanup Mesh(Point) documentation 2017-05-27 00:40:04 -05:00
Quazi Irfan GD
1bfabd8d8f Update Mesh(Point) documentation 2017-05-27 00:30:12 -05:00
NemesisMate
88125da16d Fixed IllegalArgumentException when removing a LodControl from a spatial
LodControl throws an exception when the spatial being added to isn't a geometry, however, when the controls is removed it calls setSpatial with a null value triggering the exception throw. Now checking for this null value case.
2017-05-24 13:51:28 +01:00
Yan
6479a7cdf8 Add locale translation for zh_CN
Add locale translation for zh_CN
2017-05-18 13:55:03 +08:00
Yan
8e45937974 Fix issue #654
Fix issue #654
2017-05-15 11:06:35 +08:00
empirephoenix
080a89e14b Merge pull request #655 from mitm001/patch-4
Updated broken link to point to wiki.
2017-05-11 20:37:07 +02:00
mitm001
80bec2e7a0 Updated broken link to point to wiki. 2017-05-11 07:31:52 -07:00
Paul Speed
2fc25f5743 Merge pull request #645 from grizeldi/patch-2
Added Xbox One S controller mappings
2017-04-26 19:43:58 -04:00
grizeldi
23d6def5ed Made right trigger usable on Xbox based controllers 2017-04-26 18:05:49 +02:00
grizeldi
ddfa728d60 Add Xbone S controller mappings 2017-04-26 17:52:15 +02:00
empirephoenix
bfbb0d61ea Merge pull request #498 from TripleSnail/master
Add/remove all PhysicsControls even when a RigidBodyControl is present
2017-04-25 13:25:53 +02:00
empirephoenix
4d48f5c8a4 Merge pull request #644 from rpax/patch-1
NullContext thread safety
2017-04-25 08:59:44 +02:00
Rafael Pax
543268593b NullContext thread safety
The fields `timeThen` and  `timeLate` are static. If multiple Applications are launched in different threads in headless mode, sync fails. This can be fixed removing the static modifier of the fields.
2017-04-24 19:57:34 +02:00
jseinturier
16b4dade2d Removing more static references. 2017-04-13 11:37:36 +02:00
jseinturier
f7a852b755 Merge remote-tracking branch 'origin/master' into jme3-vr-dev 2017-04-13 11:16:21 +02:00
jseinturier
2cacf16f69 Conform to... Oh you know what i mean... 2017-04-13 11:13:52 +02:00
jseinturier
0ecd38892c Conform to master... boring.... 2017-04-13 11:12:11 +02:00
jseinturier
9e945462f7 Conforming to last master branch 2017-04-13 10:00:11 +02:00
seint
888b66892d Ignoring .gitignore files 2017-04-13 08:43:34 +02:00
seint
651e77953a VR controller clean integration 2017-04-13 08:40:34 +02:00
Nehon
d20cf3f20a Reverted changes in Spatial made for VR. 2017-04-12 23:59:30 +02:00
Nehon
29875e6085 Fixed InstanceGeomerty not working properly when using the lighting material and a non DirectionalLight
see https://hub.jmonkeyengine.org/t/instancednode-doesnt-work-with-light/38316/5
2017-04-12 20:33:28 +02:00
empirephoenix
0111cddaa5 Merge pull request #639 from shamanDevel/DDSLoader-less-constraints
Weakens the flag tests in DDSLoader: some textures lack the DDSCAPS_TEXTURE flag
2017-04-12 10:39:57 +02:00
Rickard Edén
d6fb7d85f1 Fixed controller buttons: unControllerSize is size of struct in bytes.
Cleaned up controller detection code from last commit
2017-04-11 14:33:14 +02:00
Sebastian Weiß
02781e799f oh man, I should have learned it by now, that jme uses spaces, not tabs 2017-04-08 21:24:15 +02:00
Sebastian Weiß
04b0578173 Certain dds texture lack the DDSCAPS_TEXTURE-flag, but are still recognized by programs like IrfanView and can also be loaded in the engine.
This commit weakens the check for this flag: Instead of throwing an exception, a warning is logged.
2017-04-08 21:22:06 +02:00
Sebastian Weiß
a3cd3cbb04 Certain dds texture lack the DDSCAPS_TEXTURE-flag, but are still recognized by programs like IrfanView and can also be loaded in the engine.
This commit weakens the check for this flag: Instead of throwing an exception, a warning is logged.
2017-04-08 21:18:16 +02:00
empirephoenix
1265f46fed Merge pull request #638 from stephengold/master
Version 3.1.0 is now stable, both for the SDK and the Engine itself.
2017-04-07 09:50:53 +02:00
Stephen Gold
35978f9c38 Version 3.1.0 is now stable, both for the SDK and the Engine itself. 2017-04-06 22:00:35 -07:00
Stephen Gold
3d07e165af Merge pull request #637 from stephengold/master
fix SkeletonControl.getAttachmentsNode() for odd models (such as Jaime)
2017-04-06 14:55:29 -07:00
Stephen Gold
9905c4f011 getAttachmentNode(): move target selection from SkeletonControl to Bone 2017-04-06 14:12:52 -07:00
Stephen Gold
b2aa1ff9f1 fix SkeletonControl.getAttachmentNode() for odd models (such as Jaime) 2017-04-05 18:28:43 -07:00
Stephen Gold
5f9cf52c13 Merge pull request #633 from stephengold/master
add PointSize to Unshaded matdef, test with SkeletonDebugger
2017-04-05 13:35:51 -07:00
Stephen Gold
dcb92e1d15 Unshaded.vert: put declaration in #ifdef to avoid an unused uniform 2017-04-05 13:02:36 -07:00
Rémy Bouquet
4dd65eb81c Merge pull request #611 from FrozenShade666/patch-2
Update README.md
2017-04-05 21:39:13 +02:00
Rickard Edén
39fad9cb3a Fix for mirror cam not being initialized 2017-04-04 15:30:49 +02:00
Rickard Edén
7818f985be Fix for NPE when initializing mirror view 2017-04-04 15:30:35 +02:00
Rickard Edén
1c22bd26b7 Support for Vive Tracker 2017-04-04 15:30:17 +02:00
Rémy Bouquet
b0a5384046 Moved worldMatrix declaration in instancing.glsl so that it works on android 2017-04-02 12:53:16 +02:00
Rémy Bouquet
09fa4f165e fixed bad comma in previous commit 2017-04-01 22:06:11 +02:00
Nehon
8caf05734c Fixed tangent and normal argument position in Skinning.glsllib 2017-04-01 05:45:04 +02:00
empirephoenix
eca531fdc8 Merge pull request #630 from rvandoosselaer/fix_appsettings_resizable
use the resizable parameter instead of a default 'true' value
2017-03-29 11:36:52 +02:00
Stephen Gold
259f599d1d add PointSize to Unshaded matdef, test with SkeletonDebugger 2017-03-23 13:33:08 -07:00
rvandoosselaer
81a301f8ef use the resizable parameter instead of a default 'true' value 2017-03-13 15:22:06 +01:00
empirephoenix
a64175c0f1 Merge pull request #629 from JavaSaBr/fix_problem_with_converting_blend_files
fixed a problem with converting blend file when there are unsupported…
2017-03-09 14:12:55 +01:00
javasabr
0e340416fd fixed a problem with converting blend file when there are unsupported textures. 2017-03-04 11:09:39 +03:00
empirephoenix
b35cbd5580 Merge pull request #626 from JavaSaBr/fix_memory_leak_lwjgl
Fixed some problems with getting an address of an LWJGL buffer.
2017-03-02 10:51:36 +01:00
empirephoenix
78a3e2408e Merge pull request #622 from JavaSaBr/fix_memory_cost_on_terrain_changes
added reusing position buffer on heightmap changing.
2017-03-02 10:08:11 +01:00
javasabr
f84ac5d085 fixed some problems with getting address. 2017-02-28 06:00:14 +03:00
Rémy Bouquet
df765322dc Fixed warnings in Terrain shader.
Fixed the use of the first diffuse map
Fixed the camera positioning in the TestSpotLightTerrain
2017-02-26 09:25:23 +01:00
empirephoenix
d1b125eac1 Merge pull request #578 from FennelFetish/master
Fixes mouse cursor format for LWJGL3
2017-02-24 10:02:13 +01:00
empirephoenix
c3c274015f Merge pull request #620 from NemesisMate/patch-11
Removed the override that avoided a CompoundCollisionShape to be scaled
2017-02-24 09:46:13 +01:00
empirephoenix
734b2d3238 Merge pull request #623 from JavaSaBr/fix_memory_leak_lwjgl
Implemented auto free LWJGL byte buffers.
2017-02-24 09:42:27 +01:00
javasabr
449f83f4a6 added volatile 2017-02-24 06:52:34 +03:00
javasabr
2136dc4484 Implemented auto free LWJGL byte buffers. 2017-02-24 06:50:53 +03:00
javasabr
444588a363 added reusing position buffer on heightmap changing. 2017-02-18 18:48:42 +03:00
empirephoenix
ed4e614722 Merge pull request #618 from jseinturier/jme3-vr-dev
Deprecated VRApplication. Now VRAppState should be used.
2017-02-15 17:04:21 +01:00
NemesisMate
31933ff365 Removed the override that avoided a CompoundCollisionShape to be scaled 2017-02-15 14:19:13 +00:00
Julien Seinturier
6cf1b57e00 Added VREnvironment class that gather the system related VR objetcs.
This VREnvironment is independent from the JMonkey stuff and enables to
check and initialize VR specific capabilities before initializing
VRAppState.

The procedure is now to initialize a VR environment and, if the
initialization is ok, to attach a VRAppstate to the main application.

Some class has been refactored:

- System classes are within the com.jme3.system package
- VR related utility classes are in the package com.jme3.util.
2017-02-15 11:19:18 +01:00
Julien Seinturier
33e6574387 Deprecated VRApplication. Now VRAppState should be used. 2017-02-13 11:42:37 +01:00
Nehon
ba2c0bbfa3 Removed sdk folder leftovers after the merge with the PBR branch 2017-02-12 15:54:40 +01:00
Nehon
dc40faaff8 Moved DetailedProfiler to a more appropriate package 2017-02-12 15:54:40 +01:00
empirephoenix
08de4e5687 Merge pull request #607 from jseinturier/jme3-vr-dev
Jme3 vr dev
2017-02-10 13:21:56 +01:00
Julien Seinturier
caab42d809 Merging with Master branch 2017-02-10 12:50:12 +01:00
Julien Seinturier
52eb6946af Merge remote-tracking branch 'origin/master' into jme3-vr-dev 2017-02-10 12:43:04 +01:00
Julien Seinturier
41bead60e3 Creating a VRAppState 2017-02-10 11:10:05 +01:00
empirephoenix
1d98c712b3 Merge pull request #616 from delt0r/master
Fixed a exception in Material toString with blender materials.
2017-02-08 09:36:43 +01:00
delt0r
f416d7af18 Fixed a exception in Materal toString with blender materials.
Some blender materials have null Material Param keys. This shouldn't
throw an exception in a toString method. So rather than throwing a
OperaitonNotSupported exception a string is returned informative of the
null state of the key.
2017-02-08 14:53:45 +13:00
Nehon
8dcc67a318 Fixed an issue in DetailedProfiler where time would become negative with low fps 2017-02-07 20:43:42 +01:00
Nehon
0610f703d7 Fixed a crash in the PBR shader when adding a light map. 2017-02-06 19:49:04 +01:00
empirephoenix
09ce6205c7 Merge pull request #614 from riccardobl/FixMeshCollisionShapeJ3oRead
Fix bullet crash when MeshCollisionShape is loaded from j3o
2017-02-06 15:34:44 +01:00
Riccardo Balbo
e452ec8f0c Fix MeshCollisionShape crash when loaded from j3o: always create BVH before scaling. 2017-02-06 14:31:19 +01:00
Nehon
1eb894111a Fixed a crash in ssao.frag when enabling multisampling 2017-02-05 17:57:28 +01:00
Nehon
12fe7ba035 Added a DetailedProfiler and its associated AppState for detailed time profiling 2017-02-05 17:57:28 +01:00
Nehon
6b33ae470a Added a new step in AppProfiler for viewport processors and added method to pass the profiler to all processors. 2017-02-05 17:57:28 +01:00
Nehon
6a467ecb53 Added gpu profiling to Renderer and all the GL backends except ios 2017-02-05 17:57:28 +01:00
empirephoenix
6f32651fb1 Merge pull request #613 from JavaSaBr/fixed_saving_and_cloning_some_controls
Fixed cloning and saving some contorls.
2017-02-03 08:43:16 +01:00
javasabr
e26f0f133b fixed cloning and saving some contorls. 2017-02-03 09:16:06 +03:00
Julien Seinturier
b9071513e7 Working on Controller interaction 2017-02-02 17:34:32 +01:00
empirephoenix
071e449a3e Merge pull request #612 from JavaSaBr/fixed_cloning_and_saving_RigidBodyControl-2
Fixed saving/cloning enabled state of a RigidBodyControl.
2017-02-02 13:27:20 +01:00
Julien Seinturier
e61eff13ae Updating Java native binds to OpenVR 1.0.6 with strict JNA direct access 2017-02-02 13:21:23 +01:00
Julien Seinturier
3520273dce Static lonks removal & OpenVR refactoring
Removing static call between classes
Refactoring OpenVR system package
2017-01-30 15:47:20 +01:00
javasabr
637635d53f Fixed saving/cloning enabled state of a RigidBodyControl. 2017-01-29 23:30:28 +03:00
FrozenShade666
39560ea7ae Update README.md
New mashup image including Skullstone.
2017-01-28 21:42:23 +01:00
Rémy Bouquet
3a2f4075dc Merge pull request #610 from FrozenShade666/patch-1
Update README.md
2017-01-28 13:27:37 +01:00
FrozenShade666
e1dd515321 Update README.md
Added Skullstone
2017-01-28 12:21:26 +01:00
Rémy Bouquet
33b3514368 Merge pull request #608 from JavaSaBr/fixed_motion_event
Fixed saving a spatial of a motion event control.
2017-01-27 09:09:09 +01:00
javasabr
ba4886da80 fixed saving spatial of motion event control. 2017-01-27 05:54:14 +03:00
Nehon
74858976eb Fixed an issue where ParticleEmitter had NaN bounds during the first update when added to the scene graph during the update loop 2017-01-26 21:09:02 +01:00
Julien Seinturier
825b1baccb Updating .gitignore in order to skip eclipse project configuration to be
send to GitHub
2017-01-26 15:01:33 +01:00
Julien Seinturier
06759d1eb3 Adding native lib required by OpenVR and OSVR 2017-01-26 14:58:17 +01:00
Julien Seinturier
2af2b121ec Conforming to LWJGL3 library 2017-01-26 12:37:59 +01:00
Julien Seinturier
59d41c865b First jme3-vr commit 2017-01-26 12:00:24 +01:00
Nehon
390d35180b Soft particles now has only one shader and one technique to work with any glsl version 2017-01-24 20:06:12 +01:00
Rémy Bouquet
4fbe5ec84d Merge pull request #605 from JavaSaBr/add_cloneable_support_to_shadow_renderers_and_filters
Add cloneable support to shadow renderers and filters
2017-01-24 15:10:26 +01:00
javasabr
87562bfbae fixed NPE. 2017-01-24 06:43:39 +03:00
javasabr
c2219ecce5 removed the comment and returned a final modification to the method. 2017-01-23 23:05:46 +03:00
javasabr
f016469933 to prev 2017-01-23 22:50:30 +03:00
javasabr
6c3100f929 Added cloneable and jmeCloneable interfaces to shadows renders and filters 2017-01-23 22:34:03 +03:00
Rémy Bouquet
4c664f8df3 Merge pull request #603 from JavaSaBr/fix_editing_color_overlay_filter
Fix editing color overlay filter
2017-01-23 08:33:09 +01:00
javasabr
1be4a48223 changed access to some methods of shadow render. 2017-01-23 09:08:47 +03:00
Nehon
f7181c38dc Removed all xxx15.frag shaders and used GLSLCompat to have the same shader whatever version it's used for 2017-01-22 14:08:22 +01:00
javasabr
e7d95ee734 to prev 2017-01-22 09:59:50 +03:00
javasabr
56fc653725 fixed editing of color overlay filter 2017-01-22 09:58:24 +03:00
Nehon
a64594eea9 Better cloning for TechniqueDefs 2017-01-20 23:33:17 +01:00
Nehon
51eccfea2e Imported the glslCompat directly in multisample.glsllib to have it to work properly with glsl 1.5+ 2017-01-20 23:33:17 +01:00
Rémy Bouquet
93fff9fae8 Merge pull request #601 from mitm001/patch-1
Update MotionEvent.java
2017-01-20 08:08:54 +01:00
mitm001
756a7c2683 Update MotionEvent.java
Corrected minor spelling and class naming errors.
2017-01-19 10:41:13 -07:00
appveyor
f376ebb5c0 [ci skip] bullet: update windows natives 2017-01-19 17:20:09 +00:00
MeFisto94
0587c84527 Triggering a Native Physics build 2017-01-19 18:16:29 +01:00
Nehon
b0ed053472 Fixed a cloning issue and some tests 2017-01-15 20:32:42 +01:00
Nehon
d537a1c22e Added a GLSL150 to most of the shaders used in the engine (except deprecated ones).
All shaders now import the GLSLCompat.glsllib
2017-01-15 19:02:10 +01:00
Nehon
12a2f0f63c One can now define several versions for the shader in a Technique in a J3md file, ie:
VertexShader GLSL150 GLSL110 : "path/to/shader/file.vert"
FragmentShader GLSL150 GLSL110 : "path/to/shader/file.frag"

Versions must be separated with spaces. They will be matched together when creating the technique so they have to follow the same order for different shaders.
2017-01-15 18:57:53 +01:00
Nehon
4777c591b1 GLSLLoader now moves all extensions declaration found in the dependencies at the top of the shader code 2017-01-14 23:13:08 +01:00
Nehon
f2709858bb Got rid of the sorting for Technique selection 2017-01-14 18:53:18 +01:00
Nehon
cb04548fd5 Techniques are now weighted and sorted depending on their LightMode and GLSL version 2017-01-14 15:25:43 +01:00
Nehon
c713a06146 Fixed Backface Shadows param for PBRLighting 2017-01-14 15:25:43 +01:00
appveyor
fd200ac2a0 [ci skip] bullet: update windows natives 2017-01-14 09:22:53 +00:00
sgold@sonic.net
c1253b68b1 back to UNIX line endings 2017-01-14 01:19:18 -08:00
sgold@sonic.net
d4cd3f916d fix errors in how vector projection is calculated 2017-01-14 01:15:31 -08:00
empirephoenix
6493337477 Merge pull request #588 from JavaSaBr/added_lwjgl3_allocator
implemented LWJGL3 BufferAllocator
2017-01-11 08:29:06 +01:00
Rémy Bouquet
d5658674e8 Merge pull request #592 from SkidRunner/master
New Physics based jme3 example game.
2017-01-04 20:39:47 +01:00
SkidRunner
0384fe5477 jayfella commented 6 hours ago
I would appreciate removing the presumed resolution and to display the
settings page by default before merging.
2017-01-04 12:34:02 -06:00
SkidRunner
5374c66636 Removed tempvars from update. 2017-01-03 21:39:47 -06:00
SkidRunner
1df2435fbd New Physics based jme3 example game. 2017-01-03 13:57:13 -06:00
javasabr
90649456e0 added checking property existing. 2017-01-01 20:00:01 +03:00
javasabr
a131d22518 reverted the name of the allocator filed. 2017-01-01 19:33:41 +03:00
javasabr
b442bcd9c1 removed unnecessary field. 2017-01-01 19:33:10 +03:00
javasabr
b3ecb134ef reverted the name of the logger field. 2017-01-01 19:31:28 +03:00
empirephoenix
b31ccf31d7 Merge pull request #581 from Ev1lbl0w/master
Fix some problems in issue #96 (SDK branch)
2016-12-31 23:27:50 +01:00
Nehon
bf2369a50a Fixed MikktSpaceTangentGenerator that was not replacing existing Tangent buffers on the mesh. That could cause crashes when the old tangent buffer did not have the same amount of components 2016-12-30 10:09:00 +01:00
javasabr
d468c20fba implemented LWJGL3 BufferAllocator 2016-12-30 11:33:23 +03:00
Rémy Bouquet
8d818a21bc Merge pull request #585 from grizeldi/patch-1
Added LSF to showcased games
2016-12-28 19:57:52 +01:00
grizeldi
4e84e805df Added LSF to showcased games 2016-12-28 17:30:43 +01:00
Paul Speed
d6130c07a0 Merge pull request #584 from mitm001/patch-1
Update AbstractAppState.java
2016-12-24 18:38:58 -05:00
mitm001
4a37ec467c Update AbstractAppState.java 2016-12-24 16:13:52 -07:00
Paul Speed
d8875a7898 Convert Skeleton and Bone over to use the JME cloner system for cloning...
this should do automatic fix-up and hopefully make bones attachments work
properly again in clones.
2016-12-13 06:04:21 -05:00
Ev1lbl0w
9455f51c93 Update TestColoredTexture.java 2016-12-11 20:55:45 +00:00
Ev1lbl0w
df240b6837 Update TestSceneWater.java 2016-12-11 20:55:12 +00:00
Ev1lbl0w
9bd3256c78 Update TerrainGridTest.java 2016-12-11 20:54:36 +00:00
Ev1lbl0w
70bccb1048 Update TerrainGridAlphaMapTest.java 2016-12-11 20:54:04 +00:00
Ev1lbl0w
990e6dd593 Update TestOnlineJar.java 2016-12-11 20:39:45 +00:00
Ev1lbl0w
1cf65d0d21 Update TestUrlLoading.java 2016-12-11 20:37:30 +00:00
Ev1lbl0w
5ed3292678 Update TestSceneLoading.java 2016-12-11 20:36:36 +00:00
appveyor
07e233647c [ci skip] bullet: update windows natives 2016-12-10 19:07:51 +00:00
Kirill Vainer
17d7134e2d bullet: enable upload for linux/mac 2016-12-10 14:05:05 -05:00
appveyor
2ec444f94e [ci skip] bullet: update windows natives 2016-12-10 18:58:44 +00:00
Kirill Vainer
1e15fe0f44 bullet: test mac native upload 2016-12-10 13:53:46 -05:00
empirephoenix
de1acb6a9b Merge pull request #576 from Fadorico/upstream
Write/read the width and height of a quad
2016-12-07 13:01:23 +01:00
empirephoenix
4663258904 Merge pull request #535 from papaspace/custom-blend-func
Added RenderState.BlendMode.Custom
2016-12-07 13:00:21 +01:00
empirephoenix
c5a24eb5f0 Merge pull request #559 from JavaSaBr/master-original
added supporting window icons ans OffscreenSurface context for LWJGL3
2016-12-05 11:25:45 +01:00
empirephoenix
2d6bfc3853 Merge pull request #571 from grizeldi/patch-1
Added cleanup for ChaseCamera
2016-12-05 11:25:13 +01:00
empirephoenix
0664e1d1b8 Merge pull request #567 from MeFisto94/FixDOMOutput
Fixes #566 - XML Serialization handles empty buffers properly now.
2016-12-05 11:23:42 +01:00
empirephoenix
63b0600b81 Merge pull request #572 from jMonkeyEngine/define_list_fix
Fix DefineList regression
2016-12-05 11:22:03 +01:00
Paul Speed
c7c239a56f Modified BitmapTextPage to always deep clone its mesh since otherwise
BitmapText objects end up sharing them and that's bad.
2016-12-04 20:35:57 -05:00
Paul Speed
4b78f099ca Broke out the Serializer's static initializer into a separate initialize()
static method.  This allows servers to completely reset the Serializer's
registry when restarting the server in the same JVM instance.
2016-12-04 16:28:03 -05:00
Paul Speed
f81c14de7c Another bitmap text clone fix. The text pages array (the list of the actual geometry of
the bitmap text) wasn't really being cloned... only the elements were.  This meant that
that a cloned BitmapText object would continue to share the meshes from the original.
2016-12-04 15:49:42 -05:00
Paul Speed
dbb1f14471 Another fix for BitmapText cloning where the regular clone() was
completely bypassing the JME cloner framework... and making a bad
clone.
2016-12-04 15:31:32 -05:00
Paul Speed
440096441d Fixed the cloned Letters to use the cloned StringBlock instead of the
original reference.
2016-12-04 14:24:45 -05:00
Paul Speed
157af24419 Added a test for cloning BitmapText. 2016-12-04 04:27:11 -05:00
Paul Speed
9fda417a66 Fix for issue #577 StringBlock cannot be cloned with the cloner because
it is package private and the cloner cannot instantiate one directly.
Since it is extremely unlikely (read: impossible) that there would ever
be shared StringBlock references between BitmapText objects then it is safe
to just clone it directly.
It is important to note that BitmapText never really did support clone
before and only pretended to... so this wasn't really a regression.
2016-12-04 04:24:57 -05:00
Fennel
54c854bec6 Fixes mouse cursor format for LWJGL3 2016-12-04 02:43:27 +01:00
javasabr
1f9a5cd028 for prev commit 2016-12-03 16:58:30 +03:00
javasabr
544d94aed7 implemented supporting the OffscreenSurface context. 2016-12-03 16:55:50 +03:00
javasabr
13eec17ddd Merge remote-tracking branch 'github/master' into master-original 2016-12-03 14:33:10 +03:00
javasabr
911b99330b Merge remote-tracking branch 'github/master' into master-original 2016-11-28 06:20:20 +03:00
javasabr
06258a6ddc fixed crashes 2016-11-28 06:19:52 +03:00
Kirill Vainer
f38ddadc5b upload_native: debugging on master branch 2016-11-27 16:21:15 -05:00
Kirill Vainer
da8b53d0a2 upload_native: always assemble native 2016-11-27 15:16:28 -05:00
travis-ci
f7c161562a [ci skip] bullet: update linux natives 2016-11-27 19:42:17 +00:00
appveyor
247bdf853e [ci skip] bullet: update windows natives 2016-11-27 19:41:14 +00:00
Kirill Vainer
1e06ad091a upload_native: final check 2016-11-27 14:38:38 -05:00
travis-ci
e557fb3fb0 [ci skip] bullet: update linux natives 2016-11-27 19:36:07 +00:00
Kirill Vainer
f60ffcc967 upload_native: final check 2016-11-27 14:32:21 -05:00
Kirill Vainer
dd812b17c5 upload_native: uncomment lines 2016-11-27 14:24:31 -05:00
travis-ci
e268c3b9fe upload_native: more debugging 2016-11-27 14:18:21 -05:00
appveyor
1fd9797007 [ci skip] bullet: update windows natives 2016-11-27 18:03:01 +00:00
Kirill Vainer
3cdb7fd928 bullet-native: move generate headers task 2016-11-27 12:59:59 -05:00
travis-ci
2e8d69f809 [ci skip] bullet: update osx natives 2016-11-27 17:07:29 +00:00
appveyor
ba0185c7bd [ci skip] bullet: update windows natives 2016-11-27 17:04:38 +00:00
Kirill Vainer
16695d444f travis: fix duplicate yml addons 2016-11-27 12:02:05 -05:00
appveyor
7fd022d06f [ci skip] bullet: update windows natives 2016-11-27 16:51:59 +00:00
Kirill Vainer
47c2396093 travis/appveyor: final test for auto-building 2016-11-27 11:48:57 -05:00
Kirill Vainer
f58242f285 Revert "travis: test mac native upload"
This reverts commit f5dbafe013023ad54eac5b1ccc34eb9fcb7a9a73.
2016-11-27 11:46:06 -05:00
Kirill Vainer
0cfb97359f Revert "travis: test mac native upload (2)"
This reverts commit 6e352bbf8a4e0df69f2dd4b1c5329237e504ed47.
2016-11-27 11:46:03 -05:00
Kirill Vainer
3acee58f73 travis: add github as known ssh host 2016-11-27 11:38:16 -05:00
Kirill Vainer
6e352bbf8a travis: test mac native upload (2) 2016-11-27 11:28:49 -05:00
Kirill Vainer
f5dbafe013 travis: test mac native upload 2016-11-26 00:47:34 -05:00
travis-ci
d831d7f010 [ci skip] bullet: update linux natives 2016-11-26 05:41:23 +00:00
appveyor
5971d2e122 [ci skip] bullet: update windows natives 2016-11-26 05:41:00 +00:00
Kirill Vainer
19c5c2df24 travis: set key permissions 2016-11-26 00:38:15 -05:00
Kirill Vainer
964e0017e9 travis: set git identity 2016-11-26 00:31:54 -05:00
Kirill Vainer
44bf751e35 travis: fix incorrect condition 2016-11-26 00:24:51 -05:00
appveyor
0881856647 [ci skip] bullet: update windows natives 2016-11-26 05:21:15 +00:00
Kirill Vainer
553757528f appveyor: trigger native build 2016-11-26 00:18:41 -05:00
Kirill Vainer
316bef252d appveyor: fix key decoding 2016-11-26 00:17:50 -05:00
Kirill Vainer
7555f8a817 appveyor: backslash -> fwdslash 2016-11-26 00:13:14 -05:00
Kirill Vainer
8b2b57f01c travis: test native upload 2016-11-26 00:10:30 -05:00
Kirill Vainer
8fedbab263 travis: add upload native check 2016-11-25 23:34:33 -05:00
appveyor
2b7b9dbe09 [ci skip] bullet: update windows natives 2016-11-26 03:38:17 +00:00
Kirill Vainer
73e102ea04 appveyor: fix syntax error 2016-11-25 22:35:31 -05:00
Kirill Vainer
d93dc0b175 appveyor: fix syntax error 2016-11-25 22:31:59 -05:00
Kirill Vainer
d8e15da671 appveyor: force rebuild 2016-11-25 22:26:38 -05:00
Kirill Vainer
b3ece636b6 appveyor: fix syntax error 2016-11-25 22:23:55 -05:00
Kirill Vainer
a784818211 Merge pull request #574 from jMonkeyEngine/cleanup_build_scripts_master
Improve build scripts (master)
2016-11-25 22:19:27 -05:00
Kirill Vainer
40e1e7f289 travis: add jdk7 build job 2016-11-25 22:14:25 -05:00
Kirill Vainer
cdb8200cfe build: don't build natives by default 2016-11-25 22:01:38 -05:00
Kirill Vainer
465c456ad3 appveyor: fix git commit failing 2016-11-25 21:54:06 -05:00
Kirill Vainer
d3ce5e408b travis: remove modifications for now 2016-11-25 21:51:51 -05:00
Kirill Vainer
e23b1c753f appveyor: fix syntax error 2016-11-25 21:44:10 -05:00
Kirill Vainer
aa8e3e5f28 appveyor: optimize build 2016-11-25 21:43:08 -05:00
Kirill Vainer
fe4dd1d8a6 Revert "[ci skip] update windows natives"
This reverts commit cfe8a000f10da99a9824c1d72cd9f4af82d598fc.
2016-11-25 21:40:36 -05:00
Kirill Vainer
fe1e54a609 appveyor: inital 2016-11-25 21:40:20 -05:00
appveyor
cfe8a000f1 [ci skip] update windows natives 2016-11-26 02:18:27 +00:00
Kirill Vainer
3d0bc770a1 Revert "adding cool file"
This reverts commit 54accb0885b336825a91afd93761fc9a5d7d78a1.
2016-11-25 21:04:56 -05:00
appveyor
54accb0885 adding cool file 2016-11-26 02:03:46 +00:00
Kirill Vainer
de4fa4b451 Revert "adding cool file"
This reverts commit ead49459a19978bf767326e11e4145a01b2f2ede.
2016-11-25 21:01:36 -05:00
appveyor
ead49459a1 adding cool file 2016-11-26 01:58:53 +00:00
Kirill Vainer
7f936fa29b travis: add build/upload task 2016-11-25 14:19:45 -05:00
Kirill Vainer
4f53351f76 version: fix small mistake 2016-11-25 14:04:56 -05:00
Kirill Vainer
fe0360f3fc appveyor: add support for build version 2016-11-25 13:58:44 -05:00
Kirill Vainer
d2a4a3fa87 build: use different bullet zip name 2016-11-25 13:43:35 -05:00
Kirill Vainer
f895d8815c build: upgrade to gradle 3.2.1 2016-11-25 13:06:20 -05:00
Kirill Vainer
0d2fdcf2ba native-bullet: unset toolchains 2016-11-25 00:15:17 -05:00
Kirill Vainer
bb8d40810a travis: include required g++-multilib 2016-11-25 00:11:06 -05:00
Kirill Vainer
55db5c1f74 travis: try ia32-libs this time.. 2016-11-24 23:11:58 -05:00
Kirill Vainer
0e8ce10293 travis: install missing libstdc++ for 32-bit 2016-11-24 22:59:24 -05:00
Kirill Vainer
316f55859c travis: install required multilib package 2016-11-24 22:54:22 -05:00
Kirill Vainer
aa02ca7dab build: enable native building by default 2016-11-24 22:46:45 -05:00
Fadorico
3b829c7365 Write/read the width and height of the quad 2016-11-24 18:11:25 -05:00
Kirill Vainer
efb0113570 Merge branch 'Java7+8-support' of https://github.com/shamanDevel/jmonkeyengine into cleanup_build_scripts_master 2016-11-24 15:59:43 -05:00
Kirill Vainer
956c2ec6a2 misc: gitignore update for gradle 3.2.1 2016-11-24 15:41:46 -05:00
Kirill Vainer
356b3d6726 build: fix gradle 3.2.1 deprecations 2016-11-24 15:41:46 -05:00
Kirill Vainer
36e9a0d1c6 travis: upload artifacts only on linux/jdk8 2016-11-24 15:41:46 -05:00
Kirill Vainer
0f7c12385a travis: reorder structure a bit 2016-11-24 15:41:46 -05:00
Kirill Vainer
91e7a8bce4 travis: fix unsupported jdk 2016-11-24 15:41:46 -05:00
Kirill Vainer
28ee71fe3d travis: test matrix build 2016-11-24 15:41:45 -05:00
Kirill Vainer
41a4a0279c version: remove sdk related configuration 2016-11-24 15:41:18 -05:00
Kirill Vainer
2712d80009 travis: remove uneeded install directive 2016-11-24 15:41:18 -05:00
Kirill Vainer
38b6eabdc7 cleanup build cache according to travis docs 2016-11-24 15:41:18 -05:00
Kirill Vainer
a7ef42ae89 build v3.1, master, and PRs only from now on
Developers should be using PRs instead of plain branches.
2016-11-24 15:41:16 -05:00
Kirill Vainer
73cb4f85ad remove SSH based maven publishing
The updates.jmonkeyengine.org server is no longer used.
2016-11-24 15:40:41 -05:00
Kirill Vainer
86f6f040e3 Fix #550 2016-11-23 21:05:20 -05:00
Kirill Vainer
a84c0eb25c add 0/0.0 param case to material test 2016-11-23 20:35:23 -05:00
Kirill Vainer
68b34037f8 define 0/0.0 int/float values in shader 2016-11-23 20:14:23 -05:00
empirephoenix
9856555074 Merge pull request #570 from TehLeo/master
Integer Texture Support
2016-11-22 11:20:38 +01:00
Nehon
11562f88cf Fixed shadow fade and zfar computation as it was breaking shadow border filtering. 2016-11-20 23:55:06 +01:00
Nehon
35de6d9fda Fixed an issue where some occluders were wrongly culled out from the shadow map at very steep light angle, and when the view cam was almost align with light direction. 2016-11-20 19:02:02 +01:00
Paul Speed
ed817507d4 Improved the "compare result changed" error message to include the most
likely cause of the error.
2016-11-20 07:14:49 -05:00
grizeldi
da3463405a Added cleanup 2016-11-19 17:57:17 +01:00
empirephoenix
7958ae2f46 Merge pull request #561 from shamanDevel/FixFor#503
#503 fixed
2016-11-17 08:52:23 +01:00
Michael Braunstingl
67881b1e01 Two changes:
1. GL_DST_ALPHA and GL_ONE_MINUS_DST_ALPHA were moved from GL3 to GL.
2. I reverted to the previous switch/case statements in
GLRenderer.convertBlendFunc(BlendFunc).
2016-11-14 23:06:01 +01:00
Michael Braunstingl
ca17bd592a Removed the switch/case statements in convertBlendFunc() by extending
the BlendFunc enumeration with a convenience integer value.
2016-11-14 10:10:19 +01:00
Michael Braunstingl
187e9944fd Added the BlendFunc enums in RenderState and updated the GLRenderer
accordingly.
2016-11-13 22:44:16 +01:00
TehLeo
7ed61854df Update Caps.java 2016-11-12 18:52:36 +01:00
TehLeo
85f1e6ab46 Update GLRenderer.java 2016-11-12 18:51:14 +01:00
TehLeo
7693e785c2 Update Image.java 2016-11-12 18:50:05 +01:00
TehLeo
d90ee201da Update GLImageFormats.java 2016-11-12 18:48:13 +01:00
TehLeo
af11f870f1 Update GL3.java 2016-11-12 18:47:09 +01:00
Nehon
78fa00bedf Changed the minimum value of a float when converting it to half float. It was 5.96046E-8f and it's now 3.054738E-5f. This values seems to be the lowest one before 0 when converting back half to float.
This issue has been revealed in this post https://hub.jmonkeyengine.org/t/pbr-nan-to-half-conversion-errors/37219
The bad minimum was causing erratic data being wrote to the texture when the value was very close to 0, and causing the glitches and even crashes when color values were given as Float.Infinity or Float.NaN.
2016-11-04 20:08:44 +01:00
Nehon
3205b8be35 Added an option to display the generated maps on screen in the TestPBRLighting 2016-11-04 20:04:22 +01:00
Nehon
bc86161831 fixed some javadoc in AbstractShadowRenderer 2016-11-04 16:59:07 +01:00
Nehon
17a853e3a8 Fixed post shadow filter for glsl1.5 2016-11-02 09:58:24 +01:00
Nehon
584b822eb7 Defaulted the render back faces shadows in the AbstractShadowRenderer to true to keep the same behavior as in 3.0 2016-11-02 09:24:17 +01:00
MeFisto94
10a80b4352 Fixes #566 - XML Serialization handles empty buffers properly now. 2016-10-31 10:24:25 +01:00
Nehon
ad6da79ad1 Fixed the link to the paper for convertHalfToFloat 2016-10-30 09:45:23 +01:00
Nehon
81830c4146 ShaderNodes now move all the declared extensions at the top of the generated shader source 2016-10-09 20:12:39 +02:00
Nehon
9cf67b902e Fixed SpotLight constructor to properly compute the invSpotRange see https://github.com/jMonkeyEngine/jmonkeyengine/issues/563 2016-10-09 10:00:28 +02:00
Rémy Bouquet
be6d2765e3 Added a setLocalTranslation and setLocalScale to the Bone class. Similarly to setLocalRotation it only works when userControl is set to true and fails otherwise.
Also I changed how the value is set (with a set(...)) because it was assigning the passed parameter to the local instance of the transform.
2016-10-06 09:45:37 +02:00
Nehon
cd70630502 Changed the order of import of the PBR.glsllib in the PBR material as it enables the texture lod extension and this fails on some GPU when it's not at the beginning of the shader. 2016-10-03 23:39:07 +02:00
Nehon
cf6951af34 MikktSpace tangent generator now properly generates the BindPoseTangent buffer when necessary 2016-10-03 23:31:24 +02:00
Sebastian Weiß
2e58f2774c #503 fixed 2016-09-28 08:19:04 +02:00
Sebastian Weiß
cbb9014028 added conditional include of lwjgl3 if java8 is supported; edited .travis.yml so that the project is compiled against multiple jdks 2016-09-28 08:01:22 +02:00
javasabr
ddfa6e703a updated the window implementation 2016-09-27 20:41:23 +03:00
javasabr
190f30afe5 added supporting window icons for LWJGL3 2016-09-27 06:54:35 +03:00
Kirill Vainer
903522de91 Merge pull request #549 from shamanDevel/LWJGL3-update
Lwjgl3 update from 3.0.0b to 3.0.0
2016-09-26 23:36:13 -04:00
Rémy Bouquet
c50b4dbeaa Merge branch 'master' of https://github.com/jMonkeyEngine/jmonkeyengine
# By Nehon (2) and others
# Via GitHub (7) and Nehon (1)
* 'master' of https://github.com/jMonkeyEngine/jmonkeyengine:
  Clean up in the PBR j3md file to remove warnings
  Fix for #502
  Minor fix in javadoc for Camera.java class
  minor cleanup in GLRenderer
  fixed missing Cloneable in the Triangle.
  Fix for MTR Framebuffers
  fixed a typo
  Using LegacyApplication in the iOS Harness just like it has been done for Android in 3c56afe
  Fixed wrong alpha handling in the pbr shader
  Added a cursor cache to avoid cursor disappearing and app crashing when too many cursors are created
2016-09-22 09:09:00 +02:00
Rémy Bouquet
907ee122a1 Fixed wiki links in the realm.md 2016-09-22 09:08:53 +02:00
Nehon
f642e56517 Clean up in the PBR j3md file to remove warnings 2016-09-18 15:25:00 +02:00
Rémy Bouquet
445f7ed010 Merge pull request #557 from shamanDevel/FrameBuffer.addColorBuffer(Image.Format)
Fix for #502
2016-09-16 10:19:28 +02:00
Sebastian Weiß
97cac35105 Fix for #502 2016-09-16 09:42:57 +02:00
Paul Speed
9e5d9613ec Merge pull request #556 from Ali-RS/master
Minor fix in javadoc for Camera.java class
2016-09-15 01:59:38 -04:00
Ali-RS
8937e93cce Minor fix in javadoc for Camera.java class 2016-09-15 09:41:04 +04:30
Kirill Vainer
86c2c7f341 minor cleanup in GLRenderer 2016-09-14 19:11:14 -04:00
Sebastian Weiß
4e79ccfa68 changed source compatibility only for lwjgl3 2016-09-12 10:19:01 +02:00
Kirill Vainer
c872cb2fdb Merge pull request #555 from JavaSaBr/master-original
fixed missing Cloneable in the Triangle.
2016-09-11 20:31:19 -04:00
Kirill Vainer
eadec4c5ad Merge pull request #554 from TehLeo/patch-2
Fix for MTR Framebuffers
2016-09-11 15:01:56 -04:00
javasabr
651c3cc29e fixed missing Cloneable in the Triangle. 2016-09-11 13:50:52 +03:00
TehLeo
28281f7962 Fix for MTR Framebuffers
The problem: Happens with two MTR framebuffers with same number of color attachements.
If we set a frame buffer frame1, then later frame2.
r.setFrameBuffer(frame1);
r.setFrameBuffer(frame2);
Frame2 buffer will not output to multiple targets. Only its first target will be rendered.
This patch fixes that problem.
2016-09-10 20:33:50 +02:00
empirephoenix
c947e12bfd Merge pull request #551 from Ali-RS/master
fixed a typo
2016-09-06 15:37:02 +02:00
Ali-RS
bdd15b7f3e fixed a typo 2016-09-06 17:12:43 +04:30
shaman
309f751c4d Maybe fixed 'warning: [options] bootstrap class path not set in conjunction with -source 1.7' 2016-09-06 08:58:43 +02:00
empirephoenix
aa839beb71 Merge pull request #543 from tonihele/issue-537-master
Added a cursor cache to avoid cursor disappearing and app crashing wh…
2016-09-05 16:03:59 +02:00
shaman
26be6d896c Updated .travis.yml to build against Java8 instead of Java7 2016-09-04 14:24:36 +02:00
Sebastian Weiß
ed68a7b749 fixed formatting 2 2016-08-27 08:45:42 +02:00
Sebastian Weiß
dccec876c5 fixed formatting 2016-08-26 20:39:52 +02:00
Sebastian Weiß
e8f76d43fe implemented all changes regarding OpenCL (and some missing stuff) 2016-08-26 14:40:44 +02:00
Sebastian Weiß
e40ebdc5c6 updated GL and AL 2016-08-26 12:39:08 +02:00
Sebastian Weiß
6ad6f658b0 updated lwjgl version to the 3.0.0 release 2016-08-26 12:38:43 +02:00
Rémy Bouquet
977610bbd7 Merge pull request #546 from MeFisto94/ios-legacyapplication-master
Using LegacyApplication in the iOS Harness
2016-08-20 11:59:10 +02:00
MeFisto94
0262b72258 Using LegacyApplication in the iOS Harness just like it has been done for Android in 3c56afe 2016-08-20 11:28:04 +02:00
Nehon
9665b985e4 Fixed wrong alpha handling in the pbr shader 2016-08-19 10:54:30 +02:00
Rémy Bouquet
2c388e489a null check on the lightList in SinglePassAndImageBasedLightingLogic.makeCurrent. as it may be null when you preload 2016-08-14 14:09:55 +02:00
Rémy Bouquet
beb5033747 added GLSL compat to the pbr shader 2016-08-14 11:09:18 +02:00
Rémy Bouquet
5aa8af28cd fixed Lod functions overload in GLSLCompat lib 2016-08-14 11:03:48 +02:00
Rémy Bouquet
85c119c132 Changed the way IBL is switched on and off in the PBR shader and in the technique def logic because the old way was causing some issues on mac... for some unknown reason.
Now it's toggled on and off with a define, but there might still be some issues on mac when there are several lighting passes.
2016-08-14 10:57:42 +02:00
Rémy Bouquet
8f701460aa used enable instead of require for the textureCubeLod extension 2016-08-14 08:47:57 +02:00
Rémy Bouquet
aeb4daf04f Fixed some issue with textureCubeLod in the PBR shader with early versions of glsl 2016-08-14 00:56:00 +02:00
Rémy Bouquet
662a0151e2 fixed glsl 1.0 version of the postShadowFilter shader 2016-08-12 20:51:56 +02:00
Rémy Bouquet
68c082c13d fixed transparent shadows on mac. 2016-08-12 18:25:09 +02:00
Rémy Bouquet
7efbccfe4d Changed the int value of EdgeFilteringMode.Nearest from 0 to 10 as it seems a define with a 0 value is now ignored. 2016-08-12 14:30:50 +02:00
Toni Helenius
f2384c8063 Added a cursor cache to avoid cursor disappearing and app crashing when too many cursors are created 2016-08-10 20:02:34 +03:00
empirephoenix
671be243b0 Merge pull request #540 from oOMoeOo/master
Removed Sysout-Calls in AwtPanel (Issue #539)
2016-08-07 16:56:38 +02:00
Julien Gouesse
d0f0cfe5e7 Fixes a spelling mistake in the reflection allocator 2016-08-07 15:00:07 +02:00
Julien Gouesse
f820bbfd94 Fixes the reflection allocator with Java 9, tested with Java 9 Early Access build 129 and OpenJDK 1.8.0 update 101 2016-08-07 14:31:43 +02:00
Nehon
e89e0e7c12 Added a way to approximate the normals for the SSAO filter instead of rendering an additional geometry pass. 2016-08-06 15:16:29 +02:00
Markus Uhlig
eaa9858b18 - Replaced console outputs by the standard java logging concept and removed obsolete Sysout-Calls.
- No functional changes.
- added missing override tags.
2016-08-04 11:11:30 +02:00
empirephoenix
46891b32c6 Merge pull request #510 from bertleft/master
Bugfix: Native Point2PointJoint.createJoint() incorrectly allocates btHingeConstraint
2016-07-26 16:38:17 +02:00
Kirill Vainer
651753c4d3 Merge pull request #533 from empirephoenix/master
BufferAllocator Round 2
2016-07-26 10:28:48 -04:00
Kirill Vainer
94c368aa42 Merge pull request #528 from riccardobl/bullet2.83.7
Update to Bullet 2.83.7
2016-07-26 10:27:46 -04:00
Riccardo Balbo
e602ed651a Remove commented/unused code. 2016-07-26 15:12:13 +02:00
Michael Braunstingl
6728ac1115 Corrected parenthesis bug. 2016-07-24 19:57:22 +02:00
Michael Braunstingl
1bbe34160c Corrected the bug in RenderState.toString() 2016-07-24 17:16:29 +02:00
Michael Braunstingl
d39b780fa5 Added RenderState.BlendMode.Custom
BlendMode.Custom allows glBlendFuncSeparate() calls.
2016-07-24 12:40:45 +02:00
Kirill Vainer
4f41a28a8c Merge pull request #527 from shamanDevel/OpenCL2
OpenCL for jME3 - some missing features
2016-07-23 11:36:15 -04:00
Riccardo Balbo
6b1656f337 Compile with Ofast and disable _FORTIFY_SOURCE 2016-07-22 11:51:19 +02:00
Kai Boernert
b4c6febe4c whitespace tab to 4spaces formating only change
Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
2016-07-21 17:17:34 +02:00
Kai Boernert
846232063c whitespace tab to 4spaces formating only change
Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
2016-07-21 09:45:41 +02:00
Kai Boernert
810a4c3350 fix for wrongly marking as used, thanks to AlrikG for finding this
Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
2016-07-20 10:46:37 +02:00
empirephoenix
5e04039390 Merge pull request #2 from empirephoenix/revert-1-BufferAllocator
Revert "jemalloc allocator and reflection allocator fix"
2016-07-20 10:40:42 +02:00
empirephoenix
85d62d44aa Revert "jemalloc allocator and reflection allocator fix" 2016-07-20 10:35:41 +02:00
Rémy Bouquet
0299e401cc Merge pull request #531 from riccardobl/pr190716
Use texture() instead of texture2D() in bloomExtract15 and bloomFinal15
2016-07-19 18:35:42 +02:00
Riccardo Balbo
62d92d75ca Use texture() instead of texture2D() in bloomExtract15 and bloomFinal15 2016-07-19 12:40:16 +02:00
empirephoenix
54c04ce23e Merge pull request #1 from AlrikG/BufferAllocator
jemalloc allocator and reflection allocator fix
2016-07-16 01:24:45 +02:00
Alrik
dea6f6ab1c - fix ReflectionAllocator use wrong buffer allocator to initialize
- add jemalloc allocator
2016-07-15 11:27:37 +02:00
Rémy Bouquet
a1b785a84c Merge pull request #529 from tiatin/FilterPostProcessorImageFormat
Added ability to set framebuffer image format used in FilterPostProce…
2016-07-13 23:01:11 +02:00
tiatin
c9b5f9eb59 Added ability to set framebuffer image format used in FilterPostProcessor.
https://hub.jmonkeyengine.org/t/ability-to-change-image-format-for-filterpostprocessor/36379
2016-07-13 21:49:24 +03:00
Riccardo Balbo
2958fc53d7 Disable buildNativeProjects 2016-07-13 17:22:49 +02:00
Riccardo Balbo
7f87a92c72 Bullet: Remove multithread support that is not available anymore. And was never used by the engine in the first place. 2016-07-13 17:20:48 +02:00
Riccardo Balbo
e5747c2faa Update bullet to 2.83.7 2016-07-13 17:20:42 +02:00
Kai Boernert
4b5c945d80 Fix for travis 2016-07-09 12:14:22 +02:00
Kai Boernert
c71d87ed71 Extracted an Allocator interface for DirectByteBuffers
Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
2016-07-09 12:06:39 +02:00
Kai Boernert
bc701c174b Extracted an Allocator interface for DirectByteBuffers
Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
2016-07-09 12:04:42 +02:00
Kai Boernert
848a9217d0 Extracted an Allocator interface for DirectByteBuffers
Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
2016-07-09 11:57:03 +02:00
Nehon
201010b6f0 fixed a merge issue in the previous bomb merge 2016-07-07 20:48:13 +02:00
Nehon
16023fa481 PBR has come
Merge branch 'PBRisComing'

# Conflicts:
#	jme3-core/src/main/java/com/jme3/material/Material.java
#	jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java
2016-07-07 20:36:31 +02:00
Nehon
67fb8fc812 Fixed an issue in SinglePAssAndLightBasedLogic where texture units were not properly assigned 2016-07-07 19:53:59 +02:00
Rémy Bouquet
84b2f67393 Merge pull request #501 from MeFisto94/HwSkinningFixV02
Fixes #499: Fix Hardware Skinning in 3.1
2016-07-04 07:44:44 +02:00
Julien Gouesse
c591bd368c Merge pull request #519 from saloisio/master
NewtMouseInput no longer auto-centers mouse cursor
2016-06-30 17:41:29 +02:00
saloisio
e187cb7e9b Merge branch 'master' of https://github.com/saloisio/jmonkeyengine 2016-06-30 10:39:03 -04:00
saloisio
76cbd45784 Removed auto-centering of mouse cursor 2016-06-30 10:35:21 -04:00
Paul Speed
3f7f9b125d Merge pull request #515 from tiatin/iterator-garbage-collection-improvement
Garbage collection and list iteration improvements
2016-06-26 21:47:47 -04:00
empirephoenix
c288d7427a Merge pull request #514 from NemesisMate/patch-9
userdata to null again once all data is removed.
2016-06-26 21:51:29 +02:00
tiatin
8e8186de0a Changed overrides from ArrayList to SafeArrayList for GC and iteration performance reasons. Fixed bug in SafeArrayList.equals(). 2016-06-26 12:31:34 +03:00
tiatin
b524dcd66d Added iteration using iterator, if List is not ArrayList.
Reason for this is that if List is LinkedList, complexity for get(int i) is O(n/4).
2016-06-25 18:15:03 +03:00
tiatin
9c669547ab Changed iteration over List from for-each to manual iteration.
For-Each loop creates Iterator object and uses hasNext and next methods, which are slower, than manual iteration. Also allocating Iterator object increases work for GC.

Forum post: https://hub.jmonkeyengine.org/t/iteration-over-list-performance-improvement/36250

See test 9 for more details: http://www.devahead.com/blog/2011/12/coding-for-performance-and-avoiding-garbage-collection-in-android/
2016-06-25 15:45:24 +03:00
NemesisMate
ce82a8a7b9 improved the setUserData method. 2016-06-25 11:16:46 +01:00
Rémy Bouquet
664ea53cc6 Merge pull request #513 from riccardobl/PBRisComing
Fix npe
2016-06-23 22:53:30 +02:00
Riccardo Balbo
f3319d3fd6 Fix npe 2016-06-23 22:05:05 +02:00
NemesisMate
cdc708dcda userdata to null again once all data is removed. 2016-06-23 16:57:06 +01:00
empirephoenix
e2b6c51730 Merge pull request #511 from empirephoenix/master
Finally fixing this
2016-06-22 16:18:57 +02:00
empirephoenix
e4840e2e9f Merge pull request #512 from riccardobl/pr200616
Removed warning if scale=1,1,1 in CylinderCollisionShape
2016-06-21 15:32:13 +02:00
Riccardo Balbo
56558841e7 CylinderCollisionShape: don't print warning if scale = 1,1,1 2016-06-21 14:56:33 +02:00
shamanDevel
a8d77a7cd1 OpenCLObject.register() now returns this.
This allows to chain the register method like kernel=program.createKernel("ScaleKernel").register(); or testBuffer=clContext.createBuffer(1024).register();
2016-06-19 18:30:31 +02:00
shamanDevel
46db6d95f8 Added getter method for the device associated with a command queue 2016-06-19 18:06:00 +02:00
shamanDevel
eb07d69cd8 missing toString() methods added 2016-06-19 13:26:26 +02:00
Kai Boernert
22db3212e1 Finally fixing this
https://hub.jmonkeyengine.org/t/jmonkey-3-1-native-bullet-bug/33595/3
http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?p=12158&f=9&t=

Signed-off-by: Kai Boernert <kai-boernert@visiongamestudios.de>
2016-06-13 13:06:35 +02:00
Albert Santos
03318a6766 Fixed Point2PointJoint.createJoint() incorrectly creating btHingeConstraint
Replaced it with btPoint2PointConstraint.
2016-06-12 09:47:34 -04:00
empirephoenix
65164e2075 Merge pull request #507 from jjYBdx4IL/master
fixes issue https://github.com/jMonkeyEngine/jmonkeyengine/issues/506…
2016-06-11 17:16:10 +02:00
jjYBdx4IL
a20a84cf42 fixes issue https://github.com/jMonkeyEngine/jmonkeyengine/issues/506 : Material->toString() does not prevent/check for possible NPEs 2016-06-07 23:42:29 +02:00
empirephoenix
6e8ba0f877 Merge pull request #500 from shamanDevel/PreOrderTraversal
added a pre-order traversal of the scene graph
2016-06-05 11:49:37 +02:00
Nehon
619a323b9d Fixed an issue when resizing the viewport, with a FPP and antialiasing would stop rendering 2016-06-02 18:53:59 +02:00
empirephoenix
fbf2dd4497 Merge pull request #494 from shamanDevel/OpenCL
OpenCL for jME3
2016-05-28 18:38:47 +02:00
shamanDevel
a834a4dad6 added test for multiple parallel applications: multiple OpenCL contexts do not work 2016-05-27 11:48:24 +02:00
shamanDevel
dcdcbc3a97 added test for context switching.
Changing the OpenCL platform and device by restarting the application works.
2016-05-27 10:32:49 +02:00
MeFisto94
9e187647d0 Fix Hardware Skinning in 3.1 by implementing proper Array Serialization for MatParams and making the Shared Materials Check only a warning (it would pop up once each time you load the j3o and if you really use Shared Materials you have weird animations and some log spamming) 2016-05-25 17:40:00 +02:00
shamanDevel
66b8447caa Added pre-order traversal as an alternative to the default post-order depth first search traversal 2016-05-25 13:58:30 +02:00
shamanDevel
e5e5128a65 Fixed Program.getBinary() for LWJGL3 2016-05-25 13:29:49 +02:00
shamanDevel
dd22ebefdd Implemented Program.getBinary() with Jocl.
The program cache now also works with Jocl.
Thanks to @gouessej for his help.
2016-05-23 08:07:42 +02:00
empirephoenix
65fd7425fa Merge pull request #497 from NemesisMate/patch-7
Ordering + raw methods instead of reversing.
2016-05-22 17:21:59 +02:00
William Linna
c85fd3fe26 Add/remove all PhysicsControls even when a RigidBodyControl is present 2016-05-21 23:26:56 +03:00
NemesisMate
8a058c61f1 Changed LinkedList for ArrayList in rayTests 2016-05-20 10:00:08 +01:00
Nehon
60a031dc02 Fixed an issue in the fog filter's shader that was preventing it to run on android 2016-05-19 18:54:57 +02:00
NemesisMate
3b0e0766c5 Oops! 2016-05-19 11:47:06 +01:00
NemesisMate
4cd424ad03 Ordering physics rayTest returned list instead of reversing it.
Added raw results ray tests too.
2016-05-19 11:25:19 +01:00
Julien Gouesse
5a5ffdc2ae First attempt of fix for the issue #490 2016-05-18 21:11:51 +02:00
empirephoenix
2c1fd47a67 Merge pull request #477 from riccardobl/fix_topic35663_issue
Ogre importer: Fix for material sharing
2016-05-18 11:41:52 +02:00
jmekaelthas
93080f506a Bugfix: fixed a bug that caused some models to be half-transparent when
it was not needed.
2016-05-17 19:29:24 +02:00
Rémy Bouquet
334cad4657 proper equal and hashcode for ShaderNodesVariables. 2016-05-15 09:00:54 +02:00
Rémy Bouquet
ba92462521 Merge pull request #495 from Dokthar/typo_fix
That's not those typos you're looking for....
2016-05-12 18:31:55 +02:00
Dokthar
63fb53f6e4 more typo ... ytpo ytop opyt ;) 2016-05-11 23:50:34 +02:00
Dokthar
a52a51cb27 typo fix in materials & shaders, also fix some javadoc 2016-05-11 22:56:57 +02:00
shamanDevel
bd491dc416 removed fixmes 2016-05-11 09:48:45 +02:00
shamanDevel
e32ebe11bb fixed context creation for LWJGL3 2016-05-11 09:42:11 +02:00
shamanDevel
732e75fba6 fixed unmapping of buffer objects and an error in setArg in Lwjgl3's Kernel 2016-05-11 09:19:30 +02:00
shamanDevel
250c871cab Added a library for Matrix4f 2016-05-11 09:02:50 +02:00
iwgeric
898079eded Android-Examples: update doc 2016-05-10 22:44:49 -04:00
iwgeric
5117d108e6 Android-Examples: Fix doc for test case 2016-05-10 22:22:48 -04:00
Nehon
5de286e291 Better j3md export test 2016-05-10 17:45:54 +02:00
shamanDevel
4e55e0e5a0 added library for Matrix3f, fixed some bugs 2016-05-10 14:55:42 +02:00
Nehon
8d01c5a26f MatDef is not Savable anymore. Kind of reverted previous commit and implemented and very straight forward exporter for J3mds that doesn't use the Savable process of jme3 since it's designed to save the whole graph and not only subparts of it like materials and material defs. The API stays the same though 2016-05-10 13:06:04 +02:00
shamanDevel
c162d474c7 added matrix support for kernel arguments (mapped to float16) 2016-05-10 07:26:22 +02:00
shamanDevel
44899098e2 added dependency resolving and a random number library 2016-05-09 17:43:49 +02:00
Nehon
81053352ac initial and partial implementation of a j3md exporter with test 2016-05-09 17:08:32 +02:00
Nehon
0e064e2d6a MaterialDef is now savable 2016-05-09 17:08:32 +02:00
shamanDevel
9a3dce2fb3 OpenGL/CL sharing is not working with lwjgl3. It seems that the context is set up the wrong way.
For now, disable the sharing methods.
Also retrieving the program binaries is disabled, the current implementation would throw a segfault.
2016-05-09 07:55:46 +02:00
iwgeric
d1fc89e155 Android-Examples: Add new test case for testing Mouse, Touch, and Key Events. 2016-05-08 23:13:49 -04:00
iwgeric
7b133bb452 Android-Examples: Add KeepScreenOn property to layout of test activity. 2016-05-08 23:12:05 -04:00
shamanDevel
5e098b0493 worked on LWJGL3 support 2016-05-08 17:05:43 +02:00
shamanDevel
e35bb7dcbc added a constructor that disables the program cache: used during development 2016-05-05 19:49:51 +02:00
iwgeric
1e4c378a06 android-examples: reduce logging level for test chooser 2016-05-04 23:39:12 -04:00
Kirill Vainer
3078f2ad22 Merge pull request #491 from riccardobl/AddGimpactCollisionAlgo
Fix GImpact passing through other shapes.
2016-05-04 13:50:47 -04:00
Kirill Vainer
0c32c24e5e bullet native: fix mingw target platform 2016-05-04 13:17:47 -04:00
Kirill Vainer
8804edf396 Merge pull request #488 from GreenCubes/master
Reworked original FBX importer
2016-05-03 22:46:54 -04:00
Kirill Vainer
b01d356ee4 niftygui: add nifty repository to POM 2016-05-03 22:34:51 -04:00
iwgeric
cbedf5ef08 Add test case for using Android Sensors as Joystick Axes (including rumble). 2016-05-03 22:02:31 -04:00
iwgeric
df30846496 Remove border from jme fragment 2016-05-03 20:11:14 -04:00
iwgeric
13a0d36b56 Remove unused lights 2016-05-03 20:10:54 -04:00
iwgeric
1ff8e3b66b Add icon for Show Keyboard Menu and enable it in Menu 2016-05-03 18:14:58 -04:00
iwgeric
8f9cd92f99 Change Menu items on Main Activity to all be inside Menu dropdown. 2016-05-03 17:51:34 -04:00
iwgeric
fd98c6b8f0 Improve some error handling on class name searching 2016-05-03 17:50:56 -04:00
iwgeric
b7b1947486 Add Menu item for display of Soft Keyboard in Android Examples.
Useful when running tests that include using a key to initiate some action.
2016-05-03 17:50:08 -04:00
iwgeric
1e23cfcb0a Add Menu to Test Chooser Activity.
Provides way to enable/disable the following when starting a test:  Mouse Events, Joystick Events, Key Events, Verbose Logging.
2016-05-03 16:42:27 -04:00
iwgeric
e5c6673df1 Update Android Plugin for Gradle to version 2.1.0.
Upgrade of gradle to 2.13 was causing some issues.
2016-05-03 13:15:40 -04:00
iwgeric
d410e0cb55 Merge remote-tracking branch 'origin/master' 2016-05-02 23:18:45 -04:00
iwgeric
8c08010233 Add test for assets stored in drawable / mipmap directories and add verbose logging menu option support.
Still need to add the menu to the layout file for the MainActivity.
2016-05-02 23:18:15 -04:00
iwgeric
c219ce1b4f Update AndroidLocator to allow assets to be stored in Android assets, drawable, or mipmap directories.
Texture assets can now be stored in Android Drawable and Mipmap directories.  Allows Android to automatically select the closest matching image asset for the actual device configuration (ie. lower resolution textures for lower-end devices).  Search order is:  assets -> drawable -> mipmap.  First match found is returned.
2016-05-02 23:14:26 -04:00
iwgeric
b53de6aedc Remove tests from jme3-android.
Android specific tests are to be included in jme3-android-examples.  Non-Android specific tests are imported from jme3-examples.
2016-05-02 22:13:14 -04:00
shamanDevel
a2df82b9e0 implemented a cache for program objects 2016-05-02 21:39:27 +02:00
shamanDevel
efef3d54e1 Querying the program binaries won't be supported by the Jocl binding.
See the comments inside JoclProgram.getBinary for the reason.
2016-05-02 20:58:39 +02:00
shamanDevel
22307257e0 added querying of the program binaries and building the programs from these binaries.
TestVertexBufferSharing shows how this is used to build a simple program cache.
2016-05-02 20:57:28 +02:00
shamanDevel
54113f35e0 added alternative versions for kernel launches and resource acquiring that do not return an event. This improves the performance. 2016-05-02 14:21:02 +02:00
shamanDevel
4be6013068 reworked releasing system.
Now one has to either release a native OpenCLObject manually with release() or register it for automatic garbage collection using register().
These changes greatly improve the performance by reducing the load on the OpenCLObjectManager.
2016-05-02 08:30:00 +02:00
shamanDevel
a26e526945 Added an experimental Jocl binding.
Note that Jogamp's Jocl only supports OpenCL1.1, some methods will throw an UnsupportedOperationException.
2016-05-01 18:38:48 +02:00
Kirill Vainer
f4f65620ec travis: set known hosts using travis config 2016-04-30 18:58:17 -04:00
Kirill Vainer
4aa614108e pom: fix incorrect inception year 2016-04-30 18:01:02 -04:00
Kirill Vainer
7fdc49e1e3 travis: only create dist if deploying 2016-04-30 17:52:38 -04:00
Kirill Vainer
dd816a02a0 travis: use cache rules from docs 2016-04-30 17:48:25 -04:00
Kirill Vainer
cd0893005a build: fix build error 2016-04-30 17:39:04 -04:00
Kirill Vainer
5d2cee0187 build: update to gradle 2.13 2016-04-30 17:26:55 -04:00
Kirill Vainer
deb3f21b7e travis: dont cache netbeans folder anymore 2016-04-30 17:23:16 -04:00
Kirill Vainer
c843721806 build: check file exists before getting text 2016-04-30 17:20:27 -04:00
Kirill Vainer
d6ffa4e9ff build: minor cleanup 2016-04-30 17:16:09 -04:00
Kirill Vainer
311ea2692f android-examples: use correct maven group 2016-04-30 17:15:37 -04:00
Kirill Vainer
74e398342f build: only update version file when it changed
Avoids recompiling jme3-core on every build
2016-04-30 17:15:03 -04:00
iwgeric
c320c919a5 Add test cases from jme3-examples module.
Must run jme3-examples.build task first in order to create the jme3-examples.jar file.  If this is not done, only the test classes from jme3-android will be included.
2016-04-29 18:02:37 -04:00
iwgeric
dea0f5fd6d Update passing parameters from test chooser to test activity/fragment. 2016-04-29 17:21:38 -04:00
Riccardo Balbo
eee51f39f9 Add GImpact collision algorithm to physics spaces 2016-04-29 14:33:13 +02:00
iwgeric
c04e162c2c Initial Commit for Android Examples Module
Module to run jME3 tests on Android platform.  Test cases are copied in from the jme3-android project and the jme3-examples.
2016-04-28 22:19:44 -04:00
shamanDevel
7fc7402855 changed author name 2016-04-27 10:30:35 +02:00
shamanDevel
1093c639eb finished documentation 2016-04-27 09:03:45 +02:00
Kirill Vainer
1515c14e46 build: change master version to 3.2 2016-04-26 20:09:16 -04:00
jmekaelthas
dfd1c26bba Merge branch 'master' of https://github.com/jMonkeyEngine/jmonkeyengine.git 2016-04-26 21:28:43 +02:00
jmekaelthas
2024fe7acf Reduced the amount of warnings being logged during mesh triangulation.
The warnings are now collected and displayed only once for each mesh
they appear in.
2016-04-26 21:28:15 +02:00
Eirenliel Allier
681b2101dc Fix building with JRE 1.7 2016-04-26 11:21:34 +03:00
shamanDevel
510c40955f some more documentation 2016-04-26 10:16:48 +02:00
Eirenliel Allier
794932104b Fix compatibility with Java 7 2016-04-26 11:12:37 +03:00
Eirenliel Allier
4b6be2a789 FBX Importer cleanup 2016-04-26 10:16:03 +03:00
Eirenliel Allier
f65dd517c9 Reworked original FBX importer 2016-04-26 10:10:26 +03:00
iwgeric
8899bec0cb Update native libraries 2016-04-25 23:07:14 -04:00
iwgeric
b7efc437be Move files to build directory
Move the downloaded files to build directory and moved the unzip folder to the build directory so that they are ignored by git and cleaned appropriately.
2016-04-25 23:07:14 -04:00
iwgeric
3e122c9685 Update OpenALSoft native libraries 2016-04-25 23:07:14 -04:00
iwgeric
adc7ad757e Move OpenALSoft source files to build directory
Move the zip file downloaded from OpenALSoft and the extraction folder to within the build folder so that are ignored by git and cleaned appropriately.
2016-04-25 23:07:14 -04:00
Paul Speed
7c74262087 Merge pull request #486 from Dokthar/joysticks
Joystick detection on linux and more...
2016-04-25 17:51:35 -04:00
shamanDevel
ee43853ff1 docs, docs, docs 2016-04-25 16:33:10 +02:00
shamanDevel
196cbc8042 started with the documentation 2016-04-24 20:13:51 +02:00
shamanDevel
03282a7c86 added example for vertex buffer sharing 2016-04-24 14:09:09 +02:00
shamanDevel
60f10bb604 renamed DefaultPlatformChooser and moved it to the core, some small fixes 2016-04-23 14:40:48 +02:00
shamanDevel
0c47bf18c9 added memory managing: native resources are now automatically released 2016-04-23 14:18:46 +02:00
shamanDevel
0d003275a7 implemented image sharing and added julia set testcase 2016-04-22 21:12:10 +02:00
shamanDevel
d36c957f5e implemented image operations 2016-04-22 16:11:55 +02:00
shamanDevel
4416295069 started with the image api, refactored buffer 2016-04-22 08:48:37 +02:00
shamanDevel
a6be243db1 refactoring of Context: moved simplifying functions from LwjglContext to Context 2016-04-21 15:05:55 +02:00
shamanDevel
ecda9135ad implemented kernel execution 2016-04-21 09:04:04 +02:00
shamanDevel
6326daa120 implemented program building 2016-04-21 08:31:31 +02:00
shamanDevel
e469af2ebc implemented LwjglCommandQueue, LwjglBuffer and LwjglEvent, added buffer test to HelloOpenCL 2016-04-20 09:50:21 +02:00
shamanDevel
e02eec0abd added customizability of the platforms and devices by PlatformChooser 2016-04-19 15:51:20 +02:00
shamanDevel
53ebaba1e2 listing and choosing devices 2016-04-19 07:24:53 +02:00
shamanDevel
bb15931fa2 started with context creation 2016-04-18 18:30:32 +02:00
shamanDevel
195a5a69be added first version of the cl wrapper in CL.java, contains a subset of the OpenCL specification 2016-04-18 17:38:38 +02:00
Riccardo Balbo
70ef220c2b Fix material sharing 2016-04-18 11:52:06 +02:00
shamanDevel
ab15f5c57c started with the OpenCL api for jme3 2016-04-17 21:14:57 +02:00
Nehon
f70151f2c7 Merge branch 'master' into PBRisComing 2016-04-15 20:17:26 +02:00
Nehon
0ecaa3bc8d Remove the LightSpace entry in Lighting.j"md as it not needed anymore 2016-04-11 19:21:04 +02:00
Nehon
c7d264fe8e Merge branch 'master' into PBRisComing
# Conflicts:
#	jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java
2016-04-11 19:09:52 +02:00
Nehon
6a9c655be3 Merge branch 'master' into PBRisComing
# Conflicts:
#	jme3-core/src/main/java/com/jme3/material/Material.java
2016-04-10 10:59:45 +02:00
Nehon
7101bbe1e0 Fixed the name of shadow shaders in PBRLighting.j3md, it has changed since the merge with master 2016-04-10 10:17:06 +02:00
Nehon
17ef34ad3a Fixed a crash with singlepass an multipass TDL when a lightProbe is added to the scene 2016-04-06 19:14:59 +02:00
Nehon
0ec2263ae9 Merged master into PBR and migrated to TechniqueDefLogic 2016-04-05 21:51:26 +02:00
NemesisMate
513eedaea1 Fixed a little bug I left on reversing the list :S: 2016-04-05 08:58:30 +01:00
NemesisMate
2a44aa4aec Reversed raytest results when needed
In some cases, native-bullet returns the ray results on a reversed order so it leads to unexpected bugs.
2016-04-05 08:39:53 +01:00
Rémy Bouquet
56f02bcba7 Merge pull request #464 from Perjin/synced-tangent-space
Get normals and tangent synced with mikk tangent space.
2016-04-01 23:33:58 +02:00
Jan Ivenz
4abba9b56c Get normals and tangent synced with mikk tangent space. 2016-04-01 22:55:52 +02:00
Nehon
556aaa4396 Normalized the wNormal and wTangent before computing the TBN mat in the PBRLighting frag shader 2016-04-01 22:08:20 +02:00
Nehon
da9d38fee6 Updated the Tank maps, (SP2 generates smaller maps) also reverted last calibration changes as it was screwing up the real life models... 2016-03-26 18:44:00 +01:00
Nehon
e2f180811c PBR calibration with recent changes 2016-03-26 15:36:37 +01:00
Nehon
7190da4df0 PBRLighting Uses the world normal fetched from the texture... 2016-03-26 10:47:49 +01:00
Nehon
65a8ee0f2e PBRLighting now use the world normal to fetch irradiance instead of the reflection vector.
Also added some comment for the parallax fix to explain what it does and where it comes from
2016-03-26 10:32:59 +01:00
Nehon
754c256a66 Merge branch 'master' into PBRisComing 2016-03-25 23:50:19 +01:00
Rémy Bouquet
e452032488 Merge pull request #457 from Perjin/normal_map_shading
Fix incorrect normal map shading in PBRLighting.
2016-03-25 07:24:19 +01:00
Jan Ivenz
b87b582f98 Fix incorrect normal map shading in PBRLighting. 2016-03-25 03:01:32 +01:00
Rémy Bouquet
330f018eff Merge branch 'master' into PBRisComing 2016-03-05 21:35:43 +01:00
Nehon
c4c72f2969 Added PBR reference test case 2016-03-02 21:14:56 +01:00
Nehon
6a1383a155 Merge branch 'master' into PBRisComing 2016-02-28 18:39:31 +01:00
Nehon
570c714c25 Merge branch 'master' into PBRisComing 2016-02-28 16:42:01 +01:00
Nehon
a670877df1 Fixed Image disposal in LightProbeFactory (issue https://github.com/jMonkeyEngine/jmonkeyengine/issues/424) 2016-02-25 18:31:26 +01:00
Rémy Bouquet
0b23f195e2 Merge pull request #408 from JavaSaBr/PBRisComing
Added support of overriding
2016-02-21 09:25:32 +01:00
Rémy Bouquet
bc73765d7c Merge pull request #414 from BorealFeast/PBRisComing
Fixed indirect light extraction in Material
2016-02-16 20:04:54 +01:00
Teencrusher
b4737b0206 Fixed indirect light extraction in Material 2016-02-16 13:38:37 -05:00
javasabr
718b66ba62 Added support of overriding 2016-02-09 07:07:54 +03:00
Nehon
ab76585ff2 More fine tuning calibration of roughness, and various visual fixes for PBR 2015-12-12 15:26:42 +01:00
Nehon
9e1a1f6131 PBR, fixed the way metallic material base color was handled for indirect lighting.
Also calibrated roughness so that it matches Substance painter renderer.
2015-12-08 23:57:08 +01:00
Nehon
1276dc583e Point Of Interest light probe blending start of implementation : basic structure, probes selection and blend factor computation. 2015-11-29 16:09:32 +01:00
Nehon
9fd90ab799 Merge branch 'master' into PBRisComing 2015-11-26 21:00:39 +01:00
Nehon
e5608d6e38 Merge branch 'master' into PBRisComing 2015-11-26 20:48:01 +01:00
Nehon
52154e1cea Introduced a LightProbeBlendingStrategy, that can be passed to the default light filter upon construction.
It sets how multiple LightProbes will be blended or selected for the final render.
This is meant to be highly customizable as there are already several strategies with pros and cons in the industry and some may arise in the future.
2015-11-26 20:45:07 +01:00
Nehon
fcff7f6933 Merge branch 'master' into PBRisComing 2015-11-20 16:30:26 +01:00
Nehon
cedb4d3c3e Merge branch 'master' into PBRisComing 2015-11-20 09:00:23 +01:00
Nehon
ec8e7d6713 The LightProbe is now treated apart from other lights in the rendering pass as the Ambient light is and is always rendered on the first pass if there are several passes. 2015-11-19 22:33:45 +01:00
Nehon
6c2396f023 Used the proper Lod finction in the reflect debug material 2015-11-19 19:05:53 +01:00
Nehon
f010f1be59 Fixed an outstanding issue with PBR lighting that was screwing reflection with normal maps. 2015-11-19 19:05:20 +01:00
Nehon
31d271d972 Changed the way indirect lighting is toggled on or of, there was silly problems with previous commit. 2015-11-19 19:04:14 +01:00
Nehon
e438ad0928 LightProbe maps can now be re rendered in the engine and in the SDK 2015-11-19 11:39:41 +01:00
Nehon
20ec2f0797 Merge branch 'master' into PBRisComing 2015-11-18 15:07:48 +01:00
Nehon
d92171b153 Fixed LightProbe Saving and Loading 2015-11-18 13:54:26 +01:00
Nehon
667afa9ef3 SDK : the probe radius is now a dashed lines cirle 2015-11-18 10:34:38 +01:00
Nehon
aa067ef60d Merge branch 'master' into PBRisComing 2015-11-17 14:55:36 +01:00
Nehon
7734492c66 Some cleanup 2015-11-17 14:38:46 +01:00
Nehon
0929bb2845 Added a way to change the lightProbe radius in the property panel 2015-11-17 14:37:12 +01:00
Nehon
49c6705bcc Better LightProbe radius shape 2015-11-17 14:36:24 +01:00
Nehon
866bf8d694 Added a light gizmo for light probe. Refactored the way light markers were done 2015-11-17 12:21:30 +01:00
Nehon
ab981b76fc Added a define to toggle indirect lighting on or off, depending if there is a light probe in the light list or not.
However, this is not ideal, as this code will trigger a recompilation of the shader on each pass, in case there is more than 1 lighting pass.
Another way could be to multiply the indirect lighting contribution by the Ambient light color in the shader, and always perform the indirect lighting code (even without light probe).
As in the second pass ambient light is forced to 0, the indirect lighting contribution would be nullified. However we'd have to force ambient light to 0 if there are no light probe.
This would also have the nice side effect of having a way to dim or boost indirect lighting with the ambient light color.
2015-11-15 18:43:50 +01:00
Nehon
39fe8326ba Added a progress handle for the environment map generation. 2015-11-15 08:51:59 +01:00
Nehon
ad88fa3210 Merge branch 'master' into PBRisComing 2015-11-11 19:02:57 +01:00
Nehon
4726da1e41 Merge branch 'master' into PBRisComing 2015-11-11 18:57:15 +01:00
Nehon
84e2aba9da Initial implementation for adding a LightProbe to a scene in the SDK 2015-11-11 18:54:17 +01:00
Nehon
c76182d375 Updated the create skybox gui in the SDK so that it fits the new API and supports loading equirect Skybox maps. 2015-11-11 18:21:21 +01:00
Nehon
5bd261e115 added jme3=lwjgl3/build to the gitignore file... 2015-11-06 20:49:28 +01:00
Rémy Bouquet
c348e30188 fixed a NPE in the shader node editor when the navigator panel is collapsed 2015-11-06 09:21:59 +01:00
Rémy Bouquet
45321fc7d5 Fixed an issue in material when having classic lights along with a LightProbe 2015-11-06 09:20:03 +01:00
Nehon
7d07a63ebf Changes the way the fresnel term is computed in the PBR.glsllib for direct lighting, fixing some artifact when having a point light 2015-11-05 23:01:25 +01:00
Rémy Bouquet
e159c3918a Implemented intersectBoundingBox for LightProbe 2015-11-02 11:50:38 +01:00
Rémy Bouquet
c47da8e9a1 Merge branch 'master' into PBRisComing
* master: (94 commits)
  First attempt to fix a bug reported by david_bernard_31, the size of the strings in the shader code was wrongly computed for the JOGL backend
  Allows to choose between the forward compatible profile and the backward compatible profile in the JOGL backend
  Displays the JOGL version instead of the NEWT version
  Updates JOGL (2.3.2)
  Bugfix: fix to importing blend files with linked content.
  native loader: set lwjgl library path for lwjgl3
  Updated lwjgl3 module to use LWJGL 3.0.0b #35 which is the current stable build.
  Change duplicated docstring in FlyByCamera.unregisterInput
  light : fixed pointLight v. bounding sphere unit test
  light : replaced duplicated code by methods from Intersection
  Removed native library jemalloc.dll for LWJGL3 as this will not be needed until 3.0.0b and after.
  light : added unit tests for the new support of bounding spheres intersections (for lightFilter)
  Fixed Issue #46 : The MaterialViewer will now simply ignore not available textures instead of crashing
  Lights (see #362) : added light v. sphere intersection, and implementations of intersectsSphere(), second attempt
  GImpactCollisionShape : fix for #188, added a call to updateBound() in native jni binding, just after creating the shape, (native createShape() method)
  Bugfix: fixed a bug that caused importer to crash when the author of the blend file assigned non existing UV coordinates group name to a mesh.
  Bugfix: fixed a bug that caused subdivision surface modifier to crash if at least one not connected vertex was in the mesh.
  The LWJGL 3 renderer was missing a call to GLContext.createFromCurrent(), sorted now.
  Changed the default app title in AppSettings to use the full name string from JmeVersion. This way no more manual changing of this will be needed for future versions. This also closes #320 which highlighted this issue. Thanks @8Keep.
  Fixed #316 where some post processing effects were not working when using OPENGL_3 renderer due to an error in the fragment shader.
  ...
2015-11-02 11:28:07 +01:00
Nehon
2db5f773e0 Merge branch 'master' into PBRisComing 2015-08-29 12:57:13 +02:00
Nehon
d08ce630f9 Merge branch 'master' into PBRisComing 2015-08-15 10:38:55 +02:00
Nehon
63f07856d8 Fixed an issue in the shader node editor where the editor was failing to open a definition when a variable name began with m_ 2015-08-15 10:30:12 +02:00
Nehon
cefdabf3c6 Merge branch 'master' into PBRisComing 2015-08-13 20:43:56 +02:00
Nehon
b5c946ef02 Fixed LightProbe selection according to distance and bounds 2015-08-13 20:33:49 +02:00
Nehon
a35b499ee7 Big refactoring to how PBR is handled.
- Introduced a new Light type : LightProbes that are lights holding Image based Lighting information that are sent to the shader. For now, only the closest LightProbe from a geometry is sent to the shader. This will be enhanced later as it's obviously not the best way to handle this.
- Added a LightProbeFactory for easy creation and rendering of LightPorbes and associated maps. The maps generation process can also be monitored through a Listener class.
- Added various utility classses for debuging purpose.
- Added a new test case for environment with multiple LightProbes.
- Adapted the previous test case to the new system.
2015-08-09 18:39:22 +02:00
Nehon
7b7c6951ad Fixed worldLightList sorting when a light is added to a node. 2015-08-09 18:26:34 +02:00
Nehon
a730da35b4 FilterPostProcessor now checks for ogl 3.2 capability to use multitsampled textures 2015-08-08 09:26:55 +02:00
Nehon
fc0975c0cc removed old implementation 2015-08-08 09:25:41 +02:00
Nehon
69f1677649 Moved PBR implementation 2015-08-08 09:25:09 +02:00
Nehon
4b1c61dec1 Merge branch 'master' into PBRisComing 2015-07-16 21:59:26 +02:00
Nehon
f2b9343d51 Merge branch 'master' into PBRisComing 2015-07-15 23:56:12 +02:00
Nehon
9a3976ed50 Merge branch 'master' into PBRisComing 2015-07-14 09:44:43 +02:00
Nehon
b0db53b5d6 Fixed warning when trying to find a srgb format for a Depth format. 2015-07-14 09:41:55 +02:00
Nehon
9256f2e4d4 Merge branch 'master' into PBRisComing 2015-07-13 16:22:19 +02:00
Nehon
327e0125d9 Merge branch 'master' into PBRisComing
Conflicts:
	jme3-core/src/main/java/com/jme3/material/Material.java
	jme3-core/src/main/java/com/jme3/material/TechniqueDef.java
2015-07-11 21:34:30 +02:00
Nehon
596954b056 Redesign of the frag part of unshadedNodes so it's more modular, and can be properly used as GLSL 1.5 shader.
Added a stress test for unshadedNodes.
Changed the name of the texture parameter to textureMap in TextureFetch shaderNode as it was conflicting with the texture function used to fetch a texel from a a texture in glsl 1.5
2015-07-05 23:35:34 +02:00
Nehon
be58be75ef Merge branch 'master' into PBRisComing 2015-07-03 23:34:26 +02:00
Nehon
719a683c2c Fixed Parallax for PBR lighting 2015-07-03 22:53:29 +02:00
Nehon
4342d97439 Fixed roughness fetch in the spec / gloss pipeline
See issue https://github.com/jMonkeyEngine/jmonkeyengine/issues/281
2015-07-02 21:00:07 +02:00
Nehon
af35f27b93 Merge branch 'master' into PBRisComing 2015-05-31 16:30:29 +02:00
Nehon
c50f0426bf Merge branch 'master' into PBRisComing 2015-05-22 07:44:41 +02:00
Nehon
7269ff8fd4 fixed CubeMapWrapper after the changes to DefaultImageRaster 2015-05-05 18:21:50 +02:00
Nehon
0594e5dc7e Merge branch 'master' into PBRisComing 2015-05-05 18:05:07 +02:00
Nehon
97b3383127 Merge branch 'master' into PBRisComing 2015-04-17 16:10:07 +02:00
Nehon
8e9148f95f Fix for previous too optimistic merge 2015-04-11 16:14:54 +02:00
Nehon
e1d0e06c59 Merge branch 'master' into PBRisComing
Conflicts:
	jme3-core/src/main/java/com/jme3/material/TechniqueDef.java
2015-04-11 16:01:01 +02:00
Nehon
81c995edc4 PBR shader and PBR test case with custom model 2015-04-11 15:37:05 +02:00
Nehon
3135f2f4bf Added utilities class to compute the Irradiance Map, and Prefiltered Environment Map needed for PBR indirect lighting. 2015-03-28 15:30:08 +01:00
Nehon
8f129ec727 Added a test case for KTX loading 2015-03-25 23:29:55 +01:00
Nehon
8a96772ae3 KTX file loading and writing support 2015-03-25 23:18:19 +01:00
Nehon
cecf355c70 SinglePass now uses the TechniqueDef LightSpace.
The single pass material definition LightSpace has been set to View until we implement it in world space.
2015-03-21 12:10:43 +01:00
Nehon
d662eadce9 LightSpace is now defaulted to World for SinglePass 2015-03-21 12:09:06 +01:00
Nehon
7ab9798ad7 J3MLoader can now read the LightSpace attribute 2015-03-21 12:08:07 +01:00
Nehon
01ed6db77c Introduced a LightSpace attribute in the TechniqueDef to define in what space LightData should be sent to the shader. Used it for the multipass lighting 2015-03-21 10:36:00 +01:00
2029 changed files with 249077 additions and 59033 deletions

93
.github/actions/tools/bintray.sh vendored Normal file
View File

@ -0,0 +1,93 @@
#!/bin/bash
# bintray_createPackage [REPO] [PACKAGE] [USER] [PASSWORD] [GIT REPO] [LICENSE]
function bintray_createPackage {
repo="$1"
package="$2"
user="$3"
password="$4"
srcrepo="$5"
license="$6"
repoUrl="https://api.bintray.com/packages/$repo"
if [ "`curl -u$user:$password -H Content-Type:application/json -H Accept:application/json \
--write-out %{http_code} --silent --output /dev/null -X GET \"$repoUrl/$package\"`" != "200" ];
then
if [ "$srcrepo" != "" -a "$license" != "" ];
then
echo "Package does not exist... create."
data="{
\"name\": \"${package}\",
\"labels\": [],
\"licenses\": [\"${license}\"],
\"vcs_url\": \"${srcrepo}\"
}"
curl -u$user:$password -H "Content-Type:application/json" -H "Accept:application/json" -X POST \
-d "${data}" "$repoUrl"
else
echo "Package does not exist... you need to specify a repo and license for it to be created."
fi
else
echo "The package already exists. Skip."
fi
}
# uploadFile file destination [REPO] "content" [PACKAGE] [USER] [PASSWORD] [SRCREPO] [LICENSE]
function bintray_uploadFile {
file="$1"
dest="$2"
echo "Upload $file to $dest"
repo="$3"
type="$4"
package="$5"
user="$6"
password="$7"
srcrepo="$8"
license="$9"
publish="${10}"
bintray_createPackage $repo $package $user $password $srcrepo $license
url="https://api.bintray.com/$type/$repo/$package/$dest"
if [ "$publish" = "true" ]; then url="$url;publish=1"; fi
curl -T "$file" -u$user:$password "$url"
}
function bintray_uploadAll {
path="$1"
destpath="$2"
repo="$3"
type="$4"
package="$5"
user="$6"
password="$7"
srcrepo="$8"
license="$9"
publish="${10}"
cdir="$PWD"
cd "$path"
files="`find . -type f -print`"
IFS="
"
set -f
for f in $files; do
destfile="$destpath/${f:2}"
bintray_uploadFile $f $destfile $repo $type $package $user $password $srcrepo $license $publish
done
set +f
unset IFS
cd "$cdir"
}

85
.github/actions/tools/uploadToMaven.sh vendored Normal file
View File

@ -0,0 +1,85 @@
#!/bin/bash
#############################################
#
# Usage
# uploadAllToMaven path/of/dist/maven https://api.bintray.com/maven/riccardo/sandbox-maven/ riccardo $BINTRAY_PASSWORD gitrepo license
# Note: gitrepo and license are needed only when uploading to bintray if you want to create missing packages automatically
# gitrepo must be a valid source repository
# license must be a license supported by bintray eg "BSD 3-Clause"
# or
# uploadAllToMaven path/of/dist/maven $GITHUB_PACKAGE_REPOSITORY user password
#
#############################################
root="`dirname ${BASH_SOURCE[0]}`"
source $root/bintray.sh
set -e
function uploadToMaven {
file="$1"
destfile="$2"
repourl="$3"
user="$4"
password="$5"
srcrepo="$6"
license="$7"
auth=""
if [ "$user" != "token" ];
then
echo "Upload with username $user and password"
auth="-u$user:$password"
else
echo "Upload with token"
auth="-H \"Authorization: token $password\""
fi
if [[ $repourl == https\:\/\/api.bintray.com\/* ]];
then
package="`dirname $destfile`"
version="`basename $package`"
package="`dirname $package`"
package="`basename $package`"
if [ "$user" = "" -o "$password" = "" ];
then
echo "Error! You need username and password to upload to bintray"
exit 1
fi
echo "Detected bintray"
bintrayRepo="${repourl/https\:\/\/api.bintray.com\/maven/}"
echo "Create package on $bintrayRepo"
bintray_createPackage $bintrayRepo $package $user $password $srcrepo $license
repourl="$repourl/$package"
fi
cmd="curl -T \"$file\" $auth \
\"$repourl/$destfile\" \
-vvv"
echo "Run $cmd"
eval "$cmd"
}
export -f uploadToMaven
function uploadAllToMaven {
path="$1"
cdir="$PWD"
cd "$path"
files="`find . \( -name "*.jar" -o -name "*.pom" \) -type f -print`"
IFS="
"
set -f
for art in $files; do
art="${art:2}"
uploadToMaven "$art" "$art" ${@:2}
done
set +f
unset IFS
cd "$cdir"
}

554
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,554 @@
######################################################################################
# JME CI/CD
######################################################################################
# Quick overview of what is going on in this script:
# - Build natives for android
# - Build natives for linux arm
# - Build natives for windows,mac,linux x86_64 and x86
# - Merge the natives, build the engine, create the zip release, maven artifacts, javadoc and native snapshot
# - (only when there is a change in the native code) Deploy the native snapshot to bintray
# - (only when building a release) Deploy everything else to github releases, github packet registry and bintray
# - (only when building a release) Update javadoc.jmonkeyengine.org
# Note:
# All the actions/upload-artifact and actions/download-artifact steps are used to pass
# stuff between jobs, github actions has some sort of storage that is local to the
# running workflow, we use it to store the result of each job since the filesystem
# is not maintained between jobs.
################# CONFIGURATIONS #####################################################
# >> Configure BINTRAY RELEASE & NATIVE SNAPSHOT
# Configure the following secrets/variables (customize the values with your own)
# BINTRAY_GENERIC_REPO=riccardoblsandbox/jmonkeyengine-files
# BINTRAY_MAVEN_REPO=riccardoblsandbox/jmonkeyengine
# BINTRAY_USER=riccardo
# BINTRAY_APIKEY=XXXXXX
# BINTRAY_LICENSE="BSD 3-Clause"
# >> Configure PACKAGE REGISTRY RELEASE
# Nothing to do here, everything is autoconfigured to work with the account/org that
# is running the build.
# >> Configure JAVADOC
# JAVADOC_GHPAGES_REPO="riccardoblsandbox/javadoc.jmonkeyengine.org.git"
# Generate a deloy key
# ssh-keygen -t rsa -b 4096 -C "actions@users.noreply.github.com" -f javadoc_deploy
# Set
# JAVADOC_GHPAGES_DEPLOY_PRIVKEY="......."
# In github repo -> Settings, use javadoc_deploy.pub as Deploy key with write access
######################################################################################
# Resources:
# - Github actions docs: https://help.github.com/en/articles/about-github-actions
# - Package registry docs: https://help.github.com/en/articles/about-github-package-registry
# - Official actions: https://github.com/actions
# - Community actions: https://github.com/sdras/awesome-actions
######################################################################################
# - Riccardo Balbo
######################################################################################
name: Build jMonkeyEngine
on:
push:
branches:
- master
- newbuild
- v3.3.*
- v3.2
- v3.2.*
pull_request:
release:
types: [published]
jobs:
# Builds the natives on linux arm
BuildLinuxArmNatives:
name: Build natives for linux (arm)
runs-on: ubuntu-18.04
container:
image: riccardoblb/buildenv-jme3:linuxArm
steps:
- name: Clone the repo
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Validate the Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build
run: |
# Build
# Note: since this is crossbuild we use the buildForPlatforms filter to tell
# the buildscript wich platforms it should build for.
./gradlew -PuseCommitHashAsVersionName=true --no-daemon -PbuildForPlatforms=LinuxArm,LinuxArmHF,LinuxArm64 -PbuildNativeProjects=true \
:jme3-bullet-native:assemble
- name: Upload natives
uses: actions/upload-artifact@master
with:
name: linuxarm-natives
path: build/native
# Build the natives on android
BuildAndroidNatives:
name: Build natives for android
runs-on: ubuntu-18.04
container:
image: riccardoblb/buildenv-jme3:android
steps:
- name: Clone the repo
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Validate the Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build
run: |
./gradlew -PuseCommitHashAsVersionName=true --no-daemon -PbuildNativeProjects=true \
:jme3-android-native:assemble \
:jme3-bullet-native-android:assemble
- name: Upload natives
uses: actions/upload-artifact@master
with:
name: android-natives
path: build/native
# Build the natives
BuildNatives:
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04,windows-2019,macOS-latest]
jdk: [8.x.x]
include:
- os: ubuntu-18.04
osName: linux
- os: windows-2019
osName: windows
- os: macOS-latest
osName: mac
name: Build natives for ${{ matrix.osName }}
runs-on: ${{ matrix.os }}
steps:
- name: Clone the repo
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Prepare java environment
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
architecture: x64
- name: Validate the Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build Natives
shell: bash
env:
OS_NAME: ${{ matrix.osName }}
run: |
# Install dependencies
if [ "$OS_NAME" = "mac" ];
then
echo "Prepare mac"
elif [ "$OS_NAME" = "linux" ];
then
echo "Prepare linux"
sudo apt-get update
sudo apt-get install -y gcc-multilib g++-multilib
else
echo "Prepare windows"
fi
# Build
./gradlew -PuseCommitHashAsVersionName=true --no-daemon -PbuildNativeProjects=true -Dmaven.repo.local="$PWD/dist/maven" \
build \
:jme3-bullet-native:build
# Upload natives to be used later by the BuildJMonkey job
- name: Upload natives
uses: actions/upload-artifact@master
with:
name: ${{ matrix.osName }}-natives
path: build/native
# Build the engine, we only deploy from ubuntu-18.04 jdk8
BuildJMonkey:
needs: [BuildNatives,BuildAndroidNatives]
name: Build on ${{ matrix.osName }} jdk${{ matrix.jdk }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04,windows-2019,macOS-latest]
jdk: [8.x.x,11.x.x]
include:
- os: ubuntu-18.04
osName: linux
deploy: true
- os: windows-2019
osName: windows
- os: macOS-latest
osName: mac
- jdk: 11.x.x
deploy: false
steps:
- name: Clone the repo
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup the java environment
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
architecture: x64
- name: Download natives for linux
uses: actions/download-artifact@master
with:
name: linux-natives
path: build/native
- name: Download natives for windows
uses: actions/download-artifact@master
with:
name: windows-natives
path: build/native
- name: Download natives for mac
uses: actions/download-artifact@master
with:
name: mac-natives
path: build/native
- name: Download natives for android
uses: actions/download-artifact@master
with:
name: android-natives
path: build/native
- name: Download natives for linux (arm)
uses: actions/download-artifact@master
with:
name: linuxarm-natives
path: build/native
- name: Validate the Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build Engine
shell: bash
run: |
# Build
./gradlew -PuseCommitHashAsVersionName=true -PskipPrebuildLibraries=true build
if [ "${{ matrix.deploy }}" = "true" ];
then
# We are going to need "zip"
sudo apt-get update
sudo apt-get install -y zip
# Create the zip release and the javadoc
./gradlew -PuseCommitHashAsVersionName=true -PskipPrebuildLibraries=true mergedJavadoc createZipDistribution
# We prepare the release for deploy
mkdir -p ./dist/release/
mv build/distributions/*.zip dist/release/
# Create the maven artifacts
mkdir -p ./dist/maven/
./gradlew -PuseCommitHashAsVersionName=true -PskipPrebuildLibraries=true install -Dmaven.repo.local="$PWD/dist/maven"
# Zip the natives into a single archive (we are going to use this to deploy native snapshots)
echo "Create native zip"
cdir="$PWD"
cd "build/native"
zip -r "$cdir/dist/jme3-natives.zip" *
cd "$cdir"
echo "Done"
fi
# Used later by DeploySnapshot
- name: Upload merged natives
if: matrix.deploy==true
uses: actions/upload-artifact@master
with:
name: natives
path: dist/jme3-natives.zip
# Upload maven artifacts to be used later by the deploy job
- name: Upload maven artifacts
if: matrix.deploy==true
uses: actions/upload-artifact@master
with:
name: maven
path: dist/maven
- name: Upload javadoc
if: matrix.deploy==true
uses: actions/upload-artifact@master
with:
name: javadoc
path: dist/javadoc
# Upload release archive to be used later by the deploy job
- name: Upload release
if: github.event_name == 'release' && matrix.deploy==true
uses: actions/upload-artifact@master
with:
name: release
path: dist/release
# This job deploys the native snapshot.
# The snapshot is downloaded when people build the engine without setting buildNativeProject
# this is useful for people that want to build only the java part and don't have
# all the stuff needed to compile natives.
DeploySnapshot:
needs: [BuildJMonkey]
name: "Deploy snapshot"
runs-on: ubuntu-18.04
if: github.event_name == 'push'
steps:
# We clone the repo manually, since we are going to push back a reference to the snapshot
- name: Clone the repo
run: |
branch="${GITHUB_REF//refs\/heads\//}"
if [ "$branch" != "" ];
then
git clone --single-branch --branch "$branch" https://github.com/${GITHUB_REPOSITORY}.git .
fi
- name: Download merged natives
uses: actions/download-artifact@master
with:
name: natives
path: dist/
- name: Deploy natives snapshot
run: |
source .github/actions/tools/bintray.sh
NATIVE_CHANGES="yes"
branch="${GITHUB_REF//refs\/heads\//}"
if [ "$branch" != "" ];
then
if [ -f "natives-snapshot.properties" ];
then
nativeSnapshot=`cat "natives-snapshot.properties"`
nativeSnapshot="${nativeSnapshot#*=}"
# We deploy ONLY if GITHUB_SHA (the current commit hash) is newer than $nativeSnapshot
if [ "`git rev-list --count $nativeSnapshot..$GITHUB_SHA`" = "0" ];
then
NATIVE_CHANGES=""
else
# We check if the native code changed.
echo "Detect changes"
NATIVE_CHANGES="$(git diff-tree --name-only "$GITHUB_SHA" "$nativeSnapshot" -- jme3-bullet-native/)"
if [ "$NATIVE_CHANGES" = "" ];then NATIVE_CHANGES="$(git diff-tree --name-only "$GITHUB_SHA" "$nativeSnapshot" -- jme3-android-native/)"; fi
if [ "$NATIVE_CHANGES" = "" ];then NATIVE_CHANGES="$(git diff-tree --name-only "$GITHUB_SHA" "$nativeSnapshot" -- jme3-bullet-native-android/)"; fi
if [ "$NATIVE_CHANGES" = "" ];then NATIVE_CHANGES="$(git diff-tree --name-only "$GITHUB_SHA" "$nativeSnapshot" -- jme3-bullet/)"; fi
# The bulletUrl (in gradle.properties) might have changed.
if [ "$NATIVE_CHANGES" = "" ];then NATIVE_CHANGES="$(git diff-tree --name-only "$GITHUB_SHA" "$nativeSnapshot" -- gradle.properties)"; fi
fi
fi
# We do nothing if there is no change
if [ "$NATIVE_CHANGES" = "" ];
then
echo "No changes, skip."
else
if [ "${{ secrets.BINTRAY_GENERIC_REPO }}" = "" ];
then
echo "Configure the following secrets to enable native snapshot deployment"
echo "BINTRAY_GENERIC_REPO, BINTRAY_USER, BINTRAY_APIKEY"
else
# Deploy snapshot
bintray_uploadFile dist/jme3-natives.zip \
$GITHUB_SHA/$GITHUB_SHA/jme3-natives.zip \
${{ secrets.BINTRAY_GENERIC_REPO }} "content" "natives" \
${{ secrets.BINTRAY_USER }} \
${{ secrets.BINTRAY_APIKEY }} \
"https://github.com/${GITHUB_REPOSITORY}" \
"${{ secrets.BINTRAY_LICENSE }}" "true"
# We reference the snapshot by writing its commit hash in natives-snapshot.properties
echo "natives.snapshot=$GITHUB_SHA" > natives-snapshot.properties
# We commit the updated natives-snapshot.properties
git config --global user.name "Github Actions"
git config --global user.email "actions@users.noreply.github.com"
git add natives-snapshot.properties
git commit -m "[skip ci] update natives snapshot"
# Pull rebase from the remote repo, just in case there was a push in the meantime
git pull -q --rebase
# We need to calculate the header for git authentication
header=$(echo -n "ad-m:${{ secrets.GITHUB_TOKEN }}" | base64)
# Push
(git -c http.extraheader="AUTHORIZATION: basic $header" push origin "$branch" || true)
fi
fi
fi
# This job deploys the release
DeployRelease:
needs: [BuildJMonkey]
name: Deploy Release
runs-on: ubuntu-18.04
if: github.event_name == 'release'
steps:
# We need to clone everything again for uploadToMaven.sh ...
- name: Clone the repo
uses: actions/checkout@v2
with:
fetch-depth: 1
# Download all the stuff...
- name: Download maven artifacts
uses: actions/download-artifact@master
with:
name: maven
path: dist/maven
- name: Download release
uses: actions/download-artifact@master
with:
name: release
path: dist/release
- name: Deploy to github releases
run: |
# We need to get the release id (yeah, it's not the same as the tag)
echo "${GITHUB_EVENT_PATH}"
cat ${GITHUB_EVENT_PATH}
releaseId=$(jq --raw-output '.release.id' ${GITHUB_EVENT_PATH})
# Now that we have the id, we just upload the release zip from before
echo "Upload to release $releaseId"
filename="$(ls dist/release/*.zip)"
url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/$releaseId/assets?name=$(basename $filename)"
echo "Upload to $url"
curl -L \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/zip" \
--data-binary @"$filename" \
"$url"
- name: Deploy to bintray
run: |
source .github/actions/tools/uploadToMaven.sh
if [ "${{ secrets.BINTRAY_MAVEN_REPO }}" = "" ];
then
echo "Configure the following secrets to enable bintray deployment"
echo "BINTRAY_MAVEN_REPO, BINTRAY_USER, BINTRAY_APIKEY"
else
uploadAllToMaven dist/maven/ https://api.bintray.com/maven/${{ secrets.BINTRAY_MAVEN_REPO }} ${{ secrets.BINTRAY_USER }} ${{ secrets.BINTRAY_APIKEY }} "https://github.com/${GITHUB_REPOSITORY}" "${{ secrets.BINTRAY_LICENSE }}"
fi
# - name: Deploy to github package registry
# run: |
# source .github/actions/tools/uploadToMaven.sh
# registry="https://maven.pkg.github.com/$GITHUB_REPOSITORY"
# echo "Deploy to github package registry $registry"
# uploadAllToMaven dist/maven/ $registry "token" ${{ secrets.GITHUB_TOKEN }}
# Deploy the javadoc
DeployJavaDoc:
needs: [BuildJMonkey]
name: Deploy Javadoc
runs-on: ubuntu-18.04
if: github.event_name == 'release'
steps:
# We are going to need a deploy key for this, since we need
# to push to a different repo
- name: Set ssh key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.JAVADOC_GHPAGES_DEPLOY_PRIVKEY }}" > $HOME/.ssh/deploy.key
chmod 600 $HOME/.ssh/deploy.key
# We clone the javadoc repo
- name: Clone gh-pages
run: |
branch="gh-pages"
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $HOME/.ssh/deploy.key"
git clone --single-branch --branch "$branch" git@github.com:${{ secrets.JAVADOC_GHPAGES_REPO }} .
# Download the javadoc in the new directory "newdoc"
- name: Download javadoc
uses: actions/download-artifact@master
with:
name: javadoc
path: newdoc
# The actual deploy
- name: Deploy to github pages
run: |
set -f
IFS=$'\n'
# Get the tag for this release
version="`if [[ $GITHUB_REF == refs\/tags* ]]; then echo ${GITHUB_REF//refs\/tags\//}; fi`"
# If there is no tag, then we do nothing.
if [ "$version" != "" ];
then
echo "Deploy as $version"
# Remove any older version of the javadoc for this tag
if [ -d "$version" ];then rm -Rf "$version"; fi
# Rename newdoc with the version name
mv newdoc "$version"
# if there isn't an index.txt we create one (we need this to list the versions)
if [ ! -f "index.txt" ]; then echo "" > index.txt ; fi
index="`cat index.txt`"
# Check if this version is already in index.txt
addNew=true
for v in $index;
do
if [ "$v" = "$version" ];
then
echo "$v" "$version"
addNew=false
break
fi
done
# If not, we add it to the beginning
if [ "$addNew" = "true" ];
then
echo -e "$version\n$index" > index.txt
index="`cat index.txt`"
fi
# Regenerate the pages
chmod +x make.sh
./make.sh
# Configure git to use the deploy key
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $HOME/.ssh/deploy.key"
# Commit the changes
git config --global user.name "Github Actions"
git config --global user.email "actions@users.noreply.github.com"
git add . || true
git commit -m "$version" || true
branch="gh-pages"
git push origin "$branch" --force || true
fi

34
.gitignore vendored
View File

@ -1,4 +1,9 @@
**/nbproject/private/
**/.classpath
**/.settings
**/.project
**/.vscode
**/out/
/.gradle/
/.nb-gradle/
/.idea/
@ -14,21 +19,30 @@
*.jnilib
*.dylib
*.iml
*.class
*.jtxt
.gradletasknamecache
.DS_Store
/jme3-core/src/main/resources/com/jme3/system/version.properties
/jme3-*/build/
/jme3-bullet-native/bullet.zip
/jme3-bullet-native/bullet-2.82-r2704/
/jme3-*/bin/
/jme3-bullet-native/bullet3.zip
/jme3-bullet-native/bullet3-*/
/jme3-bullet-native/src/native/cpp/com_jme3_bullet_*.h
/jme3-android-native/openal-soft/
/jme3-android-native/OpenALSoft.zip
/jme3-android-native/src/native/jme_decode/STBI/
/jme3-android-native/src/native/jme_decode/Tremor/
/jme3-android-native/src/native/jme_decode/com_jme3_audio_plugins_NativeVorbisFile.h
/jme3-android-native/src/native/jme_decode/com_jme3_texture_plugins_AndroidNativeImageLoader.h
/jme3-android-native/stb_image.h
!/jme3-bullet-native/libs/native/windows/x86_64/bulletjme.dll
!/jme3-bullet-native/libs/native/windows/x86/bulletjme.dll
!/jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib
!/jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib
!/jme3-bullet-native/libs/native/linux/x86/libbulletjme.so
!/jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so
/jme3-examples/private/
!/jme3-vr/src/main/resources/**/*.dylib
!/jme3-vr/src/main/resources/**/*.so
!/jme3-vr/src/main/resources/**/*.so.dbg
!/jme3-vr/src/main/resources/**/*.dll
!/jme3-vr/src/main/resources/**/*.pdb
/buildMaven.bat
/private
.travis.yml
appveyor.yml
javadoc_deploy
javadoc_deploy.pub

View File

@ -1,60 +0,0 @@
language: java
sudo: false
addons:
ssh_known_hosts: updates.jmonkeyengine.org
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
notifications:
slack:
on_success: change
on_failure: always
rooms:
secure: "PWEk4+VL986c3gAjWp12nqyifvxCjBqKoESG9d7zWh1uiTLadTHhZJRMdsye36FCpz/c/Jt7zCRO/5y7FaubQptnRrkrRfjp5f99MJRzQVXnUAM+y385qVkXKRKd/PLpM7XPm4AvjvxHCyvzX2wamRvul/TekaXKB9Ti5FCN87s="
install:
- ./gradlew assemble
script:
- ./gradlew check
before_deploy:
- ./gradlew createZipDistribution
- export RELEASE_DIST=$(ls build/distributions/*.zip)
deploy:
provider: releases
api_key:
secure: PuEsJd6juXBH29ByITW3ntSAyrwWs0IeFvXJ5Y2YlhojhSMtTwkoWeB6YmDJWP4fhzbajk4TQ1HlOX2IxJXSW/8ShOEIUlGXz9fHiST0dkSM+iRAUgC5enCLW5ITPTiem7eY9ZhS9miIam7ngce9jHNMh75PTzZrEJtezoALT9w=
file_glob: true
file: "${RELEASE_DIST}"
skip_cleanup: true
on:
repo: jMonkeyEngine/jmonkeyengine
tags: true
before_install:
- git fetch --unshallow
- "[ $TRAVIS_PULL_REQUEST == 'false' ] && openssl aes-256-cbc -K $encrypted_a1949b55824a_key -iv $encrypted_a1949b55824a_iv -in private/www-updater.key.enc -out private/www-updater.key -d || :"
# before_install:
# required libs for android build tools
# sudo apt-get update
# sudo apt-get install -qq p7zip-full
# sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch
# newest Android NDK
# wget http://dl.google.com/android/ndk/android-ndk-r10c-linux-x86_64.bin -O ndk.bin
# 7z x ndk.bin -y > /dev/null
# export ANDROID_NDK=`pwd`/android-ndk-r10c
after_success:
- '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew bintrayUpload || :'
# - '[ "$TRAVIS_BRANCH" == "v3.1" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew uploadArchives || :'
# - '[ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew uploadArchives bintrayUpload || :'

View File

@ -9,6 +9,8 @@ Communication always comes first. **All** code changes and other contributions s
### New Contributors
Check out the [Projects](https://github.com/jMonkeyEngine/jmonkeyengine/projects/1) tab, where the team has prioritized issues that you as a new contributor can undertake that will familiarize you to the workflow of contributing. This highlights some issues the team thinks would be a good start for new contributors but you are free to contribute on any other issues or integration you wish.
When you're ready to submit your code, just make a [pull request](https://help.github.com/articles/using-pull-requests).
- Do not commit your code until you have received proper feedback.
@ -22,6 +24,15 @@ p.s. We will try hold ourselves to a [certain standard](http://www.defmacro.org/
Developers in the Contributors team can push directly to Main instead of submitting pull requests, however for new features it is often a good idea to do a pull request as a means to get a last code review.
## Customs around integration, branching, tagging, and releases
- Most pull requests are integrated directly into the master branch of the repository.
- Integrators should note, unless the history of the pull request is important, it should be integrated to a single commit using “squash and merge”. If the history is important, favor “rebase and merge”. Don’t create a merge commit unless GitHub cannot rebase the PR.
- For each major release (such as v3.0 or v3.3), an appropriately named release branch is created in the repository.
- For each minor (or “dot-dot”) release (such as v3.2.3), an appropriately named tag is created in the repository.
- In general, library changes that plausibly might break existing apps appear only in major releases, not minor ones.
## Building the engine
1. Install [Gradle](http://www.gradle.org/)
@ -55,5 +66,5 @@ We generally abide by the standard Java Code Conventions. Besides that, just mak
## Documentation
- How to edit the wiki - WIP
- How to edit the [wiki](https://github.com/jMonkeyEngine/wiki).
- How to edit JavaDocs - WIP

29
LICENSE Normal file
View File

@ -0,0 +1,29 @@
Copyright (c) 2009-2020 jMonkeyEngine
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of 'jMonkeyEngine' nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,24 +1,28 @@
jMonkeyEngine
jMonkeyEngine
=============
[![Build Status](https://travis-ci.org/jMonkeyEngine/jmonkeyengine.svg?branch=master)](https://travis-ci.org/jMonkeyEngine/jmonkeyengine)
[![Build Status](https://github.com/jMonkeyEngine/jmonkeyengine/workflows/Build%20jMonkeyEngine/badge.svg)](https://github.com/jMonkeyEngine/jmonkeyengine/actions)
jMonkeyEngine is a 3D game engine for adventurous Java developers. It’s open source, cross platform and cutting edge. And it is all beautifully documented. The 3.0 branch is the latest stable version of the jMonkeyEngine 3 SDK, a complete game development suite. We'll be frequently submitting stable 3.0.x updates until the major 3.1 version arrives.
jMonkeyEngine is a 3-D game engine for adventurous Java developers. It’s open-source, cross-platform, and cutting-edge. 3.2.4 is the latest stable version of the jMonkeyEngine 3 SDK, a complete game development suite. We'll release 3.2.x updates until the major 3.3 release arrives.
The engine is used by several commercial game studios and computer-science courses. Here's a taste:
![jME3 Games Mashup](http://i.imgur.com/hBehW2i.jpg)
![jME3 Games Mashup](https://i.imgur.com/nF8WOW6.jpg)
- [jME powered games on IndieDB](http://www.indiedb.com/engines/jmonkeyengine/games)
- [Maker's Tale](http://steamcommunity.com/sharedfiles/filedetails/?id=93461954t)
- [Boardtastic 2](https://play.google.com/store/apps/details?id=com.boardtastic.skateboarding)
- [Copod](http://herebeben.com/copod)
- [Attack of the Gelatinous Blob](http://attackofthegelatinousblob.com/)
- [Chaos](http://4realms.net/)
- [Mythruna](https://mythruna.com/)
- [PirateHell](http://www.desura.com/games/piratehell)
- [3089 (on steam)](http://store.steampowered.com/app/263360/)
- [3079 (on steam)](http://store.steampowered.com/app/259620/)
- [Boardtastic 2](https://boardtastic-2.fileplanet.com/apk)
- [Attack of the Gelatinous Blob](https://attack-gelatinous-blob.softwareandgames.com/)
- [Mythruna](http://mythruna.com/)
- [PirateHell (on Steam)](https://store.steampowered.com/app/321080/Pirate_Hell/)
- [3089 (on Steam)](http://store.steampowered.com/app/263360/)
- [3079 (on Steam)](http://store.steampowered.com/app/259620/)
- [Lightspeed Frontier (on Steam)](https://store.steampowered.com/app/548650/Lightspeed_Frontier/)
- [Skullstone](http://www.skullstonegame.com/)
- [Spoxel (on Steam)](https://store.steampowered.com/app/746880/Spoxel/)
- [Nine Circles of Hell (on Steam)](https://store.steampowered.com/app/1200600/Nine_Circles_of_Hell/)
- [Leap](https://gamejolt.com/games/leap/313308)
- [Jumping Jack Flag](http://timealias.bplaced.net/jack/)
## Getting started
@ -33,8 +37,8 @@ Note: The master branch on GitHub is a development version of the engine and is
- NetBeans Platform
- Gradle
Plus a bunch of awesome libraries & tight integrations like Bullet, Blender, NiftyGUI and other goodies.
Plus a bunch of awesome libraries & tight integrations like Bullet, NiftyGUI and other goodies.
### Documentation
Did you miss it? Don't sweat it, [here it is again](https://jmonkeyengine.github.io/wiki).

View File

@ -1,21 +1,35 @@
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5'
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'me.tatarka:gradle-retrolambda:3.7.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
apply plugin: 'base'
apply from: file('version.gradle')
apply plugin: 'me.tatarka.retrolambda'
// This is applied to all sub projects
subprojects {
if(!project.name.equals('jme3-android-examples')) {
apply from: rootProject.file('common.gradle')
if (!['jme3-testdata', 'sdk'].contains(project.name)) {
if (!project.name.equals('jme3-testdata')) {
apply from: rootProject.file('bintray.gradle')
}
} else {
@ -29,31 +43,32 @@ task run(dependsOn: ':jme3-examples:run') {
defaultTasks 'run'
task libDist(dependsOn: subprojects.build) << {
// description 'Builds and copies the engine binaries, sources and javadoc to build/libDist'
File libFolder = mkdir("$buildDir/libDist/lib")
File sourceFolder = mkdir("$buildDir/libDist/sources")
File javadocFolder = mkdir("$buildDir/libDist/javadoc")
subprojects.each {project ->
if(project.ext.mainClass == ''){
project.tasks.withType(Jar).each {archiveTask ->
if(archiveTask.classifier == "sources"){
copy {
from archiveTask.archivePath
into sourceFolder
rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension}
}
} else if(archiveTask.classifier == "javadoc"){
copy {
from archiveTask.archivePath
into javadocFolder
rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension}
}
} else{
copy {
from archiveTask.archivePath
into libFolder
rename {project.name + '.' + archiveTask.extension}
task libDist(dependsOn: subprojects.build, description: 'Builds and copies the engine binaries, sources and javadoc to build/libDist') {
doLast {
File libFolder = mkdir("$buildDir/libDist/lib")
File sourceFolder = mkdir("$buildDir/libDist/sources")
File javadocFolder = mkdir("$buildDir/libDist/javadoc")
subprojects.each {project ->
if(project.ext.mainClass == ''){
project.tasks.withType(Jar).each {archiveTask ->
if(archiveTask.classifier == "sources"){
copy {
from archiveTask.archivePath
into sourceFolder
rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension}
}
} else if(archiveTask.classifier == "javadoc"){
copy {
from archiveTask.archivePath
into javadocFolder
rename {project.name + '-' + archiveTask.classifier +'.'+ archiveTask.extension}
}
} else{
copy {
from archiveTask.archivePath
into libFolder
rename {project.name + '.' + archiveTask.extension}
}
}
}
}
@ -65,9 +80,9 @@ task createZipDistribution(type:Zip,dependsOn:["dist","libDist"], description:"P
archiveName "jME" + jmeFullVersion + ".zip"
into("/") {
from {"./dist"}
}
}
into("/sources") {
from {"$buildDir/libDist/sources"}
from {"$buildDir/libDist/sources"}
}
}
@ -87,21 +102,21 @@ task dist(dependsOn: [':jme3-examples:dist', 'mergedJavadoc']){
task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the projects.') {
title = 'jMonkeyEngine3'
destinationDir = mkdir("dist/javadoc")
options.encoding = 'UTF-8'
// Allows Javadoc to be generated on Java 8 despite doclint errors.
if (JavaVersion.current().isJava8Compatible()) {
options.addStringOption('Xdoclint:none', '-quiet')
}
options.overview = file("javadoc-overview.html")
// Note: The closures below are executed lazily.
source subprojects.collect {project ->
project.sourceSets*.allJava
}
// classpath = files(subprojects.collect {project ->
// project.sourceSets*.compileClasspath})
classpath = files(subprojects.collect {project ->
project.sourceSets*.compileClasspath})
// source {
// subprojects*.sourceSets*.main*.allSource
// }
@ -110,12 +125,13 @@ task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the pro
}
}
task mergedSource(type: Copy){
clean.dependsOn('cleanMergedJavadoc')
task cleanMergedJavadoc(type: Delete) {
delete file('dist/javadoc')
}
task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
gradleVersion = '2.13'
task mergedSource(type: Copy){
}
ext {
@ -136,13 +152,69 @@ task configureAndroidNDK {
if (System.env.ANDROID_NDK != null) {
ndkBuildPath = System.env.ANDROID_NDK + File.separator + ndkBuildFile
}
if (new File(ndkBuildPath).exists()) {
ndkExists = true
ndkCommandPath = ndkBuildPath
}
}
gradle.rootProject.ext.set("usePrebuildNatives", buildNativeProjects!="true");
if (skipPrebuildLibraries != "true" && buildNativeProjects != "true") {
String rootPath = rootProject.projectDir.absolutePath
Properties nativesSnasphotProp = new Properties()
File nativesSnasphotPropF = new File("${rootPath}/natives-snapshot.properties");
if (nativesSnasphotPropF.exists()) {
nativesSnasphotPropF.withInputStream { nativesSnasphotProp.load(it) }
String nativesSnasphot = nativesSnasphotProp.getProperty("natives.snapshot");
String nativesUrl = PREBUILD_NATIVES_URL.replace('${natives.snapshot}', nativesSnasphot)
println "Use natives snapshot: " + nativesUrl
String nativesZipFile = "${rootPath}" + File.separator + "build" + File.separator + nativesSnasphot + "-natives.zip"
String nativesPath = "${rootPath}" + File.separator + "build" + File.separator + "native"
task getNativesZipFile {
outputs.file nativesZipFile
doFirst {
File target = file(nativesZipFile);
println("Download natives from " + nativesUrl + " to " + nativesZipFile);
target.getParentFile().mkdirs();
ant.get(src: nativesUrl, dest: target);
}
}
task extractPrebuiltNatives {
inputs.file nativesZipFile
outputs.dir nativesPath
dependsOn getNativesZipFile
doFirst {
for (File src : zipTree(nativesZipFile)) {
String srcRel = src.getAbsolutePath().substring((int) (nativesZipFile.length() + 1));
srcRel = srcRel.substring(srcRel.indexOf(File.separator) + 1);
File dest = new File(nativesPath + File.separator + srcRel);
boolean doCopy = !(dest.exists() && dest.lastModified() > src.lastModified())
if (doCopy) {
println("Copy " + src + " " + dest);
dest.getParentFile().mkdirs();
Files.copy(src.toPath(), dest.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
}
}
}
assemble.dependsOn extractPrebuiltNatives
}
}
//class IncrementalReverseTask extends DefaultTask {
// @InputDirectory
// def File inputDir
@ -178,3 +250,14 @@ task configureAndroidNDK {
// enableAssertions = true // true by default
// }
//}
wrapper {
gradleVersion = '5.6.4'
}
retrolambda {
javaVersion JavaVersion.VERSION_1_7
incremental true
jvmArgs '-noverify'
}

View File

@ -1,7 +1,7 @@
apply plugin: 'com.android.application'
group = 'org.jmonkeyengine'
version = jmeVersion + '-' + jmeVersionTag
version = jmeFullVersion
sourceCompatibility = '1.6'

View File

@ -3,33 +3,50 @@
//
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'maven'
group = 'org.jmonkeyengine'
version = jmePomVersion
version = jmeFullVersion
sourceCompatibility = '1.7'
sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
gradle.projectsEvaluated {
tasks.withType(JavaCompile) { // compile-time options:
options.compilerArgs << '-Xlint:unchecked'
}
}
repositories {
mavenCentral()
maven {
url "http://nifty-gui.sourceforge.net/nifty-maven-repo"
}
}
configurations {
deployerJars
flatDir {
dirs rootProject.file('lib')
}
}
dependencies {
// Adding dependencies here will add the dependencies to each subproject.
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.0.28-beta'
testCompile group: 'org.mockito', name: 'mockito-core', version: '3.0.0'
testCompile group: 'org.easytesting', name: 'fest-assert-core', version: '2.0M10'
deployerJars "org.apache.maven.wagon:wagon-ssh:2.9"
testCompile 'org.codehaus.groovy:groovy-all:2.5.8'
}
// Uncomment if you want to see the status of every test that is run and
// the test output.
/*
test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
*/
jar {
manifest {
attributes 'Implementation-Title': 'jMonkeyEngine',
@ -40,11 +57,13 @@ jar {
javadoc {
failOnError = false
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.docTitle = "jMonkeyEngine ${jmeMainVersion} ${project.name} Javadoc"
options.windowTitle = "jMonkeyEngine ${jmeMainVersion} ${project.name} Javadoc"
options.header = "<b>jMonkeyEngine ${jmeMainVersion} ${project.name}</b>"
options.docTitle = "jMonkeyEngine ${jmeFullVersion} ${project.name} Javadoc"
options.windowTitle = "jMonkeyEngine ${jmeFullVersion} ${project.name} Javadoc"
options.header = "<b>jMonkeyEngine ${jmeFullVersion} ${project.name}</b>"
options.author = "true"
options.use = "true"
options.charSet = "UTF-8"
options.encoding = "UTF-8"
//disable doclint for JDK8, more quiet output
if (JavaVersion.current().isJava8Compatible()){
options.addStringOption('Xdoclint:none', '-quiet')
@ -116,17 +135,3 @@ artifacts {
archives writeFullPom.outputs.files[0]
}
uploadArchives {
repositories.mavenDeployer {
configuration = configurations.deployerJars
// disable this otherwise it will fill up the server with stale jars
uniqueVersion = false
repository(url: "scp://updates.jmonkeyengine.org/var/www/updates/maven") {
authentication(userName: "www-updater", privateKey: "private/www-updater.key")
}
pom.project pomConfig
}
}

View File

@ -1,11 +1,16 @@
# Version number used for plugins, only 3 numbers (e.g. 3.1.3)
jmeVersion = 3.1.0
# Version used for application and settings folder, no spaces!
jmeMainVersion = 3.1
# Version addition pre-alpha-svn, Stable, Beta
jmeVersionTag = SNAPSHOT
# Increment this each time jmeVersionTag changes but jmeVersion stays the same
jmeVersionTagID = 0
# Version number: Major.Minor.SubMinor (e.g. 3.3.0)
jmeVersion = 3.4.0
# Leave empty to autogenerate
# (use -PjmeVersionName="myVersion" from commandline to specify a custom version name )
jmeVersionName =
# If true, the version name will contain the commit hash
useCommitHashAsVersionName = false
# Set to true if a non-master branch name should be included in the automatically
# generated version.
includeBranchInVersion = false
# specify if JavaDoc should be built
buildJavaDoc = true
@ -14,21 +19,22 @@ buildJavaDoc = true
buildNativeProjects = false
buildAndroidExamples = false
buildForPlatforms = Linux64,Linux32,Windows64,Windows32,Mac64
# Forcefully ignore prebuilt libraries
skipPrebuildLibraries=false
# Path to android NDK for building native libraries
#ndkPath=/Users/normenhansen/Documents/Code-Import/android-ndk-r7
ndkPath = /opt/android-ndk-r10c
ndkPath = /opt/android-ndk-r16b
# Path for downloading native Bullet
bulletUrl = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bullet/bullet-2.82-r2704.zip
bulletFolder = bullet-2.82-r2704
bulletZipFile = bullet.zip
# Path for downloading NetBeans Base
netbeansUrl = http://download.netbeans.org/netbeans/8.0.2/final/zip/netbeans-8.0.2-201411181905-javase.zip
# 2.89+ (circa 26 April 2020, to avoid jMonkeyEngine issue #1283)
bulletUrl = https://github.com/bulletphysics/bullet3/archive/cd8cf7521cbb8b7808126a6adebd47bb83ea166a.zip
bulletFolder = bullet3-cd8cf7521cbb8b7808126a6adebd47bb83ea166a
bulletZipFile = bullet3.zip
# POM settings
POM_NAME=jMonkeyEngine
POM_DESCRIPTION=jMonkeyEngine is a 3D game engine for adventurous Java developers
POM_DESCRIPTION=jMonkeyEngine is a 3-D game engine for adventurous Java developers
POM_URL=http://jmonkeyengine.org
POM_SCM_URL=https://github.com/jMonkeyEngine/jmonkeyengine
POM_SCM_CONNECTION=scm:git:git://github.com/jMonkeyEngine/jmonkeyengine.git
@ -41,3 +47,5 @@ POM_INCEPTION_YEAR=2009
# Bintray settings to override in $HOME/.gradle/gradle.properties or ENV or commandline
bintray_user=
bintray_api_key=
PREBUILD_NATIVES_URL=https://dl.bintray.com/jmonkeyengine/files/${natives.snapshot}/jme3-natives.zip

Binary file not shown.

View File

@ -1,6 +1,5 @@
#Sat Apr 30 16:44:31 EDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip

48
gradlew vendored
View File

@ -1,4 +1,20 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
@ -28,16 +44,16 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
warn () {
echo "$*"
}
die ( ) {
die () {
echo
echo "$*"
echo
@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
@ -154,11 +170,19 @@ if $cygwin ; then
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

24
gradlew.bat vendored
View File

@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@ -49,7 +65,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@ -60,11 +75,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line

1
jme3-android-examples/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

View File

@ -1,29 +1,19 @@
dependencies {
compile project(':jme3-core')
compile project(':jme3-android')
compile project(':jme3-effects')
compile project(':jme3-bullet')
compile project(':jme3-bullet-native-android')
compile project(':jme3-networking')
compile project(':jme3-niftygui')
compile project(':jme3-plugins')
compile project(':jme3-terrain')
compile project(':jme3-testdata')
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 10
buildToolsVersion "22.0.1"
compileSdkVersion 28
buildToolsVersion "28.0.3"
lintOptions {
// Fix nifty gui referencing "java.awt" package.
disable 'InvalidPackage'
abortOnError false
}
defaultConfig {
applicationId "com.jme3.android"
minSdkVersion 10 // Android 2.3 GINGERBREAD
targetSdkVersion 22 // Android 5.1 LOLLIPOP
applicationId "org.jmonkeyengine.jme3androidexamples"
minSdkVersion 15 // Android 4.0.3 ICE CREAM SANDWICH
targetSdkVersion 28 // Android 9 PIE
versionCode 1
versionName "1.0" // TODO: from settings.gradle
}
@ -31,10 +21,44 @@ android {
buildTypes {
release {
minifyEnabled false
}
debug {
applicationIdSuffix ".debug"
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
assets {
srcDir 'src/assets'
srcDir '../jme3-testdata/src/main/resources'
srcDir '../jme3-examples/src/main/resources'
}
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:28.0.0'
compile project(':jme3-core')
compile project(':jme3-android')
compile project(':jme3-android-native')
compile project(':jme3-effects')
compile project(':jme3-bullet')
compile project(':jme3-bullet-native-android')
compile project(':jme3-networking')
compile project(':jme3-niftygui')
compile project(':jme3-plugins')
compile project(':jme3-terrain')
compile fileTree(dir: '../jme3-examples/build/libs', include: ['*.jar'], exclude: ['*sources*.*'])
// compile project(':jme3-examples')
}

View File

@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\potterec\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

View File

@ -0,0 +1,13 @@
package org.jmonkeyengine.jme3androidexamples;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}

View File

@ -1,20 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jme3.android">
package="org.jmonkeyengine.jme3androidexamples">
<!-- Tell the system that you need ES 2.0. -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<!-- Tell the system that you need distinct touches (for the zoom gesture). -->
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="true" />
<application android:label="@string/app_name" android:allowBackup="true">
<activity android:name="jme3test.android.TestChooserAndroid"
android:label="@string/app_name">
<application
android:allowBackup="true"
android:icon="@mipmap/mipmap_monkey"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</activity>
<activity
android:name=".TestActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="landscape">
</activity>
</application>
</manifest>
<!-- Tell the system that you need ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<!-- Tell the system that you need distinct touches (for the zoom gesture). -->
<uses-feature
android:name="android.hardware.touchscreen.multitouch.distinct"
android:required="true"/>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
</manifest>

Binary file not shown.

View File

@ -0,0 +1,39 @@
package jme3test.android;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
/**
* Test case to look for images stored in the Android drawable and mipmap directories. Image files are
* stored in the main->res->drawable-xxxx directories and main->res->mipmap-xxxx directories. The Android OS
* will choose the best matching image based on the device capabilities.
*
* @author iwgeric
*/
public class TestAndroidResources extends SimpleApplication {
@Override
public void simpleInitApp() {
// Create boxes with textures that are stored in the Android Resources Folders
// Images are stored in multiple Drawable and Mipmap directories. Android picks the ones that
// match the device size and density.
Box box1Mesh = new Box(1, 1, 1);
Geometry box1 = new Geometry("Monkey Box 1", box1Mesh);
Material mat1 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat1.setTexture("ColorMap", assetManager.loadTexture("drawable_monkey.png"));
box1.setMaterial(mat1);
box1.setLocalTranslation(-2, 0, 0);
rootNode.attachChild(box1);
Box box2Mesh = new Box(1, 1, 1);
Geometry box2 = new Geometry("Monkey Box 2", box2Mesh);
Material mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat2.setTexture("ColorMap", assetManager.loadTexture("mipmap_monkey.png"));
box2.setMaterial(mat2);
box2.setLocalTranslation(2, 0, 0);
rootNode.attachChild(box2);
}
}

View File

@ -0,0 +1,314 @@
package jme3test.android;
import com.jme3.app.SimpleApplication;
import com.jme3.input.Joystick;
import com.jme3.input.JoystickAxis;
import com.jme3.input.MouseInput;
import com.jme3.input.SensorJoystickAxis;
import com.jme3.input.controls.ActionListener;
import com.jme3.input.controls.AnalogListener;
import com.jme3.input.controls.MouseButtonTrigger;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.FastMath;
import com.jme3.math.Quaternion;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.Mesh;
import com.jme3.scene.shape.Box;
import com.jme3.scene.shape.Line;
import com.jme3.texture.Texture;
import com.jme3.util.IntMap;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Example Test Case to test using Android sensors as Joystick axes. Make sure to enable Joystick Events from
* the test chooser menus. Rotating the device will cause the block to rotate. Tapping the screen will cause the
* sensors to be calibrated (reset to zero) at the current orientation. Continuously tapping the screen causes
* the "rumble" to intensify until it reaches the maximum amount and then it shuts off.
*
* @author iwgeric
*/
public class TestAndroidSensors extends SimpleApplication implements ActionListener, AnalogListener {
private static final Logger logger = Logger.getLogger(TestAndroidSensors.class.getName());
private Geometry geomZero = null;
// Map of joysticks saved with the joyId as the key
private IntMap<Joystick> joystickMap = new IntMap<Joystick>();
// flag to allow for the joystick axis to be calibrated on startup
private boolean initialCalibrationComplete = false;
// mappings used for onAnalog
private final String ORIENTATION_X_PLUS = "Orientation_X_Plus";
private final String ORIENTATION_X_MINUS = "Orientation_X_Minus";
private final String ORIENTATION_Y_PLUS = "Orientation_Y_Plus";
private final String ORIENTATION_Y_MINUS = "Orientation_Y_Minus";
private final String ORIENTATION_Z_PLUS = "Orientation_Z_Plus";
private final String ORIENTATION_Z_MINUS = "Orientation_Z_Minus";
// variables to save the current rotation
// Used when controlling the geometry with device orientation
private float[] anglesCurrent = new float[]{0f, 0f, 0f};
private Quaternion rotationQuat = new Quaternion();
// switch to apply an absolute rotation (geometry.setLocalRotation) or
// an incremental constant rotation (geometry.rotate)
// Used when controlling the geometry with device orientation
private boolean useAbsolute = false;
// rotation speed to use when apply constant incremental rotation
// Used when controlling the geometry with device orientation
private float rotationSpeedX = 1f;
private float rotationSpeedY = 1f;
// current intensity of the rumble
float rumbleAmount = 0f;
// toggle to enable rumble
boolean enableRumble = true;
// toggle to enable device orientation in FlyByCamera
boolean enableFlyByCameraRotation = false;
// toggle to enable controlling geometry rotation
boolean enableGeometryRotation = true;
// Make sure to set joystickEventsEnabled = true in MainActivity for Android
private float toDegrees(float rad) {
return rad * FastMath.RAD_TO_DEG;
}
@Override
public void simpleInitApp() {
// useAbsolute = true;
// enableRumble = true;
if (enableFlyByCameraRotation) {
flyCam.setEnabled(true);
} else {
flyCam.setEnabled(false);
}
Mesh lineX = new Line(Vector3f.ZERO, Vector3f.ZERO.add(Vector3f.UNIT_X.mult(3)));
Mesh lineY = new Line(Vector3f.ZERO, Vector3f.ZERO.add(Vector3f.UNIT_Y.mult(3)));
Mesh lineZ = new Line(Vector3f.ZERO, Vector3f.ZERO.add(Vector3f.UNIT_Z.mult(3)));
Geometry geoX = new Geometry("X", lineX);
Material matX = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
matX.setColor("Color", ColorRGBA.Red);
matX.getAdditionalRenderState().setLineWidth(30);
geoX.setMaterial(matX);
rootNode.attachChild(geoX);
Geometry geoY = new Geometry("Y", lineY);
Material matY = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
matY.setColor("Color", ColorRGBA.Green);
matY.getAdditionalRenderState().setLineWidth(30);
geoY.setMaterial(matY);
rootNode.attachChild(geoY);
Geometry geoZ = new Geometry("Z", lineZ);
Material matZ = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
matZ.setColor("Color", ColorRGBA.Blue);
matZ.getAdditionalRenderState().setLineWidth(30);
geoZ.setMaterial(matZ);
rootNode.attachChild(geoZ);
Box b = new Box(1, 1, 1);
geomZero = new Geometry("Box", b);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.setColor("Color", ColorRGBA.Yellow);
Texture tex_ml = assetManager.loadTexture("Interface/Logo/Monkey.jpg");
mat.setTexture("ColorMap", tex_ml);
geomZero.setMaterial(mat);
geomZero.setLocalTranslation(Vector3f.ZERO);
geomZero.setLocalRotation(Quaternion.IDENTITY);
rootNode.attachChild(geomZero);
// Touch (aka MouseInput.BUTTON_LEFT) is used to record the starting
// orientation when using absolute rotations
inputManager.addMapping("MouseClick", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
inputManager.addListener(this, "MouseClick");
Joystick[] joysticks = inputManager.getJoysticks();
if (joysticks == null || joysticks.length < 1) {
logger.log(Level.INFO, "Cannot find any joysticks!");
} else {
// Joysticks return a value of 0 to 1 based on how far the stick is
// push on the axis. This value is then scaled based on how long
// during the frame the joystick axis has been in that position.
// If the joystick is push all the way for the whole frame,
// then the value in onAnalog is equal to tpf.
// If the joystick is push 1/2 way for the entire frame, then the
// onAnalog value is 1/2 tpf.
// Similarly, if the joystick is pushed to the maximum during a frame
// the value in onAnalog will also be scaled.
// For Android sensors, rotating the device 90deg is the same as
// pushing an actual joystick axis to the maximum.
logger.log(Level.INFO, "Number of joysticks: {0}", joysticks.length);
JoystickAxis axis;
for (Joystick joystick : joysticks) {
// Get and display all axes in joystick.
List<JoystickAxis> axes = joystick.getAxes();
for (JoystickAxis joystickAxis : axes) {
logger.log(Level.INFO, "{0} axis scan Name: {1}, LogicalId: {2}, AxisId: {3}",
new Object[]{joystick.getName(), joystickAxis.getName(), joystickAxis.getLogicalId(), joystickAxis.getAxisId()});
}
// Get specific axis based on LogicalId of the JoystickAxis
// If found, map axis
axis = joystick.getAxis(SensorJoystickAxis.ORIENTATION_X);
if (axis != null) {
axis.assignAxis(ORIENTATION_X_PLUS, ORIENTATION_X_MINUS);
inputManager.addListener(this, ORIENTATION_X_PLUS, ORIENTATION_X_MINUS);
logger.log(Level.INFO, "Found {0} Joystick, assigning mapping for X axis: {1}, with max value: {2}",
new Object[]{joystick.toString(), axis.toString(), ((SensorJoystickAxis) axis).getMaxRawValue()});
}
axis = joystick.getAxis(SensorJoystickAxis.ORIENTATION_Y);
if (axis != null) {
axis.assignAxis(ORIENTATION_Y_PLUS, ORIENTATION_Y_MINUS);
inputManager.addListener(this, ORIENTATION_Y_PLUS, ORIENTATION_Y_MINUS);
logger.log(Level.INFO, "Found {0} Joystick, assigning mapping for Y axis: {1}, with max value: {2}",
new Object[]{joystick.toString(), axis.toString(), ((SensorJoystickAxis) axis).getMaxRawValue()});
}
axis = joystick.getAxis(SensorJoystickAxis.ORIENTATION_Z);
if (axis != null) {
axis.assignAxis(ORIENTATION_Z_PLUS, ORIENTATION_Z_MINUS);
inputManager.addListener(this, ORIENTATION_Z_PLUS, ORIENTATION_Z_MINUS);
logger.log(Level.INFO, "Found {0} Joystick, assigning mapping for Z axis: {1}, with max value: {2}",
new Object[]{joystick.toString(), axis.toString(), ((SensorJoystickAxis) axis).getMaxRawValue()});
}
joystickMap.put(joystick.getJoyId(), joystick);
}
}
}
@Override
public void simpleUpdate(float tpf) {
if (!initialCalibrationComplete) {
// Calibrate the axis (set new zero position) if the axis
// is a sensor joystick axis
for (IntMap.Entry<Joystick> entry : joystickMap) {
for (JoystickAxis axis : entry.getValue().getAxes()) {
if (axis instanceof SensorJoystickAxis) {
logger.log(Level.INFO, "Calibrating Axis: {0}", axis.toString());
((SensorJoystickAxis) axis).calibrateCenter();
}
}
}
initialCalibrationComplete = true;
}
if (enableGeometryRotation) {
rotationQuat.fromAngles(anglesCurrent);
rotationQuat.normalizeLocal();
if (useAbsolute) {
geomZero.setLocalRotation(rotationQuat);
} else {
geomZero.rotate(rotationQuat);
}
anglesCurrent[0] = anglesCurrent[1] = anglesCurrent[2] = 0f;
}
}
public void onAction(String string, boolean pressed, float tpf) {
if (string.equalsIgnoreCase("MouseClick") && pressed) {
// Calibrate the axis (set new zero position) if the axis
// is a sensor joystick axis
for (IntMap.Entry<Joystick> entry : joystickMap) {
for (JoystickAxis axis : entry.getValue().getAxes()) {
if (axis instanceof SensorJoystickAxis) {
logger.log(Level.INFO, "Calibrating Axis: {0}", axis.toString());
((SensorJoystickAxis) axis).calibrateCenter();
}
}
}
if (enableRumble) {
// manipulate joystick rumble
for (IntMap.Entry<Joystick> entry : joystickMap) {
rumbleAmount += 0.1f;
if (rumbleAmount > 1f + FastMath.ZERO_TOLERANCE) {
rumbleAmount = 0f;
}
logger.log(Level.INFO, "rumbling with amount: {0}", rumbleAmount);
entry.getValue().rumble(rumbleAmount);
}
}
}
}
public void onAnalog(String string, float value, float tpf) {
logger.log(Level.INFO, "onAnalog for {0}, value: {1}, tpf: {2}",
new Object[]{string, value, tpf});
float scaledValue = value;
if (string.equalsIgnoreCase(ORIENTATION_X_PLUS)) {
if (useAbsolute) {
// set rotation amount
// divide by tpf to get back to actual axis value (0 to 1)
// multiply by 90deg so that 90deg = full axis (value = tpf)
anglesCurrent[0] = (scaledValue / tpf * FastMath.HALF_PI);
} else {
// apply an incremental rotation amount based on rotationSpeed
anglesCurrent[0] += scaledValue * rotationSpeedX;
}
}
if (string.equalsIgnoreCase(ORIENTATION_X_MINUS)) {
if (useAbsolute) {
// set rotation amount
// divide by tpf to get back to actual axis value (0 to 1)
// multiply by 90deg so that 90deg = full axis (value = tpf)
anglesCurrent[0] = (-scaledValue / tpf * FastMath.HALF_PI);
} else {
// apply an incremental rotation amount based on rotationSpeed
anglesCurrent[0] -= scaledValue * rotationSpeedX;
}
}
if (string.equalsIgnoreCase(ORIENTATION_Y_PLUS)) {
if (useAbsolute) {
// set rotation amount
// divide by tpf to get back to actual axis value (0 to 1)
// multiply by 90deg so that 90deg = full axis (value = tpf)
anglesCurrent[1] = (scaledValue / tpf * FastMath.HALF_PI);
} else {
// apply an incremental rotation amount based on rotationSpeed
anglesCurrent[1] += scaledValue * rotationSpeedY;
}
}
if (string.equalsIgnoreCase(ORIENTATION_Y_MINUS)) {
if (useAbsolute) {
// set rotation amount
// divide by tpf to get back to actual axis value (0 to 1)
// multiply by 90deg so that 90deg = full axis (value = tpf)
anglesCurrent[1] = (-scaledValue / tpf * FastMath.HALF_PI);
} else {
// apply an incremental rotation amount based on rotationSpeed
anglesCurrent[1] -= scaledValue * rotationSpeedY;
}
}
}
}

View File

@ -0,0 +1,354 @@
package jme3test.android;
import com.jme3.app.SimpleApplication;
import com.jme3.font.BitmapFont;
import com.jme3.font.BitmapText;
import com.jme3.font.Rectangle;
import com.jme3.input.*;
import com.jme3.input.controls.*;
import com.jme3.input.event.*;
import com.jme3.math.ColorRGBA;
import com.jme3.ui.Picture;
import java.text.NumberFormat;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Test for Android Touch Input integration into jME3.
*
* @author iwgeric
*/
public class TestAndroidTouch extends SimpleApplication {
private static final Logger logger = Logger.getLogger(TestAndroidTouch.class.getSimpleName());
private Picture picMouseBackground;
private Picture picMouseLeftButton;
private Picture picMouseDisabled;
private BitmapText textMouseAnalog;
private BitmapText textMouseLabel;
private BitmapText textMouseLocation;
private BitmapText textCursorLocation;
private BitmapText textKeyPressed;
private BitmapText textPhoneLabel;
private BitmapText textPhoneLocation;
private Picture picPhone;
private String touchMapping = "touch";
private String mappingKeyPrefix = "key-";
private String mappingMouseLeft = "mouse left";
private String mappingMouseXNeg = "mouse x neg";
private String mappingMouseXPos = "mouse x pos";
private String mappingMouseYNeg = "mouse y neg";
private String mappingMouseYPos = "mouse y pos";
private TouchListener touchListener = new MyTouchListener();
private ActionListener actionListener = new MyActionListener();
private AnalogListener analogListener = new MyAnalogListener();
private RawInputListener rawInputListener = new MyRawInputListener();
private NumberFormat analogFormat = NumberFormat.getNumberInstance();
private NumberFormat locationFormat = NumberFormat.getNumberInstance();
@Override
public void simpleInitApp() {
getViewPort().setBackgroundColor(ColorRGBA.White);
analogFormat.setMaximumFractionDigits(3);
analogFormat.setMinimumFractionDigits(3);
locationFormat.setMaximumFractionDigits(0);
locationFormat.setMinimumFractionDigits(0);
// Setup list of triggers based on different keyboard key codes. For Android, the soft keyboard key events
// are translated into jme key events.
int[] keyCodes = new int[] {
KeyInput.KEY_0, KeyInput.KEY_1, KeyInput.KEY_2, KeyInput.KEY_3, KeyInput.KEY_4, KeyInput.KEY_5,
KeyInput.KEY_6, KeyInput.KEY_7, KeyInput.KEY_8, KeyInput.KEY_9, KeyInput.KEY_DECIMAL, KeyInput.KEY_PERIOD,
KeyInput.KEY_A, KeyInput.KEY_B, KeyInput.KEY_C, KeyInput.KEY_D, KeyInput.KEY_E, KeyInput.KEY_F,
KeyInput.KEY_G, KeyInput.KEY_H, KeyInput.KEY_I, KeyInput.KEY_J, KeyInput.KEY_K, KeyInput.KEY_L,
KeyInput.KEY_M, KeyInput.KEY_N, KeyInput.KEY_O, KeyInput.KEY_P, KeyInput.KEY_Q, KeyInput.KEY_R,
KeyInput.KEY_S, KeyInput.KEY_T, KeyInput.KEY_U, KeyInput.KEY_V, KeyInput.KEY_W, KeyInput.KEY_X,
KeyInput.KEY_Y, KeyInput.KEY_Z, KeyInput.KEY_CAPITAL, KeyInput.KEY_LSHIFT, KeyInput.KEY_RSHIFT,
KeyInput.KEY_UP, KeyInput.KEY_DOWN, KeyInput.KEY_LEFT, KeyInput.KEY_RIGHT
};
for (int idx=0; idx<keyCodes.length; idx++) {
String keyMapping = mappingKeyPrefix + KeyNames.getName(keyCodes[idx]);
inputManager.addMapping(keyMapping, new KeyTrigger(keyCodes[idx]));
inputManager.addListener(actionListener, keyMapping);
logger.log(Level.INFO, "Adding key mapping: {0}", keyMapping);
}
// setup InputManager to trigger our listeners when the various triggers are received.
// Touch inputs are all sent to the TouchTrigger. To have one mapping for all touch events, use TouchInput.ALL.
inputManager.addMapping(touchMapping, new TouchTrigger(TouchInput.ALL));
inputManager.addListener(touchListener, touchMapping);
// If inputManager.isSimulateMouse = true, touch events will be translated into Mouse Button and Axis events.
// To enable this, call inputManager.setSimulateMouse(true).
inputManager.addMapping(mappingMouseLeft, new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
inputManager.addListener(actionListener, mappingMouseLeft);
inputManager.addMapping(mappingMouseXNeg, new MouseAxisTrigger(MouseInput.AXIS_X, true));
inputManager.addMapping(mappingMouseXPos, new MouseAxisTrigger(MouseInput.AXIS_X, false));
inputManager.addMapping(mappingMouseYNeg, new MouseAxisTrigger(MouseInput.AXIS_Y, true));
inputManager.addMapping(mappingMouseYPos, new MouseAxisTrigger(MouseInput.AXIS_Y, false));
inputManager.addListener(analogListener, mappingMouseXNeg, mappingMouseXPos, mappingMouseYNeg, mappingMouseYPos);
// add raw input listener to inputManager
inputManager.addRawInputListener(rawInputListener);
float mouseSize = (settings.getWidth() >= settings.getHeight())? settings.getHeight()/2f: settings.getWidth()/2f;
picMouseBackground = new Picture("Mouse Background");
picMouseBackground.setImage(assetManager, "mouse_none.png", true);
picMouseBackground.setWidth(mouseSize);
picMouseBackground.setHeight(mouseSize);
picMouseBackground.setLocalTranslation(settings.getWidth()-mouseSize, 0f, 0f);
picMouseLeftButton = new Picture("Mouse Button Left");
picMouseLeftButton.setImage(assetManager, "mouse_left.png", true);
picMouseLeftButton.setWidth(mouseSize);
picMouseLeftButton.setHeight(mouseSize);
picMouseLeftButton.setLocalTranslation(settings.getWidth()-mouseSize, 0f, 1f);
picMouseDisabled = new Picture("Mouse Disabled");
picMouseDisabled.setImage(assetManager, "mouse_disabled.png", true);
picMouseDisabled.setWidth(mouseSize);
picMouseDisabled.setHeight(mouseSize);
picMouseDisabled.setLocalTranslation(settings.getWidth()-mouseSize, 0f, 1f);
float phoneSize = (settings.getWidth() >= settings.getHeight())? settings.getHeight()/2f: settings.getWidth()/2f;
// preload images to send data to gpu to avoid hesitations during run time the first time the image is displayed
renderManager.preloadScene(picMouseBackground);
renderManager.preloadScene(picMouseLeftButton);
renderManager.preloadScene(picMouseDisabled);
guiNode.attachChild(picMouseBackground);
if (inputManager.isSimulateMouse()) {
picMouseDisabled.removeFromParent();
} else {
guiNode.attachChild(picMouseDisabled);
}
textMouseLabel = new BitmapText(guiFont, false);
textMouseLabel.setSize(mouseSize/10f);
textMouseLabel.setColor(ColorRGBA.Blue);
textMouseLabel.setBox(new Rectangle(0f, 0f, mouseSize, mouseSize/5f));
textMouseLabel.setAlignment(BitmapFont.Align.Center);
textMouseLabel.setVerticalAlignment(BitmapFont.VAlign.Bottom);
textMouseLabel.setText("Mouse Analog\nand Position");
textMouseLabel.setLocalTranslation(settings.getWidth()-mouseSize, mouseSize*1.25f, 1f);
guiNode.attachChild(textMouseLabel);
textMouseAnalog = new BitmapText(guiFont, false);
textMouseAnalog.setSize(mouseSize/10f);
textMouseAnalog.setColor(ColorRGBA.Blue);
textMouseAnalog.setBox(new Rectangle(0f, 0f, mouseSize, mouseSize/10f));
textMouseAnalog.setAlignment(BitmapFont.Align.Center);
textMouseAnalog.setVerticalAlignment(BitmapFont.VAlign.Center);
textMouseAnalog.setText("0.000, 0.000");
textMouseAnalog.setLocalTranslation(settings.getWidth()-mouseSize, mouseSize/2f, 2f);
guiNode.attachChild(textMouseAnalog);
textMouseLocation = new BitmapText(guiFont, false);
textMouseLocation.setSize(mouseSize/10f);
textMouseLocation.setColor(ColorRGBA.Blue);
textMouseLocation.setBox(new Rectangle(0f, 0f, mouseSize, mouseSize/10f));
textMouseLocation.setAlignment(BitmapFont.Align.Center);
textMouseLocation.setVerticalAlignment(BitmapFont.VAlign.Center);
textMouseLocation.setText("0, 0");
textMouseLocation.setLocalTranslation(settings.getWidth()-mouseSize, mouseSize/2f-mouseSize/10f, 2f);
guiNode.attachChild(textMouseLocation);
textCursorLocation = new BitmapText(guiFont, false);
textCursorLocation.setSize(mouseSize/10f);
textCursorLocation.setColor(ColorRGBA.Blue);
textCursorLocation.setBox(new Rectangle(0f, 0f, mouseSize, mouseSize/10f));
textCursorLocation.setAlignment(BitmapFont.Align.Center);
textCursorLocation.setVerticalAlignment(BitmapFont.VAlign.Center);
textCursorLocation.setText("0, 0");
textCursorLocation.setLocalTranslation(settings.getWidth()-mouseSize, mouseSize/2f-mouseSize/10f*2f, 2f);
guiNode.attachChild(textCursorLocation);
textKeyPressed = new BitmapText(guiFont, false);
textKeyPressed.setSize(mouseSize/10f);
textKeyPressed.setColor(ColorRGBA.Blue);
textKeyPressed.setBox(new Rectangle(0f, 0f, settings.getWidth(), mouseSize/10f));
textKeyPressed.setAlignment(BitmapFont.Align.Center);
textKeyPressed.setVerticalAlignment(BitmapFont.VAlign.Top);
textKeyPressed.setText("Last Key Pressed: None");
textKeyPressed.setLocalTranslation(0f, settings.getHeight()-mouseSize/10f, 2f);
guiNode.attachChild(textKeyPressed);
picPhone = new Picture("Phone");
picPhone.setImage(assetManager, "phone_landscape.png", true);
picPhone.setWidth(phoneSize);
picPhone.setHeight(phoneSize);
picPhone.setLocalTranslation(picMouseBackground.getLocalTranslation().x - phoneSize, 0f, 1f);
guiNode.attachChild(picPhone);
textPhoneLocation = new BitmapText(guiFont, false);
textPhoneLocation.setSize(phoneSize/10f);
textPhoneLocation.setColor(ColorRGBA.White);
textPhoneLocation.setBox(new Rectangle(0f, 0f, phoneSize, phoneSize/10f));
textPhoneLocation.setAlignment(BitmapFont.Align.Center);
textPhoneLocation.setVerticalAlignment(BitmapFont.VAlign.Center);
textPhoneLocation.setText("0, 0");
textPhoneLocation.setLocalTranslation(picMouseBackground.getLocalTranslation().x - phoneSize, phoneSize*0.5f, 2f);
guiNode.attachChild(textPhoneLocation);
textPhoneLabel = new BitmapText(guiFont, false);
textPhoneLabel.setSize(phoneSize/10f);
textPhoneLabel.setColor(ColorRGBA.Blue);
textPhoneLabel.setBox(new Rectangle(0f, 0f, phoneSize, phoneSize/10f));
textPhoneLabel.setAlignment(BitmapFont.Align.Center);
textPhoneLabel.setVerticalAlignment(BitmapFont.VAlign.Bottom);
textPhoneLabel.setText("Touch Location");
textPhoneLabel.setLocalTranslation(picMouseBackground.getLocalTranslation().x - phoneSize, picPhone.getLocalTranslation().y + phoneSize*0.75f, 1f);
guiNode.attachChild(textPhoneLabel);
renderManager.preloadScene(picPhone);
}
private class MyTouchListener implements TouchListener {
@Override
public void onTouch(String name, TouchEvent event, float tpf) {
String touchEvent = event.toString();
logger.log(Level.INFO, "TouchListenerEvent: {0}", touchEvent);
switch (event.getType()) {
case DOWN:
case UP:
case MOVE:
case SCROLL:
textPhoneLocation.setText(
String.valueOf(locationFormat.format(event.getX())) + ", " +
String.valueOf(locationFormat.format(event.getY())));
break;
default:
}
}
}
protected class MyActionListener implements ActionListener {
@Override
public void onAction(String name, boolean isPressed, float tpf) {
logger.log(Level.INFO, "ActionListenerEvent[name:{0}, pressed: {1}, tpf: {2}",
new Object[]{name, isPressed, tpf});
if (name.equalsIgnoreCase(mappingMouseLeft)) {
if (isPressed) {
guiNode.attachChild(picMouseLeftButton);
} else {
picMouseLeftButton.removeFromParent();
}
textCursorLocation.setText(
String.valueOf(locationFormat.format(inputManager.getCursorPosition().getX())) + ", " +
String.valueOf(locationFormat.format(inputManager.getCursorPosition().getY())));
} else if (name.startsWith(mappingKeyPrefix)) {
logger.log(Level.INFO, "key event name: {0}, pressed: {1}", new Object[]{name, isPressed});
if (isPressed) {
textKeyPressed.setText("Last Key Pressed: " + name.substring(mappingKeyPrefix.length(), name.length()));
} else {
// textKeyPressed.setText("Key Pressed: None");
}
}
}
}
protected class MyAnalogListener implements AnalogListener {
float lastValueX = 0;
float lastValueY = 0;
@Override
public void onAnalog(String name, float value, float tpf) {
logger.log(Level.INFO, "AnalogListenerEvent[name:{0}, value: {1}, tpf: {2}",
new Object[]{name, value, tpf});
if (name.equalsIgnoreCase(mappingMouseXPos)) {
setValueX(value);
} else if (name.equalsIgnoreCase(mappingMouseXNeg)) {
setValueX(-value);
} else if (name.equalsIgnoreCase(mappingMouseYPos)) {
setValueY(value);
} else if (name.equalsIgnoreCase(mappingMouseYNeg)) {
setValueY(-value);
}
}
public void setValueX(float x) {
lastValueX = x;
textMouseAnalog.setText(
String.valueOf(analogFormat.format(lastValueX)) + ", " + String.valueOf(analogFormat.format(lastValueY)));
textCursorLocation.setText(
String.valueOf(locationFormat.format(inputManager.getCursorPosition().getX())) + ", " +
String.valueOf(locationFormat.format(inputManager.getCursorPosition().getY())));
}
public void setValueY(float y) {
lastValueY = y;
textMouseAnalog.setText(
String.valueOf(analogFormat.format(lastValueX)) + ", " + String.valueOf(analogFormat.format(lastValueY)));
textCursorLocation.setText(
String.valueOf(locationFormat.format(inputManager.getCursorPosition().getX())) + ", " +
String.valueOf(locationFormat.format(inputManager.getCursorPosition().getY())));
}
}
protected class MyRawInputListener implements RawInputListener {
@Override
public void beginInput() {
// logger.log(Level.INFO, "RawInputListenerEvent: BeginInput");
}
@Override
public void endInput() {
// logger.log(Level.INFO, "RawInputListenerEvent: EndInput");
}
@Override
public void onJoyAxisEvent(JoyAxisEvent event) {
logger.log(Level.INFO, "RawInputListenerEvent: {0}", event);
}
@Override
public void onJoyButtonEvent(JoyButtonEvent event) {
logger.log(Level.INFO, "RawInputListenerEvent: {0}", event);
}
@Override
public void onMouseMotionEvent(MouseMotionEvent event) {
logger.log(Level.INFO, "RawInputListenerEvent: {0}", event);
textMouseLocation.setText(
String.valueOf(locationFormat.format(event.getX())) + ", " + String.valueOf(locationFormat.format(event.getY())));
}
@Override
public void onMouseButtonEvent(MouseButtonEvent event) {
logger.log(Level.INFO, "RawInputListenerEvent: {0}", event);
textMouseLocation.setText(
String.valueOf(locationFormat.format(event.getX())) + ", " + String.valueOf(locationFormat.format(event.getY())));
}
@Override
public void onKeyEvent(KeyInputEvent event) {
logger.log(Level.INFO, "RawInputListenerEvent: {0}", event);
}
@Override
public void onTouchEvent(TouchEvent event) {
logger.log(Level.INFO, "RawInputListenerEvent: {0}", event);
}
}
}

View File

@ -1,12 +0,0 @@
package jme3test.android;
import android.content.pm.ActivityInfo;
import android.app.*;
import android.os.Bundle;
public class TestChooserAndroid extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
}

View File

@ -0,0 +1,165 @@
package org.jmonkeyengine.jme3androidexamples;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Filter;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
public class CustomArrayAdapter extends ArrayAdapter<String> {
private static final String TAG = "CustomArrayAdapter";
/* List of items */
private List<String> entries;
private Context activity;
/* Position of selected answer */
private int selectedPosition = -1;
/* Background Color of selected item */
private int selectedBackgroundColor = 0xffff00;
/* Background Color of non selected item */
private int nonselectedBackgroundColor = 0x000000;
/* Background Drawable Resource ID of selected item */
private int selectedBackgroundResource = 0;
/* Background Drawable Resource ID of non selected items */
private int nonselectedBackgroundResource = 0;
/* Variables to support list filtering */
private ArrayList<String> filteredEntries;
private Filter filter;
public CustomArrayAdapter(Context context, int textViewResourceId, List<String> objects) {
super(context, textViewResourceId, objects);
activity = context;
entries = new ArrayList<String>(objects);
filteredEntries = new ArrayList<String>(objects);
filter = new ClassNameFilter();
}
/** Setter for selected item position */
public void setSelectedPosition(int selectedPosition) {
this.selectedPosition = selectedPosition;
Log.i(TAG, "Setting position to: " + this.selectedPosition);
}
/** Setter for selected item background color */
public void setSelectedBackgroundColor(int selectedBackgroundColor) {
this.selectedBackgroundColor = selectedBackgroundColor;
}
/** Setter for non selected background color */
public void setNonSelectedBackgroundColor(int nonselectedBackgroundColor) {
this.nonselectedBackgroundColor = nonselectedBackgroundColor;
}
/** Setter for selected item background resource id*/
public void setSelectedBackgroundResource(int selectedBackgroundResource) {
this.selectedBackgroundResource = selectedBackgroundResource;
}
/** Setter for non selected background resource id*/
public void setNonSelectedBackgroundResource(int nonselectedBackgroundResource) {
this.nonselectedBackgroundResource = nonselectedBackgroundResource;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Log.i(TAG, "getView for position: " + position + " with selectedItem: " + selectedPosition);
View v = convertView;
ViewHolder holder;
if (v == null) {
LayoutInflater vi =
(LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.test_chooser_row, null);
holder = new ViewHolder();
holder.textView = (TextView) v.findViewById(R.id.txtClassName);
holder.layoutRow = (LinearLayout) v.findViewById(R.id.layoutTestChooserRow);
v.setTag(holder);
} else {
holder=(ViewHolder)v.getTag();
}
final String itemText = filteredEntries.get(position);
if (itemText != null) {
holder.textView.setText(itemText);
if (position == selectedPosition) {
Log.i(TAG, "setting Background Color to: " + selectedBackgroundColor);
// holder.textView.setBackgroundColor(selectedBackgroundColor);
// holder.textView.setBackgroundResource(selectedBackgroundResource);
holder.layoutRow.setBackgroundResource(selectedBackgroundResource);
} else {
Log.i(TAG, "setting Background Color to: " + nonselectedBackgroundColor);
// holder.textView.setBackgroundColor(nonselectedBackgroundColor);
// holder.textView.setBackgroundResource(nonselectedBackgroundResource);
holder.layoutRow.setBackgroundResource(nonselectedBackgroundResource);
}
}
return v;
}
@Override
public Filter getFilter(){
if(filter == null){
filter = new ClassNameFilter();
}
return filter;
}
public static class ViewHolder{
public TextView textView;
public LinearLayout layoutRow;
}
private class ClassNameFilter extends Filter{
@Override
protected FilterResults performFiltering(CharSequence constraint){
FilterResults results = new FilterResults();
String prefix = constraint.toString().toLowerCase();
Log.i(TAG, "performFiltering: entries size: " + entries.size());
if (prefix == null || prefix.length() == 0){
ArrayList<String> list = new ArrayList<String>(entries);
results.values = list;
results.count = list.size();
Log.i(TAG, "clearing filter with size: " + list.size());
}else{
final ArrayList<String> list = new ArrayList<String>(entries);
final ArrayList<String> nlist = new ArrayList<String>();
int count = list.size();
for (int i = 0; i<count; i++){
if(list.get(i).toLowerCase().contains(prefix)){
nlist.add(list.get(i));
}
results.values = nlist;
results.count = nlist.size();
}
Log.i(TAG, "filtered list size: " + nlist.size() + ", entries size: " + entries.size());
}
Log.i(TAG, "Returning filter count: " + results.count);
return results;
}
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
filteredEntries = (ArrayList<String>)results.values;
notifyDataSetChanged();
clear();
int count = filteredEntries.size();
for(int i = 0; i<count; i++){
add(filteredEntries.get(i));
notifyDataSetInvalidated();
}
Log.i(TAG, "publishing results with size: " + count);
}
}
}

View File

@ -0,0 +1,85 @@
package org.jmonkeyengine.jme3androidexamples;
import android.os.Bundle;
import com.jme3.app.AndroidHarnessFragment;
import java.util.logging.Level;
import java.util.logging.LogManager;
/**
* A placeholder fragment containing a jME GLSurfaceView.
*/
public class JmeFragment extends AndroidHarnessFragment {
public JmeFragment() {
// Set the desired EGL configuration
eglBitsPerPixel = 24;
eglAlphaBits = 0;
eglDepthBits = 16;
eglSamples = 0;
eglStencilBits = 0;
// Set the maximum framerate
// (default = -1 for unlimited)
frameRate = -1;
// Set the maximum resolution dimension
// (the smaller side, height or width, is set automatically
// to maintain the original device screen aspect ratio)
// (default = -1 to match device screen resolution)
maxResolutionDimension = -1;
/*
Skip these settings and use the settings stored in the Bundle retrieved during onCreate.
// Set main project class (fully qualified path)
appClass = "";
// Set input configuration settings
joystickEventsEnabled = false;
keyEventsEnabled = true;
mouseEventsEnabled = true;
*/
// Set application exit settings
finishOnAppStop = true;
handleExitHook = true;
exitDialogTitle = "Do you want to exit?";
exitDialogMessage = "Use your home key to bring this app into the background or exit to terminate it.";
// Set splash screen resource id, if used
// (default = 0, no splash screen)
// For example, if the image file name is "splash"...
// splashPicID = R.drawable.splash;
splashPicID = 0;
// splashPicID = R.drawable.android_splash;
// Set the default logging level (default=Level.INFO, Level.ALL=All Debug Info)
LogManager.getLogManager().getLogger("").setLevel(Level.INFO);
}
@Override
public void onCreate(Bundle savedInstanceState) {
Bundle bundle=getArguments();
appClass = bundle.getString(MainActivity.SELECTED_APP_CLASS);
// Log.d(this.getClass().getSimpleName(), "AppClass: " + appClass);
joystickEventsEnabled = bundle.getBoolean(MainActivity.ENABLE_JOYSTICK_EVENTS);
// Log.d(this.getClass().getSimpleName(), "JoystickEventsEnabled: " + joystickEventsEnabled);
keyEventsEnabled = bundle.getBoolean(MainActivity.ENABLE_KEY_EVENTS);
// Log.d(this.getClass().getSimpleName(), "KeyEventsEnabled: " + keyEventsEnabled);
mouseEventsEnabled = bundle.getBoolean(MainActivity.ENABLE_MOUSE_EVENTS);
// Log.d(this.getClass().getSimpleName(), "MouseEventsEnabled: " + mouseEventsEnabled);
boolean verboseLogging = bundle.getBoolean(MainActivity.VERBOSE_LOGGING);
// Log.d(this.getClass().getSimpleName(), "VerboseLogging: " + verboseLogging);
if (verboseLogging) {
// Set the default logging level (default=Level.INFO, Level.ALL=All Debug Info)
LogManager.getLogManager().getLogger("").setLevel(Level.ALL);
} else {
// Set the default logging level (default=Level.INFO, Level.ALL=All Debug Info)
LogManager.getLogManager().getLogger("").setLevel(Level.INFO);
}
super.onCreate(savedInstanceState);
}
}

View File

@ -0,0 +1,458 @@
package org.jmonkeyengine.jme3androidexamples;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import com.jme3.app.Application;
import dalvik.system.DexFile;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
//TODO: Create onscreen virtual keypad for triggering normal mapped keys used by test apps or modify test apps for touch with onscreen keypad
/**
* Main Activity started by the application. Users select different jME3 test
* applications that are started via TestsHarness Activity.
* @author iwgeric
*/
public class MainActivity extends AppCompatActivity implements OnItemClickListener, View.OnClickListener, TextWatcher {
private static final String TAG = "MainActivity";
/**
* Static String to pass the key for the selected test app to the
* TestsHarness class to start the application. Also used to store the
* current selection to the savedInstanceState Bundle.
*/
public static final String SELECTED_APP_CLASS = "Selected_App_Class";
/**
* Static String to pass the key for the selected list position to the
* savedInstanceState Bundle so the list position can be restored after
* exiting the test application.
*/
public static final String SELECTED_LIST_POSITION = "Selected_List_Position";
/**
* Static String to pass the key for the setting for enabling mouse events to the
* savedInstanceState Bundle.
*/
public static final String ENABLE_MOUSE_EVENTS = "Enable_Mouse_Events";
/**
* Static String to pass the key for the setting for enabling joystick events to the
* savedInstanceState Bundle.
*/
public static final String ENABLE_JOYSTICK_EVENTS = "Enable_Joystick_Events";
/**
* Static String to pass the key for the setting for enabling key events to the
* savedInstanceState Bundle.
*/
public static final String ENABLE_KEY_EVENTS = "Enable_Key_Events";
/**
* Static String to pass the key for the setting for verbose logging to the
* savedInstanceState Bundle.
*/
public static final String VERBOSE_LOGGING = "Verbose_Logging";
/* Fields to contain the current position and display contents of the spinner */
private int currentPosition = 0;
private String currentSelection = "";
private List<String> classNames = new ArrayList<String>();
private List<String> exclusions = new ArrayList<String>();
private String rootPackage;
/* ListView that displays the test application class names. */
private ListView listClasses;
/* ArrayAdapter connects the spinner widget to array-based data. */
private CustomArrayAdapter arrayAdapter;
/* Buttons to start application or stop the activity. */
private Button btnOK;
private Button btnCancel;
/* Filter Edit Box */
EditText editFilterText;
/* Custom settings for the test app */
private boolean enableMouseEvents = true;
private boolean enableJoystickEvents = false;
private boolean enableKeyEvents = true;
private boolean verboseLogging = false;
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
Log.d(TAG, "Restoring selections in onCreate: "
+ "position: " + savedInstanceState.getInt(SELECTED_LIST_POSITION, 0)
+ "class: " + savedInstanceState.getString(SELECTED_APP_CLASS)
);
currentPosition = savedInstanceState.getInt(SELECTED_LIST_POSITION, 0);
currentSelection = savedInstanceState.getString(SELECTED_APP_CLASS);
enableMouseEvents = savedInstanceState.getBoolean(ENABLE_MOUSE_EVENTS, true);
enableJoystickEvents = savedInstanceState.getBoolean(ENABLE_JOYSTICK_EVENTS, false);
enableKeyEvents = savedInstanceState.getBoolean(ENABLE_KEY_EVENTS, true);
verboseLogging = savedInstanceState.getBoolean(VERBOSE_LOGGING, true);
}
/* Set content view and register views */
setContentView(R.layout.test_chooser_layout);
btnOK = (Button) findViewById(R.id.btnOK);
btnCancel = (Button) findViewById(R.id.btnCancel);
listClasses = (ListView) findViewById(R.id.listClasses);
editFilterText = (EditText) findViewById(R.id.txtFilter);
/* Define the root package to start with */
rootPackage = "jme3test";
/* Create an array of Strings to define which classes to exclude */
exclusions.add("$"); // inner classes
exclusions.add("TestChooser"); // Desktop test chooser class
exclusions.add("awt"); // Desktop test chooser class
// mExclusions.add("");
/*
* Read the class names from the dex file and filter based on
* name and super class.
*/
Log.d(TAG, "Composing Test list...");
ApplicationInfo ai = this.getApplicationInfo();
String classPath = ai.sourceDir;
DexFile dex = null;
Enumeration<String> apkClassNames = null;
try {
dex = new DexFile(classPath);
apkClassNames = dex.entries();
while (apkClassNames.hasMoreElements()) {
String className = apkClassNames.nextElement();
if (checkClassName(className) && checkClassType(className)) {
classNames.add(className);
}
// classNames.add(className);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
dex.close();
} catch (IOException e) {
e.printStackTrace();
}
}
/*
* Create a backing Adapter for the List View from a list of the
* classes. The list is defined by array of class names.
*/
arrayAdapter = new CustomArrayAdapter(
this,
R.layout.test_chooser_row, // text view to display selection
classNames // array of strings to display
);
/* Set the resource id for selected and non selected backgrounds */
Log.d(TAG, "Setting Adapter Background Resource IDs");
arrayAdapter.setSelectedBackgroundResource(R.drawable.selected);
arrayAdapter.setNonSelectedBackgroundResource(R.drawable.nonselected);
/* Attach the Adapter to the spinner */
Log.d(TAG, "Setting ListView Adapter");
listClasses.setAdapter(arrayAdapter);
/* Set initial selection for the list */
setSelection(currentPosition);
/* Set Click and Text Changed listeners */
listClasses.setOnItemClickListener(this);
btnOK.setOnClickListener(this);
btnCancel.setOnClickListener(this);
editFilterText.addTextChangedListener(this);
}
/**
* User selected an application. Sets the current selection and redraws
* the list view to highlight the selected item.
* @param parent AdapterView tied to the list
* @param view The ListView
* @param position Selection position in the list of class names
* @param id
*/
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
setSelection(position);
}
/**
* User clicked a view on the screen. Check for the OK and Cancel buttons
* and either start the application or exit.
* @param view
*/
public void onClick(View view) {
if (view.equals(btnOK)) {
/* Get selected class, pack it in the intent and start the test app */
Log.d(TAG, "User selected OK for class: " + currentSelection);
Intent intent = new Intent(this, TestActivity.class);
// intent.putExtra(SELECTED_APP_CLASS, currentSelection);
// intent.putExtra(ENABLE_MOUSE_EVENTS, enableMouseEvents);
// intent.putExtra(ENABLE_JOYSTICK_EVENTS, enableJoystickEvents);
// intent.putExtra(ENABLE_KEY_EVENTS, enableKeyEvents);
Bundle args = new Bundle();
args.putString(MainActivity.SELECTED_APP_CLASS, currentSelection);
// Log.d(this.getClass().getSimpleName(), "AppClass="+currentSelection);
args.putBoolean(MainActivity.ENABLE_MOUSE_EVENTS, enableMouseEvents);
// Log.d(TestActivity.class.getSimpleName(), "MouseEnabled="+enableMouseEvents);
args.putBoolean(MainActivity.ENABLE_JOYSTICK_EVENTS, enableJoystickEvents);
// Log.d(TestActivity.class.getSimpleName(), "JoystickEnabled="+enableJoystickEvents);
args.putBoolean(MainActivity.ENABLE_KEY_EVENTS, enableKeyEvents);
// Log.d(TestActivity.class.getSimpleName(), "KeyEnabled="+enableKeyEvents);
args.putBoolean(MainActivity.VERBOSE_LOGGING, verboseLogging);
// Log.d(TestActivity.class.getSimpleName(), "VerboseLogging="+verboseLogging);
intent.putExtras(args);
startActivity(intent);
} else if (view.equals(btnCancel)) {
/* Exit */
Log.d(TAG, "User selected Cancel");
finish();
}
}
/**
* Check class name to see if the class is in the root package and if it
* contains any of the exclusion strings
* @param className Class name to check
* @return true if the check passes, false otherwise
*/
private boolean checkClassName(String className) {
boolean include = true;
/* check to see if the class in inside the rootPackage package */
if (className.startsWith(rootPackage)) {
/* check to see if the class contains any of the exlusion strings */
for (int i = 0; i < exclusions.size(); i++) {
if (className.contains(exclusions.get(i))) {
Log.d(TAG, "Skipping Class " + className + ". Includes exclusion string: " + exclusions.get(i) + ".");
include = false;
break;
}
}
} else {
include = false;
Log.d(TAG, "Skipping Class " + className + ". Not in the root package: " + rootPackage + ".");
}
return include;
}
/**
* Check to see if the class extends Application or SimpleApplication
* @param className Class name to check
* @return true if the check passes, false otherwise
*/
private boolean checkClassType(String className) {
boolean include = true;
try {
Class<?> clazz = Class.forName(className);
if (Application.class.isAssignableFrom(clazz)) {
Log.d(TAG, "Class " + className + " is a jME Application");
} else {
include = false;
Log.d(TAG, "Skipping Class " + className + ". Not a jME Application");
}
} catch (NoClassDefFoundError ncdf) {
include = false;
Log.d(TAG, "Skipping Class " + className + ". No Class Def found.");
} catch (ClassNotFoundException cnfe) {
include = false;
Log.d(TAG, "Skipping Class " + className + ". Class not found.");
}
return include;
}
private void setSelection(int position) {
if (position == -1) {
arrayAdapter.setSelectedPosition(-1);
currentPosition = -1;
currentSelection = "";
btnOK.setEnabled(false);
listClasses.invalidateViews();
} else {
arrayAdapter.setSelectedPosition(position);
currentPosition = position;
currentSelection = arrayAdapter.getItem(position);
btnOK.setEnabled(true);
listClasses.invalidateViews();
}
}
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
super.onSaveInstanceState(savedInstanceState);
Log.d(TAG, "Saving selections in onSaveInstanceState: "
+ "position: " + currentPosition + ", "
+ "class: " + currentSelection + ", "
+ "mouseEvents: " + enableMouseEvents + ", "
+ "joystickEvents: " + enableJoystickEvents + ", "
+ "keyEvents: " + enableKeyEvents + ", "
+ "VerboseLogging: " + verboseLogging + ", "
);
// Save current selections to the savedInstanceState.
// This bundle will be passed to onCreate if the process is
// killed and restarted.
savedInstanceState.putString(SELECTED_APP_CLASS, currentSelection);
savedInstanceState.putInt(SELECTED_LIST_POSITION, currentPosition);
savedInstanceState.putBoolean(ENABLE_MOUSE_EVENTS, enableMouseEvents);
savedInstanceState.putBoolean(ENABLE_JOYSTICK_EVENTS, enableJoystickEvents);
savedInstanceState.putBoolean(ENABLE_KEY_EVENTS, enableKeyEvents);
savedInstanceState.putBoolean(VERBOSE_LOGGING, verboseLogging);
}
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
// Log.i(TAG, "Restoring selections in onRestoreInstanceState: "
// + "position: " + savedInstanceState.getInt(SELECTED_LIST_POSITION, 0)
// + "class: " + savedInstanceState.getString(SELECTED_APP_CLASS)
// );
// //Restore selections from the savedInstanceState.
// // This bundle has also been passed to onCreate.
// currentPosition = savedInstanceState.getInt(SELECTED_LIST_POSITION, 0);
// currentSelection = savedInstanceState.getString(SELECTED_APP_CLASS);
}
public void beforeTextChanged(CharSequence cs, int i, int i1, int i2) {
}
public void onTextChanged(CharSequence cs, int startPos, int beforePos, int count) {
Log.d(TAG, "onTextChanged with cs: " + cs + ", startPos: " + startPos + ", beforePos: " + beforePos + ", count: " + count);
arrayAdapter.getFilter().filter(cs.toString());
setSelection(-1);
}
public void afterTextChanged(Editable edtbl) {
}
@Override
protected void onDestroy() {
super.onDestroy();
editFilterText.removeTextChangedListener(this);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_items, menu);
return true;
}
@Override
public boolean onPrepareOptionsMenu (Menu menu) {
MenuItem item;
item = menu.findItem(R.id.optionMouseEvents);
if (item != null) {
Log.d(TAG, "Found EnableMouseEvents menu item");
if (enableMouseEvents) {
item.setTitle(R.string.strOptionDisableMouseEventsTitle);
} else {
item.setTitle(R.string.strOptionEnableMouseEventsTitle);
}
}
item = menu.findItem(R.id.optionJoystickEvents);
if (item != null) {
Log.d(TAG, "Found EnableJoystickEvents menu item");
if (enableJoystickEvents) {
item.setTitle(R.string.strOptionDisableJoystickEventsTitle);
} else {
item.setTitle(R.string.strOptionEnableJoystickEventsTitle);
}
}
item = menu.findItem(R.id.optionKeyEvents);
if (item != null) {
Log.d(TAG, "Found EnableKeyEvents menu item");
if (enableKeyEvents) {
item.setTitle(R.string.strOptionDisableKeyEventsTitle);
} else {
item.setTitle(R.string.strOptionEnableKeyEventsTitle);
}
}
item = menu.findItem(R.id.optionVerboseLogging);
if (item != null) {
Log.d(TAG, "Found EnableVerboseLogging menu item");
if (verboseLogging) {
item.setTitle(R.string.strOptionDisableVerboseLoggingTitle);
} else {
item.setTitle(R.string.strOptionEnableVerboseLoggingTitle);
}
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.optionMouseEvents:
enableMouseEvents = !enableMouseEvents;
Log.d(TAG, "enableMouseEvents set to: " + enableMouseEvents);
break;
case R.id.optionJoystickEvents:
enableJoystickEvents = !enableJoystickEvents;
Log.d(TAG, "enableJoystickEvents set to: " + enableJoystickEvents);
break;
case R.id.optionKeyEvents:
enableKeyEvents = !enableKeyEvents;
Log.d(TAG, "enableKeyEvents set to: " + enableKeyEvents);
break;
case R.id.optionVerboseLogging:
verboseLogging = !verboseLogging;
Log.d(TAG, "verboseLogging set to: " + verboseLogging);
break;
default:
return super.onOptionsItemSelected(item);
}
return true;
}
}

View File

@ -0,0 +1,111 @@
package org.jmonkeyengine.jme3androidexamples;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import com.jme3.system.JmeSystem;
public class TestActivity extends AppCompatActivity {
JmeFragment fragment;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
fragment = new JmeFragment();
// Supply index input as an argument.
Bundle args = new Bundle();
Bundle bundle = savedInstanceState;
if (bundle == null) {
bundle = getIntent().getExtras();
}
String appClass = bundle.getString(MainActivity.SELECTED_APP_CLASS);
args.putString(MainActivity.SELECTED_APP_CLASS, appClass);
// Log.d(TestActivity.class.getSimpleName(), "AppClass="+appClass);
boolean mouseEnabled = bundle.getBoolean(MainActivity.ENABLE_MOUSE_EVENTS, true);
args.putBoolean(MainActivity.ENABLE_MOUSE_EVENTS, mouseEnabled);
// Log.d(TestActivity.class.getSimpleName(), "MouseEnabled="+mouseEnabled);
boolean joystickEnabled = bundle.getBoolean(MainActivity.ENABLE_JOYSTICK_EVENTS, true);
args.putBoolean(MainActivity.ENABLE_JOYSTICK_EVENTS, joystickEnabled);
// Log.d(TestActivity.class.getSimpleName(), "JoystickEnabled="+joystickEnabled);
boolean keyEnabled = bundle.getBoolean(MainActivity.ENABLE_KEY_EVENTS, true);
args.putBoolean(MainActivity.ENABLE_KEY_EVENTS, keyEnabled);
// Log.d(TestActivity.class.getSimpleName(), "KeyEnabled="+keyEnabled);
boolean verboseLogging = bundle.getBoolean(MainActivity.VERBOSE_LOGGING, true);
args.putBoolean(MainActivity.VERBOSE_LOGGING, verboseLogging);
// Log.d(TestActivity.class.getSimpleName(), "VerboseLogging="+verboseLogging);
fragment.setArguments(args);
FragmentTransaction transaction = getFragmentManager().beginTransaction();
// Replace whatever is in the fragment_container view with this fragment,
// and add the transaction to the back stack so the user can navigate back
transaction.add(R.id.fragmentContainer, fragment);
transaction.addToBackStack(null);
// Commit the transaction
transaction.commit();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.test_menu_items, menu);
return true;
}
@Override
public boolean onPrepareOptionsMenu (Menu menu) {
MenuItem item;
item = menu.findItem(R.id.optionToggleKeyboard);
if (item != null) {
// Log.d(this.getClass().getSimpleName(), "Found ToggleKeyboard menu item");
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.optionToggleKeyboard:
toggleKeyboard(true);
// Log.d(this.getClass().getSimpleName(), "showing soft keyboard");
break;
default:
return super.onOptionsItemSelected(item);
}
return true;
}
private void toggleKeyboard(final boolean show) {
fragment.getView().getHandler().post(new Runnable() {
@Override
public void run() {
JmeSystem.showSoftKeyboard(show);
}
});
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:keepScreenOn="true"
tools:context="org.jmonkeyengine.jme3androidexamples.TestActivity">
<!--
<fragment
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="org.jmonkeyengine.jme3androidexamples.JmeFragment"
android:id="@+id/jMEFragment"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"/>
-->
</RelativeLayout>

View File

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutTestChooser"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF"
>
<TextView
android:id="@+id/lblTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="@string/strLblTitle"
android:textSize="20sp"
android:textColor="#000000"
/>
<LinearLayout
android:id="@+id/layoutFilter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/lblTitle"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal"
>
<TextView
android:id="@+id/lblFindTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="@string/strLblFindTitle"
android:textSize="20sp"
android:textColor="#000000"
/>
<EditText
android:id="@+id/txtFilter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:hint="@string/strTxtFilterHint"
android:inputType="text"
android:textSize="20sp"
android:textColor="#000000"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/layoutButtons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center"
android:layout_marginTop="20dp"
android:focusable="true"
android:focusableInTouchMode="true"
>
<Button
android:id="@+id/btnOK"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/strBtnOK"
android:layout_marginRight="20dp"
android:textSize="20sp"
android:textColor="#000000"
/>
<Button
android:id="@+id/btnCancel"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/strBtnCancel"
android:layout_marginLeft="20dp"
android:textSize="20sp"
android:textColor="#000000"
/>
<requestFocus/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/layoutButtons"
android:layout_below="@id/layoutFilter"
android:gravity="center"
android:background="@drawable/selected"
>
<ListView
android:id="@+id/listClasses"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:choiceMode="singleChoice"
android:listSelector="@drawable/selected"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:scrollbars="vertical"
android:fadeScrollbars="false"
android:textFilterEnabled="true"
>
</ListView>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutTestChooserRow"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp">
<!--
<ImageView android:id="@+id/imgIcon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" />
-->
<TextView android:id="@+id/txtClassName"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_vertical"
android:textStyle="bold"
android:textSize="22sp"
android:textColor="#000000"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" />
</LinearLayout>

View File

@ -0,0 +1,33 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="org.jmonkeyengine.jme3androidexamples.MainActivity">
<item
android:id="@+id/optionMouseEvents"
android:orderInCategory="100"
android:title="@string/strOptionEnableMouseEventsTitle"
app:showAsAction="never" />
<item
android:id="@+id/optionJoystickEvents"
android:orderInCategory="200"
android:title="@string/strOptionEnableJoystickEventsTitle"
app:showAsAction="never" />
<item
android:id="@+id/optionKeyEvents"
android:orderInCategory="300"
android:title="@string/strOptionEnableKeyEventsTitle"
app:showAsAction="never" />
<item
android:id="@+id/optionVerboseLogging"
android:orderInCategory="300"
android:title="@string/strOptionEnableVerboseLoggingTitle"
app:showAsAction="never" />
<!--
android:icon="@mipmap/redmonkey"
android:icon="@mipmap/greenmonkey"
android:icon="@mipmap/bluemonkey"
-->
</menu>

View File

@ -0,0 +1,19 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="org.jmonkeyengine.jme3androidexamples.MainActivity">
<item
android:id="@+id/optionToggleKeyboard"
android:orderInCategory="100"
android:title="@string/strOptionShowKeyboard"
app:showAsAction="ifRoom"
android:icon="@drawable/keyboard"
/>
<!--
android:icon="@mipmap/redmonkey"
android:icon="@mipmap/greenmonkey"
android:icon="@mipmap/bluemonkey"
-->
</menu>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">0dp</dimen>
</resources>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

View File

@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">0dp</dimen>
<dimen name="activity_vertical_margin">0dp</dimen>
</resources>

View File

@ -1,6 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">JMEAndroidTest</string>
<string name="about">About</string>
<string name="quit">Quit</string>
</resources>
<!-- Main Application Title -->
<string name="app_name">jME3 Tests Android</string>
<!-- MainActivity UIF Labels -->
<string name="strLblTitle">Choose a demo to start:</string>
<string name="strLblFindTitle">Find:</string>
<string name="strTxtFilterHint">Enter a Filter</string>
<string name="strBtnOK">OK</string>
<string name="strBtnCancel">Cancel</string>
<!-- MainActivity Menu Labels -->
<string name="strOptionEnableMouseEventsTitle">Enable Mouse Events</string>
<string name="strOptionDisableMouseEventsTitle">Disable Mouse Events</string>
<string name="strOptionEnableJoystickEventsTitle">Enable Joystick Events</string>
<string name="strOptionDisableJoystickEventsTitle">Disable Joystick Events</string>
<string name="strOptionEnableKeyEventsTitle">Enable Key Events</string>
<string name="strOptionDisableKeyEventsTitle">Disable Key Events</string>
<string name="strOptionEnableVerboseLoggingTitle">Enable Verbose Logging</string>
<string name="strOptionDisableVerboseLoggingTitle">Disable Verbose Logging</string>
<!-- TestActivity Menu Labels -->
<string name="strOptionShowKeyboard">Show Keyboard</string>
<string name="strOptionHideKeyboard">Show Keyboard</string>
</resources>

View File

@ -0,0 +1,11 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

View File

@ -0,0 +1,15 @@
package org.jmonkeyengine.jme3androidexamples;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}

2
jme3-android-native/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# The headers are autogenerated and nobody should try to commit them...
src/native/headers

View File

@ -46,4 +46,4 @@ ext {
apply from: file('openalsoft.gradle')
// apply from: file('stb_image.gradle')
// apply from: file('tremor.gradle')
apply from: file('decode.gradle')
apply from: file('decode.gradle')

View File

@ -1,40 +1,43 @@
String tremorZipFile = "TremorAndroid.zip"
String stbiUrl = 'https://raw.githubusercontent.com/nothings/stb/master/stb_image.h'
String stbiUrl = 'https://raw.githubusercontent.com/jMonkeyEngine/stb/0224a44a10564a214595797b4c88323f79a5f934/stb_image.h'
// Working directories for the ndk build.
String decodeBuildDir = "${buildDir}" + File.separator + 'decode'
String decodeClassesBuildDir = "${buildDir}" + File.separator + 'decode_classes'
String decodeBuildJniDir = decodeBuildDir + File.separator + 'jni'
String decodeBuildLibsDir = decodeBuildDir + File.separator + 'libs'
// Pre-compiled libs directory
String decodePreCompiledLibsDir = 'libs' + File.separator + 'decode'
def rootPath = rootProject.projectDir.absolutePath
String decodePreCompiledLibsDir = rootPath + File.separator + 'build' + File.separator + 'native' + File.separator + 'android' + File.separator + 'decode'
// jME Android Native source files path
String decodeSourceDir = 'src/native/jme_decode'
String jmeHeaders = 'src/native/headers'
task downloadStbImage(type: MyDownload) {
sourceUrl = stbiUrl
target = file('stb_image.h')
target = file(decodeBuildDir + File.separator + 'stb_image.h')
}
// Copy stb_image.h to the source directory.
// Copy stb_image.h to the jni directory.
task copyStbiFiles(type: Copy) {
def sourceDir = file('stb_image.h')
def outputDir = file(decodeSourceDir + File.separator + "STBI")
def sourceDir = file(decodeBuildDir + File.separator + 'stb_image.h')
def outputDir = file(decodeBuildJniDir + File.separator + "STBI")
from sourceDir
into outputDir
}
copyStbiFiles.dependsOn {
def stbiFile = file('stb_image.h')
def stbiFile = file(decodeBuildDir + File.separator + 'stb_image.h')
if (!stbiFile.exists()) {
downloadStbImage
}
}
// Copy libtremor source to the source directory.
// Copy libtremor source to the jni directory.
task copyTremorFiles(type: Copy) {
def zipFile = file(tremorZipFile)
def outputDir = file(decodeSourceDir + File.separator + "Tremor")
def outputDir = file(decodeBuildJniDir + File.separator + "Tremor")
from (zipTree(zipFile)) {
include '*.c'
@ -44,17 +47,13 @@ task copyTremorFiles(type: Copy) {
into outputDir
}
// Generate headers via javah
task generateJavahHeaders(type: Exec) {
executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah')
args '-d', decodeSourceDir
args '-classpath', project.projectClassPath
args "com.jme3.audio.plugins.NativeVorbisFile"
args "com.jme3.texture.plugins.AndroidNativeImageLoader"
task copyJmeHeadersDecode(type: Copy) {
from file(jmeHeaders)
into file(decodeBuildJniDir + File.separator + "headers")
}
// Copy jME Android native files to jni directory
task copySourceToBuild(type: Copy, dependsOn:[copyTremorFiles, copyStbiFiles, generateJavahHeaders]) {
task copySourceToBuild(type: Copy, dependsOn:[copyTremorFiles, copyStbiFiles, copyJmeHeadersDecode]) {
def sourceDir = file(decodeSourceDir)
def outputDir = file(decodeBuildJniDir)

View File

@ -1,39 +1,42 @@
// OpenAL Soft r1.16
String openALSoftUrl = 'http://repo.or.cz/w/openal-soft.git/snapshot/e5016f814a265ed592a88acea95cf912c4bfdf12.zip'
String openALSoftUrl = 'https://github.com/jMonkeyEngine/openal-soft/archive/e5016f814a265ed592a88acea95cf912c4bfdf12.zip'
String openALSoftZipFile = 'OpenALSoft.zip'
// OpenAL Soft directory the download is extracted into
// Typically, the downloaded OpenAL Soft zip file will extract to a directory
// called "openal-soft"
String openALSoftFolder = 'openal-soft'
String openALSoftFolder = 'openal-soft-e5016f814a265ed592a88acea95cf912c4bfdf12'
//Working directories for the ndk build.
String openalsoftBuildDir = "${buildDir}" + File.separator + 'openalsoft'
String openalsoftClassesBuildDir = "${buildDir}" + File.separator + 'openalsoft_classes'
String openalsoftBuildJniDir = openalsoftBuildDir + File.separator + 'jni'
String openalsoftBuildLibsDir = openalsoftBuildDir + File.separator + 'libs'
//Pre-compiled libs directory
String openalsoftPreCompiledLibsDir = 'libs' + File.separator + 'openalsoft'
def rootPath = rootProject.projectDir.absolutePath
String openalsoftPreCompiledLibsDir = rootPath + File.separator + 'build' + File.separator + 'native' + File.separator + 'android' + File.separator + 'openalsoft'
// jME Android Native source files path
String openalsoftJmeAndroidPath = 'src/native/jme_openalsoft'
String jmeHeaders = 'src/native/headers'
// Download external source files if not available
task downloadOpenALSoft(type: MyDownload) {
sourceUrl = openALSoftUrl
target = file(openALSoftZipFile)
target = file(openalsoftBuildDir + File.separator + openALSoftZipFile)
}
// Unzip external source files
task unzipOpenALSoft(type: Copy) {
def zipFile = file(openALSoftZipFile)
def outputDir = file(".")
def zipFile = file(openalsoftBuildDir + File.separator + openALSoftZipFile)
def outputDir = file(openalsoftBuildDir)
from zipTree(zipFile)
into outputDir
}
unzipOpenALSoft.dependsOn {
def zipFilePath = project.projectDir.absolutePath + File.separator + openALSoftZipFile
def zipFilePath = openalsoftBuildDir + File.separator + openALSoftZipFile
def zipFile = new File(zipFilePath)
// println "zipFile path: " + zipFile.absolutePath
// println "zipFile exists: " + zipFile.exists()
@ -44,7 +47,7 @@ unzipOpenALSoft.dependsOn {
// Copy external source files to jni directory
task copyOpenALSoft(type: Copy) {
def sourceDir = file(openALSoftFolder)
def sourceDir = file(openalsoftBuildDir + File.separator + openALSoftFolder)
def outputDir = file(openalsoftBuildJniDir)
// println "copyOpenALSoft sourceDir: " + sourceDir
// println "copyOpenALSoft outputDir: " + outputDir
@ -61,8 +64,14 @@ copyOpenALSoft.dependsOn {
}
}
// Copy JME Headers to jni directory
task copyJmeHeadersOpenAL(type: Copy) {
from file(jmeHeaders)
into file(openalsoftBuildJniDir + File.separator + "headers")
}
// Copy jME Android native files to jni directory
task copyJmeOpenALSoft(type: Copy, dependsOn:copyOpenALSoft) {
task copyJmeOpenALSoft(type: Copy, dependsOn: [copyOpenALSoft, copyJmeHeadersOpenAL]) {
def sourceDir = file(openalsoftJmeAndroidPath)
def outputDir = file(openalsoftBuildJniDir)
// println "copyJmeOpenALSoft sourceDir: " + sourceDir
@ -72,16 +81,7 @@ task copyJmeOpenALSoft(type: Copy, dependsOn:copyOpenALSoft) {
into outputDir
}
task generateOpenAlSoftHeaders(type:Exec, dependsOn: copyJmeOpenALSoft) {
executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah')
args '-d', openalsoftJmeAndroidPath
args '-classpath', project.projectClassPath
args "com.jme3.audio.android.AndroidAL"
args "com.jme3.audio.android.AndroidALC"
args "com.jme3.audio.android.AndroidEFX"
}
task buildOpenAlSoftNativeLib(type: Exec, dependsOn: generateOpenAlSoftHeaders) {
task buildOpenAlSoftNativeLib(type: Exec, dependsOn: copyJmeOpenALSoft) {
// println "openalsoft build dir: " + openalsoftBuildDir
// println "ndkCommandPath: " + project.ndkCommandPath
workingDir openalsoftBuildDir

View File

@ -4,7 +4,7 @@
#include "Tremor/ivorbisfile.h"
#include "com_jme3_audio_plugins_NativeVorbisFile.h"
#include "../headers/com_jme3_audio_plugins_NativeVorbisFile.h"
#ifndef NDEBUG
#include <android/log.h>
@ -345,4 +345,4 @@ JNIEXPORT void JNICALL Java_com_jme3_audio_plugins_NativeVorbisFile_close
free(wrapper);
free(ovf);
(*env)->SetObjectField(env, nvf, nvf_field_ovf, NULL);
}
}

View File

@ -1,4 +1,4 @@
#include "com_jme3_texture_plugins_AndroidNativeImageLoader.h"
#include "../headers/com_jme3_texture_plugins_AndroidNativeImageLoader.h"
#include <assert.h>
#ifndef NDEBUG

View File

@ -1,4 +1,4 @@
#include "com_jme3_audio_android_AndroidAL.h"
#include "../headers/com_jme3_audio_android_AndroidAL.h"
#include "AL/al.h"
#include "AL/alext.h"

View File

@ -1,173 +0,0 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_jme3_audio_android_AndroidAL */
#ifndef _Included_com_jme3_audio_android_AndroidAL
#define _Included_com_jme3_audio_android_AndroidAL
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alGetString
* Signature: (I)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_jme3_audio_android_AndroidAL_alGetString
(JNIEnv *, jobject, jint);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alGenSources
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidAL_alGenSources
(JNIEnv *, jobject);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alGetError
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidAL_alGetError
(JNIEnv *, jobject);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alDeleteSources
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alDeleteSources
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alGenBuffers
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alGenBuffers
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alDeleteBuffers
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alDeleteBuffers
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSourceStop
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSourceStop
(JNIEnv *, jobject, jint);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSourcei
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSourcei
(JNIEnv *, jobject, jint, jint, jint);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alBufferData
* Signature: (IILjava/nio/ByteBuffer;II)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alBufferData
(JNIEnv *, jobject, jint, jint, jobject, jint, jint);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSourcePlay
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSourcePlay
(JNIEnv *, jobject, jint);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSourcePause
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSourcePause
(JNIEnv *, jobject, jint);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSourcef
* Signature: (IIF)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSourcef
(JNIEnv *, jobject, jint, jint, jfloat);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSource3f
* Signature: (IIFFF)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSource3f
(JNIEnv *, jobject, jint, jint, jfloat, jfloat, jfloat);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alGetSourcei
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidAL_alGetSourcei
(JNIEnv *, jobject, jint, jint);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSourceUnqueueBuffers
* Signature: (IILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSourceUnqueueBuffers
(JNIEnv *, jobject, jint, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSourceQueueBuffers
* Signature: (IILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSourceQueueBuffers
(JNIEnv *, jobject, jint, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alListener
* Signature: (ILjava/nio/FloatBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alListener
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alListenerf
* Signature: (IF)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alListenerf
(JNIEnv *, jobject, jint, jfloat);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alListener3f
* Signature: (IFFF)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alListener3f
(JNIEnv *, jobject, jint, jfloat, jfloat, jfloat);
/*
* Class: com_jme3_audio_android_AndroidAL
* Method: alSource3i
* Signature: (IIIII)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidAL_alSource3i
(JNIEnv *, jobject, jint, jint, jint, jint, jint);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,5 +1,5 @@
#include "util.h"
#include "com_jme3_audio_android_AndroidALC.h"
#include "../headers/com_jme3_audio_android_AndroidALC.h"
#include "AL/alc.h"
#include "AL/alext.h"
@ -171,4 +171,4 @@ JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidALC_alcDeviceResumeSOF
if (device == NULL) return;
alcDeviceResumeSOFT(device);
}
}

View File

@ -1,77 +0,0 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_jme3_audio_android_AndroidALC */
#ifndef _Included_com_jme3_audio_android_AndroidALC
#define _Included_com_jme3_audio_android_AndroidALC
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_jme3_audio_android_AndroidALC
* Method: createALC
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidALC_createALC
(JNIEnv *, jobject);
/*
* Class: com_jme3_audio_android_AndroidALC
* Method: destroyALC
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidALC_destroyALC
(JNIEnv *, jobject);
/*
* Class: com_jme3_audio_android_AndroidALC
* Method: isCreated
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidALC_isCreated
(JNIEnv *, jobject);
/*
* Class: com_jme3_audio_android_AndroidALC
* Method: alcGetString
* Signature: (I)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_jme3_audio_android_AndroidALC_alcGetString
(JNIEnv *, jobject, jint);
/*
* Class: com_jme3_audio_android_AndroidALC
* Method: alcIsExtensionPresent
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidALC_alcIsExtensionPresent
(JNIEnv *, jobject, jstring);
/*
* Class: com_jme3_audio_android_AndroidALC
* Method: alcGetInteger
* Signature: (ILjava/nio/IntBuffer;I)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidALC_alcGetInteger
(JNIEnv *, jobject, jint, jobject, jint);
/*
* Class: com_jme3_audio_android_AndroidALC
* Method: alcDevicePauseSOFT
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidALC_alcDevicePauseSOFT
(JNIEnv *, jobject);
/*
* Class: com_jme3_audio_android_AndroidALC
* Method: alcDeviceResumeSOFT
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidALC_alcDeviceResumeSOFT
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,5 +1,5 @@
#include "util.h"
#include "com_jme3_audio_android_AndroidEFX.h"
#include "../headers/com_jme3_audio_android_AndroidEFX.h"
#include "AL/alext.h"
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alGenAuxiliaryEffectSlots
@ -72,4 +72,4 @@ JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alEffectf
(JNIEnv* env, jobject obj, jint effect, jint param, jfloat value)
{
alEffectf((ALuint)effect, (ALenum)param, (ALfloat)value);
}
}

View File

@ -1,101 +0,0 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_jme3_audio_android_AndroidEFX */
#ifndef _Included_com_jme3_audio_android_AndroidEFX
#define _Included_com_jme3_audio_android_AndroidEFX
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alGenAuxiliaryEffectSlots
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alGenAuxiliaryEffectSlots
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alGenEffects
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alGenEffects
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alEffecti
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alEffecti
(JNIEnv *, jobject, jint, jint, jint);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alAuxiliaryEffectSloti
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alAuxiliaryEffectSloti
(JNIEnv *, jobject, jint, jint, jint);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alDeleteEffects
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alDeleteEffects
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alDeleteAuxiliaryEffectSlots
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alDeleteAuxiliaryEffectSlots
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alGenFilters
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alGenFilters
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alFilteri
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alFilteri
(JNIEnv *, jobject, jint, jint, jint);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alFilterf
* Signature: (IIF)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alFilterf
(JNIEnv *, jobject, jint, jint, jfloat);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alDeleteFilters
* Signature: (ILjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alDeleteFilters
(JNIEnv *, jobject, jint, jobject);
/*
* Class: com_jme3_audio_android_AndroidEFX
* Method: alEffectf
* Signature: (IIF)V
*/
JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidEFX_alEffectf
(JNIEnv *, jobject, jint, jint, jfloat);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,3 +1,5 @@
apply plugin: 'java'
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}
@ -5,5 +7,10 @@ if (!hasProperty('mainClass')) {
dependencies {
compile project(':jme3-core')
compile project(':jme3-plugins')
compile files('../lib/android.jar')
compileOnly 'android:android'
}
compileJava {
// The Android-Native Project requires the jni headers to be generated, so we do that here
options.compilerArgs += ["-h", "${project.rootDir}/jme3-android-native/src/native/headers"]
}

View File

@ -3,7 +3,6 @@ package com.jme3.app;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.pm.ActivityInfo;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.opengl.GLSurfaceView;
@ -89,7 +88,7 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
protected int eglStencilBits = 0;
/**
* Set the desired frame rate. If frameRate > 0, the application
* Set the desired frame rate. If frameRate higher than 0, the application
* will be capped at the desired frame rate.
* (default = -1, no frame rate cap)
*/
@ -240,9 +239,8 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
// Create application instance
try {
if (app == null) {
@SuppressWarnings("unchecked")
Class<? extends LegacyApplication> clazz = (Class<? extends LegacyApplication>) Class.forName(appClass);
app = clazz.newInstance();
Class clazz = Class.forName(appClass);
app = (LegacyApplication)clazz.newInstance();
}
app.setSettings(settings);
@ -363,6 +361,7 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
* @param dialog
* @param whichButton
*/
@Override
public void onClick(DialogInterface dialog, int whichButton) {
if (whichButton != -2) {
if (app != null) {
@ -474,6 +473,7 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
handler.setLevel(Level.ALL);
}
@Override
public void initialize() {
app.initialize();
if (handleExitHook) {
@ -489,10 +489,12 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
}
}
@Override
public void reshape(int width, int height) {
app.reshape(width, height);
}
@Override
public void update() {
app.update();
// call to remove the splash screen, if present.
@ -504,10 +506,12 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
}
}
@Override
public void requestClose(boolean esc) {
app.requestClose(esc);
}
@Override
public void destroy() {
if (app != null) {
app.destroy();
@ -517,6 +521,7 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
}
}
@Override
public void gainFocus() {
logger.fine("gainFocus");
if (view != null) {
@ -548,6 +553,7 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
}
}
@Override
public void loseFocus() {
logger.fine("loseFocus");
if (app != null) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2015 jMonkeyEngine
* Copyright (c) 2009-2020 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -116,7 +116,7 @@ public class AndroidHarnessFragment extends Fragment implements
protected int eglStencilBits = 0;
/**
* Set the desired frame rate. If frameRate > 0, the application
* Set the desired frame rate. If frameRate higher than 0, the application
* will be capped at the desired frame rate.
* (default = -1, no frame rate cap)
*/
@ -125,11 +125,11 @@ public class AndroidHarnessFragment extends Fragment implements
/**
* Set the maximum resolution for the surfaceview in either the
* width or height screen direction depending on the screen size.
* If the surfaceview is retangular, the longest side (width or height)
* If the surfaceview is rectangular, the longest side (width or height)
* will have the resolution set to a maximum of maxResolutionDimension.
* The other direction will be set to a value that maintains the aspect
* ratio of the surfaceview. </br>
* Any value < 0 (default = -1) will result in the surfaceview having the
* Any value less than 0 (default = -1) will result in the surfaceview having the
* same resolution as the view layout (ie. no max resolution).
*/
protected int maxResolutionDimension = -1;
@ -257,9 +257,8 @@ public class AndroidHarnessFragment extends Fragment implements
// Create application instance
try {
if (app == null) {
@SuppressWarnings("unchecked")
Class<? extends LegacyApplication> clazz = (Class<? extends LegacyApplication>) Class.forName(appClass);
app = clazz.newInstance();
Class clazz = Class.forName(appClass);
app = (LegacyApplication)clazz.newInstance();
}
app.setSettings(settings);
@ -276,17 +275,17 @@ public class AndroidHarnessFragment extends Fragment implements
}
/**
* Called by the system to create the View hierchy associated with this
* Called by the system to create the View hierarchy associated with this
* Fragment. For jME, this is a FrameLayout that contains the GLSurfaceView
* and an overlaying SplashScreen Image (if used). The View that is returned
* will be placed on the screen within the boundries of the View borders defined
* will be placed on the screen within the boundaries of the View borders defined
* by the Activity's layout parameters for this Fragment. For jME, we also
* update the application reference to the new view.
*
* @param inflater
* @param container
* @param savedInstanceState
* @return
* @return the new view
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@ -684,10 +683,10 @@ public class AndroidHarnessFragment extends Fragment implements
if (viewWidth > viewHeight && viewWidth > maxResolutionDimension) {
// landscape
fixedSizeWidth = maxResolutionDimension;
fixedSizeHeight = (int)(maxResolutionDimension * ((float)viewHeight / (float)viewWidth));
fixedSizeHeight = (int)(maxResolutionDimension * (viewHeight / (float)viewWidth));
} else if (viewHeight > viewWidth && viewHeight > maxResolutionDimension) {
// portrait
fixedSizeWidth = (int)(maxResolutionDimension * ((float)viewWidth / (float)viewHeight));
fixedSizeWidth = (int)(maxResolutionDimension * (viewWidth / (float)viewHeight));
fixedSizeHeight = maxResolutionDimension;
} else if (viewWidth == viewHeight && viewWidth > maxResolutionDimension) {
fixedSizeWidth = maxResolutionDimension;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 jMonkeyEngine
* Copyright (c) 2014-2020 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -33,8 +33,8 @@
package com.jme3.app;
import android.os.Build;
import com.jme3.profile.AppProfiler;
import com.jme3.profile.AppStep;
import com.jme3.profile.*;
import static com.jme3.profile.AppStep.BeginFrame;
import static com.jme3.profile.AppStep.EndFrame;
import static com.jme3.profile.AppStep.ProcessAudio;
@ -47,7 +47,6 @@ import static com.jme3.profile.AppStep.RenderPreviewViewPorts;
import static com.jme3.profile.AppStep.SpatialUpdate;
import static com.jme3.profile.AppStep.StateManagerRender;
import static com.jme3.profile.AppStep.StateManagerUpdate;
import com.jme3.profile.VpStep;
import static com.jme3.profile.VpStep.BeginRender;
import static com.jme3.profile.VpStep.EndRender;
import static com.jme3.profile.VpStep.FlushQueue;
@ -64,7 +63,7 @@ import com.jme3.renderer.queue.RenderQueue;
*
* <p>This profiler uses the Android Trace class which is only supported
* on Android SDK rev 18 and higher (ver 4.3 and higher). If the
* device is running a version < rev 18, the logging will
* device is running a version less than rev 18, the logging will
* be skipped.</p>
*
* <p>In the MainActivity class, add the following:</p>
@ -83,6 +82,7 @@ import com.jme3.renderer.queue.RenderQueue;
public class DefaultAndroidProfiler implements AppProfiler {
private int androidApiLevel = Build.VERSION.SDK_INT;
@Override
public void appStep(AppStep appStep) {
if (androidApiLevel >= 18) {
switch(appStep) {
@ -136,6 +136,12 @@ public class DefaultAndroidProfiler implements AppProfiler {
}
}
@Override
public void appSubStep(String... additionalInfo) {
}
@Override
public void vpStep(VpStep vpStep, ViewPort vp, RenderQueue.Bucket bucket) {
if (androidApiLevel >= 18) {
switch (vpStep) {
@ -164,4 +170,10 @@ public class DefaultAndroidProfiler implements AppProfiler {
}
}
}
@Override
public void spStep(SpStep step, String... additionalInfo) {
}
}

View File

@ -1,20 +0,0 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.jme3.app;
public final class R {
public static final class attr {
}
public static final class layout {
public static final int main=0x7f020000;
}
public static final class string {
public static final int app_name=0x7f030000;
public static final int jme3_appclass=0x7f030001;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2012 jMonkeyEngine
* Copyright (c) 2009-2020 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -478,7 +478,7 @@ public class MjpegFileWriter {
baos.write(fcc);
baos.write(intBytes(swapInt(cb)));
for (int i = 0; i < ind.size(); i++) {
AVIIndex in = (AVIIndex) ind.get(i);
AVIIndex in = ind.get(i);
baos.write(in.toBytes());
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2012 jMonkeyEngine
* Copyright (c) 2009-2020 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -34,6 +34,7 @@ package com.jme3.app.state;
import android.graphics.Bitmap;
import com.jme3.app.Application;
import com.jme3.post.SceneProcessor;
import com.jme3.profile.AppProfiler;
import com.jme3.renderer.Camera;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.Renderer;
@ -72,6 +73,7 @@ public class VideoRecorderAppState extends AbstractAppState {
private Application app;
private ExecutorService executor = Executors.newCachedThreadPool(new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread th = new Thread(r);
th.setName("jME3 Video Processor");
@ -122,7 +124,6 @@ public class VideoRecorderAppState extends AbstractAppState {
* This constructor allows you to specify the output file of the video as well as the quality
* @param file the video file
* @param quality the quality of the jpegs in the video stream (0.0 smallest file - 1.0 largest file)
* @param framerate the frame rate of the resulting video, the application will be locked to this framerate
*/
public VideoRecorderAppState(File file, float quality) {
this.file = file;
@ -226,6 +227,7 @@ public class VideoRecorderAppState extends AbstractAppState {
private LinkedBlockingQueue<WorkItem> usedItems = new LinkedBlockingQueue<WorkItem>();
private MjpegFileWriter writer;
private boolean fastMode = true;
private AppProfiler prof;
public void addImage(Renderer renderer, FrameBuffer out) {
if (freeItems == null) {
@ -238,6 +240,7 @@ public class VideoRecorderAppState extends AbstractAppState {
renderer.readFrameBufferWithFormat(out, item.buffer, Image.Format.BGRA8);
executor.submit(new Callable<Void>() {
@Override
public Void call() throws Exception {
if (fastMode) {
item.data = item.buffer.array();
@ -259,6 +262,7 @@ public class VideoRecorderAppState extends AbstractAppState {
}
}
@Override
public void initialize(RenderManager rm, ViewPort viewPort) {
logger.log(Level.INFO, "initialize in VideoProcessor");
this.camera = viewPort.getCamera();
@ -274,13 +278,16 @@ public class VideoRecorderAppState extends AbstractAppState {
}
}
@Override
public void reshape(ViewPort vp, int w, int h) {
}
@Override
public boolean isInitialized() {
return this.isInitilized;
}
@Override
public void preFrame(float tpf) {
if (null == writer) {
try {
@ -291,14 +298,17 @@ public class VideoRecorderAppState extends AbstractAppState {
}
}
@Override
public void postQueue(RenderQueue rq) {
}
@Override
public void postFrame(FrameBuffer out) {
numFrames++;
addImage(renderManager.getRenderer(), out);
}
@Override
public void cleanup() {
logger.log(Level.INFO, "cleanup in VideoProcessor");
logger.log(Level.INFO, "VideoProcessor numFrames: {0}", numFrames);
@ -313,6 +323,11 @@ public class VideoRecorderAppState extends AbstractAppState {
}
writer = null;
}
@Override
public void setProfiler(AppProfiler profiler) {
this.prof = profiler;
}
}
public static final class IsoTimer extends com.jme3.system.Timer {
@ -326,22 +341,27 @@ public class VideoRecorderAppState extends AbstractAppState {
this.ticks = 0;
}
@Override
public long getTime() {
return (long) (this.ticks * (1.0f / this.framerate) * 1000f);
}
@Override
public long getResolution() {
return 1000L;
}
@Override
public float getFrameRate() {
return this.framerate;
}
@Override
public float getTimePerFrame() {
return (float) (1.0f / this.framerate);
return 1.0f / this.framerate;
}
@Override
public void update() {
long time = System.currentTimeMillis();
long difference = time - lastTime;
@ -358,6 +378,7 @@ public class VideoRecorderAppState extends AbstractAppState {
this.ticks++;
}
@Override
public void reset() {
this.ticks = 0;
}

View File

@ -6,7 +6,6 @@ import com.jme3.asset.*;
import com.jme3.system.android.JmeAndroidSystem;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
public class AndroidLocator implements AssetLocator {
@ -18,6 +17,7 @@ public class AndroidLocator implements AssetLocator {
public AndroidLocator() {
}
@Override
public void setRootPath(String rootPath) {
this.rootPath = rootPath;
}

View File

@ -10,44 +10,64 @@ public final class AndroidAL implements AL {
public AndroidAL() {
}
@Override
public native String alGetString(int parameter);
@Override
public native int alGenSources();
@Override
public native int alGetError();
@Override
public native void alDeleteSources(int numSources, IntBuffer sources);
@Override
public native void alGenBuffers(int numBuffers, IntBuffer buffers);
@Override
public native void alDeleteBuffers(int numBuffers, IntBuffer buffers);
@Override
public native void alSourceStop(int source);
@Override
public native void alSourcei(int source, int param, int value);
@Override
public native void alBufferData(int buffer, int format, ByteBuffer data, int size, int frequency);
@Override
public native void alSourcePlay(int source);
@Override
public native void alSourcePause(int source);
@Override
public native void alSourcef(int source, int param, float value);
@Override
public native void alSource3f(int source, int param, float value1, float value2, float value3);
@Override
public native int alGetSourcei(int source, int param);
@Override
public native void alSourceUnqueueBuffers(int source, int numBuffers, IntBuffer buffers);
@Override
public native void alSourceQueueBuffers(int source, int numBuffers, IntBuffer buffers);
@Override
public native void alListener(int param, FloatBuffer data);
@Override
public native void alListenerf(int param, float value);
@Override
public native void alListener3f(int param, float value1, float value2, float value3);
@Override
public native void alSource3i(int source, int param, int value1, int value2, int value3);
}

View File

@ -12,19 +12,27 @@ public final class AndroidALC implements ALC {
public AndroidALC() {
}
@Override
public native void createALC();
@Override
public native void destroyALC();
@Override
public native boolean isCreated();
@Override
public native String alcGetString(int parameter);
@Override
public native boolean alcIsExtensionPresent(String extension);
@Override
public native void alcGetInteger(int param, IntBuffer buffer, int size);
@Override
public native void alcDevicePauseSOFT();
@Override
public native void alcDeviceResumeSOFT();
}

View File

@ -8,25 +8,36 @@ public class AndroidEFX implements EFX {
public AndroidEFX() {
}
@Override
public native void alGenAuxiliaryEffectSlots(int numSlots, IntBuffer buffers);
@Override
public native void alGenEffects(int numEffects, IntBuffer buffers);
@Override
public native void alEffecti(int effect, int param, int value);
@Override
public native void alAuxiliaryEffectSloti(int effectSlot, int param, int value);
@Override
public native void alDeleteEffects(int numEffects, IntBuffer buffers);
@Override
public native void alDeleteAuxiliaryEffectSlots(int numEffectSlots, IntBuffer buffers);
@Override
public native void alGenFilters(int numFilters, IntBuffer buffers);
@Override
public native void alFilteri(int filter, int param, int value);
@Override
public native void alFilterf(int filter, int param, float value);
@Override
public native void alDeleteFilters(int numFilters, IntBuffer buffers);
@Override
public native void alEffectf(int effect, int param, float value);
}

View File

@ -46,6 +46,7 @@ public class NativeVorbisLoader implements AssetLoader {
throw new IOException("Not supported for audio streams");
}
@Override
public void setTime(float time) {
try {
file.seekTime(time);

View File

@ -36,7 +36,6 @@ import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import com.jme3.input.event.TouchEvent;
import java.util.logging.Level;
import java.util.logging.Logger;
/**

Some files were not shown because too many files have changed in this diff Show More