114 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
Ali-RS
0bdb0159be Fixed an issue with AndroidNativeImageLoader which was opening stream twice. (#1338) 2020-04-18 22:18:24 -07:00
Stephen Gold
9be8f5dd3a 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-04-18 22:04:13 -07: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
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
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
Lou Hamersly
cde108c2c0 #1107-Fix Javadoc warnings in OpenJDK 9+ 2019-06-05 08:21:34 -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
Stephen Gold
ce730e5656 jme3-android JavaDoc corrections (comments only) 2019-02-25 19:54:17 -08:00
Ali-RS
dae85e1598 Removed unused imports. (#1020) 2019-02-11 21:40:32 -08:00
Stephen Gold
f40ba25a56 correct more grammar/spelling errors in comments 2018-02-23 22:20:22 -08:00
Stephen Gold
b159c847cc comment corrections: mostly spelling and grammar 2018-01-16 18:35:07 -08:00
Kirill Vainer
93001ec290 Fix #456 2017-11-28 08:26:41 +01: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
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
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
Michael Braunstingl
d39b780fa5 Added RenderState.BlendMode.Custom
BlendMode.Custom allows glBlendFuncSeparate() calls.
2016-07-24 12:40:45 +02:00
empirephoenix
fbf2dd4497 Merge pull request #494 from shamanDevel/OpenCL
OpenCL for jME3
2016-05-28 18:38:47 +02:00
shamanDevel
5e098b0493 worked on LWJGL3 support 2016-05-08 17:05:43 +02: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
Kirill Vainer
cb61e760ce Merge branch 'master' into BorealFeast-master
Conflicts:
	jme3-core/src/main/java/com/jme3/material/RenderState.java
	jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java
2016-04-10 12:51:19 -04:00
Kirill Vainer
112a77fd5d test: don't use deprecated box constructor 2016-04-10 11:59:49 -04:00
Kirill Vainer
a563c6cc7b remove deprecated classes 2016-04-10 11:46:18 -04:00
Teencrusher
bffa2191e5 Moved glBlendEquationSeparate from GL2 interface to GL interface. Added an example of the feature. Minors issues. 2016-04-07 10:06:34 -04:00
Paul Speed
3c56afeae6 Converted Application to an interface and renamed the old Application to
LegacyApplication.  This is a breaking change for any class extending Application
directly.
And regardless, if you refer to Application then you will need to clean build
your app... and any of your dependencies that also refer to Application.  Basically,
anything using an AppState will need to be clean built against the next alpha.
2016-03-28 01:47:33 -04:00
iwgeric
ef35af958b Remove logging on touch events 2016-03-17 08:57:21 -04:00
Daniel Johansson
dc0bcb5d13 Resolves #378, adding support for detecting ARMv8 on Android. 2015-11-12 15:11:41 +00:00
Kirill Vainer
5c35b9bb22 Renderer: delete deprecated renderers 2015-05-11 19:31:10 -04:00
Kirill Vainer
7393f79165 AudioSource: add method to get playback time
As was requested on the forum, getting playback time / position is needed to perform proper audio / video synchronization.
2015-04-29 23:58:34 -04:00
iwgeric
5c6deeb5ab Android: add GLFbo interface to AndroidGL to fix cast exception 2015-04-27 23:23:26 -04:00
Kirill Vainer
ed4b70bcad GLTiming: new GL wrapper to profile GL calls 2015-04-25 17:41:50 -04:00
Kirill Vainer
5b95f8a4b0 GLRenderer: Improve compatibility with OpenGL 3.2 core profile
* Separate GLFbo and GLExt implementations. GLFbo can now be implemented either via vanilla OpenGL3 calls or GL_EXT_framebuffer_*** extensions (OpenGL2.1- only).
 * Use modern way of getting supported extensions in core profile.
 * Luminance and Alpha formats are not available when running in core profile.
 * Bind a dummy vertex array object (VAO) when running in core profile.
 * Point sprite mode is always enabled. Since both OpenGL ES 2.0 and OpenGL 3.2 core require it, jME3 is no longer capable of rendering regular points.
2015-04-25 16:57:24 -04:00
iwgeric
116adbba1f Android: Support JoystickCompatibilityMappings for reassigning joystick axes and buttons.
Also added ability to add new buttons as events come in due to Android not providing a definitive way to determine which buttons are supported on the device.
2015-04-19 12:40:17 -04:00
iwgeric
d80de0cc5b Android: Add static property to disable sensors but still have joysticks.
May move this to AppSettings later, but not sure yet.
2015-04-18 14:48:30 -04:00
iwgeric
6c24390663 Android: Fix issue handling key events that are tied to both keyboard and gamepad 2015-04-17 19:53:55 -04:00
iwgeric
61ba11d872 Rework of Android input system to support future expansion and gamepad support.
Gamepad support is still a work in progress, but functions.
2015-04-17 19:02:19 -04:00
iwgeric
22d3f7f9f4 Android: Refactor joystick support to prepare for upcoming gamepad support. 2015-04-07 18:35:48 -04:00
iwgeric
47e9b9ba16 Android: Remove unused property to track if joysticks are enabled. 2015-04-07 17:53:54 -04:00
iwgeric
4102e91456 Android: remove unused properties in AndroidHarnessFragment 2015-04-02 23:51:26 -04:00
iwgeric
5ab8fb8f6a Android: remove reference to screenOrientation from unused test project 2015-04-02 13:09:49 -04:00
iwgeric
1569e9583a Android: remove deprecated screenOrientation from AndroidHarness.
Screen orientation is set in manifest instead of in MainActivity.
2015-04-02 13:08:53 -04:00
shadowislord
068047200e Threads: standardize names. Make sure they all start with "jME3". 2015-03-27 21:43:32 -04:00
shadowislord
2bc5545171 OGLESShaderRenderer: remove clearTextureUnits since it doesnt do anything 2015-03-27 21:36:43 -04:00
shadowislord
40926dc32d AssetConfig: Platform asset config now returned as URL
- Return back DesktopAssetManager constructor with boolean argument - this time it shall use platform config instead of always using Desktop.cfg
2015-03-01 15:11:57 -05:00
shadowislord
25b1780e09 AssetManager: remove useless subclasses
* All platforms now use asset configuration files. Subclasses of DesktopAssetManager no longer required.
 * Added general asset config file which is included by all
 * JmeSystemDelegate now always returns DesktopAssetManager
 * JmeSystem is now responsible for providing the platform-specific asset config path
 * Deprecate JmeSystem.createImageRaster(), it is simpler to create a DefaultImageRaster
2015-02-28 18:32:38 -05:00
shadowislord
bbbcd8eba5 Android Images: deprecate classes that won't be used in 3.1 2015-02-28 18:28:35 -05:00
shadowislord
9651d6d822 GL interface: add support for PBO, FB readback, and fences (ARB sync) 2015-02-15 16:42:42 -05:00
iwgeric
4baceb6a08 fixed compilation issues in deprecated OGLESShaderRenderer, IGLESShaderRenderer, and JoglRenderer caused by earlier commit 2015-02-14 10:27:23 -05:00