24 Commits

Author SHA1 Message Date
Stephen Gold
98a283beb6 remove unnecessary casts and tests for null, discovered using NetBeans (#1285) 2020-04-18 22:33:15 -07: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
ffa58be3d7 remove more unused imports 2019-03-09 12:37:12 -08:00
Stephen Gold
2356320d30 more comment-only correction 2019-03-09 11:57:23 -08:00
Stephen Gold
b159c847cc comment corrections: mostly spelling and grammar 2018-01-16 18:35:07 -08: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
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
iwgeric
1e4c378a06 android-examples: reduce logging level for test chooser 2016-05-04 23:39:12 -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
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
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
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
Kirill Vainer
fe057130a4 jme3-android-examples: fix incorrect dependency
.gitignore: add jme3-android-examples/build folder
2015-05-05 16:08:53 -04:00
Kirill Vainer
bea1601994 jme3-android-examples: add project for android examples 2015-05-04 16:57:41 -04:00