347 Commits

Author SHA1 Message Date
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
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
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
867e46190e Issue 801 (#1269)
* Test case for issue #801

* Reset the context with the initial values
2020-01-28 10:35:17 -08:00
Stephen Gold
bc64238635 TestPBRLighting: fpp.setNumSamples() to facilitate study of issue #1246 2020-01-10 02:38:49 -08: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
Stephen Gold
3c74fe539c
test and fix for issue #1138 (#1177) 2019-09-17 08:53:19 -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
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
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
Lou Hamersly
b864372256 Fix for NPE when running TestGImpactShape via TestChooser (#1151) 2019-07-25 08:08:40 -07:00
Lou H
827d4ebd52 Test for issue #1120 - JBullet GImpactShape fall-through (#1137) 2019-07-07 20:40:02 -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
Stephen Gold
fca8bcf470 make native Bullet the default for jme3-examples (instead of JBullet) 2019-06-26 12:33:34 -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
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
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
James Khan
a8f5ac0589
Merge pull request #1094 from jayfella/master
Add support for fog in materials.
2019-05-30 09:54:09 -07: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
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
fff16c2328 TestIssue99: specify panel widths, clarify interpretation of results 2019-04-27 12:47:48 -07:00
Stephen Gold
432085c191 TestBoneRagdoll: reduce jumpiness during "toggle" actions 2019-04-26 10:13:01 -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
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
Stephen Gold
ba340cf13a add a test case for issue #99 (blendMode="multiply" in NiftyGUI) 2019-04-12 22:10:31 -07:00
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
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
2124e3e86b TestGltfLoading: comment 2019-03-18 13:21:53 -07:00
Stephen Gold
2356320d30 more comment-only correction 2019-03-09 11:57:23 -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
Stephen Gold
7e6fa03009 added a test for issue #1029 2019-03-04 07:15:17 -08:00
Stephen Gold
4581b6cb36 jme3-examples/jme3-lwjgl3 JavaDoc corrections (comments only) 2019-02-26 13:15:18 -08:00
Stephen Gold
512b096cb4 fix for issue #1026: TestPhysicsCharacter spins Sinbad too fast 2019-02-21 14:07:17 -08:00
Ali-RS
dae85e1598 Removed unused imports. (#1020) 2019-02-11 21:40:32 -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
Stephen Gold
b9ea661391 fix for issue #993 (TestGltfLoading throws AssetNotFoundException) 2019-01-08 08:40:20 -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