207 Commits

Author SHA1 Message Date
rem..om
5d02fe1c20 Made trunk sync with commit r11019 and commit r11020
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11021 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2014-02-06 18:59:10 +00:00
iwg..ic
911958cfbe Android: set PreserveEGLContextOnPause when the os is rev 11 or higher. Dramatically reduces the resume time when the context can be preserved.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10919 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-11-27 02:11:49 +00:00
iwg..ic
743aa2144a Android: Add scaling to input coordinates (onTouch Coordinates from Android) to compensate for manually set surface resolutions. Android always sends the touch coordinates relative to the view resolution, not the resolution of the surface. If users use view.getHolder().setFixedSize(width, height) in MainActivity.onCreate(), then the input coordinates are not correct which messes up ray casting and other things. This scales the input coordinates before sending them to jME.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10918 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-11-26 02:35:00 +00:00
iwg..ic
4f75cb688f Android: Move application initialization to the first onDrawFrame. Resolves issues where simpleInitApp gets called without the correct appsettings width and height.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10917 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-11-26 02:20:42 +00:00
iwg..ic
cf92f30090 Android: Change Android Input to the new AndroidInputHandler.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10908 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-11-22 17:15:39 +00:00
iwg..ic
60c58fd081 Android: Add new extendable input system to organize various Android inputs so that they can be extended to support new Android input functionality when the OS running the app supports it. Not activated yet. Just adding the supporting classes for now.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10907 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-11-22 13:33:30 +00:00
iwg..ic
9e8abfb6ec Android: Remove Escape key mapping from InputManager (defined in SimpleApplication) when using Android platforms.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10898 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-11-21 18:20:38 +00:00
iwg..ic
9ed99ce21f Add placeholder for future showVirtualKeyboard method for platforms implementing TouchInput
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10897 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-11-20 13:30:51 +00:00
iwg..ic
592303181e Android: Rewrite of EGL config chooser. ConfigType is also now deprecated so that egl* protected parameters in AndroidHarness can be used. These new parameters are copied into AppSettings and then used in AndroidConfigChooser to define the minimum requirements for selecting an appropriate egl config. If a different config is choosen, the AppSettings are updated so users can detect the currently used values.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10810 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-10-01 16:38:58 +00:00
iwg..ic
2711e729d0 Android: Modify EGLConfigChooser to evaluate available configs when asked by the surface. More to come to clean up this area. Addresses issue: http://hub.jmonkeyengine.org/forum/topic/crash-nexus-10-android-4-3/
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10798 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-09-19 21:25:38 +00:00
sha..RD
05603965fc * Check that the EGLDisplay used to select config is the same as the rendering EGLDisplay
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10792 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-09-19 03:07:26 +00:00
sha..RD
25814a8859 * Safety first: *ALL* EGL calls are now checked for errors prior to proceeding
* Safety first.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10791 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-09-19 02:47:09 +00:00
iwg..ic
1a94e65176 Android: Updated error checking for egl config logging
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10787 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-09-17 16:55:47 +00:00
rem..om
f8be6cf686 One can now change the depth test function throught the additional renderstate of a material.
You can also do this for the alpha test function, but alpha test is deprecated in gl 3.0 and opengl es 2.0 so it's there only for compatibility and consistency reason.
This setting can be directly set in the j3m file in the RenderState statement.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10779 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-09-15 13:04:33 +00:00
iwg..ic
123ccabaff Android: Don't render mesh if vertex count == 0
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10775 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-09-13 16:49:51 +00:00
iwg..ic
a1316b4514 Android: Fix issue with AndroidHarness trying to pause audio after app.stop() closed down the audio renderer
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10728 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-07-17 02:25:13 +00:00
rem..om
b143904913 Android renderer : fixed issue where parsing opengl es version was failing on some device and causing a crash
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10711 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-07-13 19:35:51 +00:00
iwg..ic
ce3b8e843e Removed logging of unset uniform for Android to match Desktop and avoid flooding the log
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10652 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-06-18 16:54:19 +00:00
iwg..ic
5622ce2483 Set log level to FINEST for unset uniform
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10651 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-06-18 16:35:52 +00:00
iwg..ic
eda3ed7160 Improve error message when shader uniform is not set
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10650 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-06-18 02:54:47 +00:00
sha..RD
dec182b13f * Fixed assertion error bug in NativeObjectManager.deleteAllObjects()
* Fixed ID collision bug in NativeObjectManager by introducing NativeObject.getUniqueId()

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10637 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-06-01 21:56:06 +00:00
iwg..om
1ac240e971 Android: fix missing period in javadoc
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10636 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-31 03:44:49 +00:00
iwg..om
509cc7ba70 Android OpenAL Soft: Clean up some logging
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10620 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-16 17:04:10 +00:00
sha..RD
d6fbd97482 * Add NativeObject.dispose() which deletes the object from GL driver, and if UNSAFE=true, also native buffers.
* Rename NativeObjectManager.registerForCleanup() -> registerObject() so that its not confused with enqueueUnusedObject()


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10618 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-16 00:53:58 +00:00
iwg..om
e727928731 Android: Refactor AndroidAudioRenderer into an interface with 2 implementations (current MediaPlayer/SoundPool and new OpenAL Soft). Added AppSetting that allows AndroidHarness to switch the audio renderer (default is still MediaPlayer/SoundPool).
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10615 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-15 21:44:21 +00:00
iwg..om
58684996f9 Android: Added methods for OpenAL Soft Audio Renderer to pause and resume audio when app is placed in the background
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10613 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-13 15:56:29 +00:00
iwg..om
785d50f516 Android: Add support for effects, filters, reverb, and environment to Android implementation of OpenAL Soft
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10609 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-12 03:15:22 +00:00
iwg..om
0ff86728d8 Android: Moved some code from onPause/onResume to loseFocus/gainFocus to address issues/patches 593, 566, 564. Users can now override loseFocus/gainFocus in MainActivity if they do not want to pause/resume the app based on Android's lifecycle methods onPause/onResume.
https://code.google.com/p/jmonkeyengine/issues/detail?id=593
https://code.google.com/p/jmonkeyengine/issues/detail?id=564
https://code.google.com/p/jmonkeyengine/issues/detail?id=566
(Yes, there were 3 patch requests for the same thing)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10607 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-11 03:53:09 +00:00
iwg..om
b5f4541eec Android: First commit of a new Audio system for Android that uses OpenAL Soft with the OpenSL backend. Requres Android 2.3 or higher. Source files for OpenAL Soft won't be included (similar to Native Bullet). The current Android audio renderer is still enabled.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10606 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-11 01:48:08 +00:00
rem..om
77a3cba69e ShaderNodes : registered shader node definition locator to the android asset manager so that shader nodes work on android
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10574 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-25 18:36:30 +00:00
sha..RD
8c1e5c9cf9 * Set AndroidHarness contentView to a TextView (not GLSurfaceView) onDestroy(), perhaps it will help with OOM issues
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10551 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-18 03:00:58 +00:00
sha..RD
a725516f00 * Fine, Eric.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10527 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-08 02:12:33 +00:00
sha..RD
cb0a2ed1cd * Throw UnsupportedOperationException if multiple FBO color attachments are used on Android (only a single attachment, GL_COLOR_ATTACHMENT0, is supported)
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10526 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-08 01:06:19 +00:00
sha..RD
27bf244729 * Added glGetError() checks after every GL call (its ugly, I know, but it helps with debugging). Added option to disable it with constant on RendererUtil.ENABLE_ERROR_CHECKING.
* Set lastFb in OGLESShaderRenderer when context is reset, this is needed otherwise the state tracker would not work correctly.
 * Fix issue with Mesh.Mode.Hybrid that wasn't rendering triangle fans correctly (was rendering them as triangle strips instead).
 * Remove call to glPointSize in OGLESShaderRenderer (it would most likely crash anyway, since GLES10 calls can't be used in a GLES20 context)
 * TestCustomMesh now uses shorts instead of ints for the index buffer. 32-bit indices are not supported on Android and are slower on Desktop, don't use them if you can avoid it.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10525 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-08 01:01:24 +00:00
sha..RD
9f4f321098 * Semi-colon.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10524 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-07 19:16:44 +00:00
sha..RD
30c7347cdf * If the render buffer storage format is 0 (not supported), throw exception instead of passing invalid enum to a GL call
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10523 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-07 19:05:34 +00:00
sha..RD
bcf3b7e7b6 * Added proper checks for RGBA8 support. All formats now specify the renderBufferInternalFormat
* Added support for depth24 and depth24stencil8 

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10522 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-07 19:01:04 +00:00
iwg..om
ba8f8db23c Android:
Add support for OGLES20 extension "GL_IMG_texture_npot" in addition to the currently used extension "GL_OES_texture_npot" to detect NPOT support.
Added additional Renderbufferstorage formats for RGB8 and RGBA8 image formats


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10517 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-07 01:17:56 +00:00
iwg..om
e26c86c794 Android: Initial commit to support FrameBuffers. This is still a work in progress. FilterPostProcessors currently don't work on Android devices that do not support NPOT.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10513 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-06 04:18:43 +00:00
rem..om
05e080100e Added support for int arrays uniforms. thanks to abies.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10495 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-20 17:53:50 +00:00
rem..om
995763d114 Fixed an issue in android config chooser. Some device seems to not have a rgb8 opaque config (BEST). In this case the config chooser will attempt to find a rgba8 config (BEST_TRANSLUSCENT) before falling back to fastest.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10489 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-15 21:56:59 +00:00
rem..om
4d91089b3a Android texture util now supports uploading a sub texture to the GPU, even as a bitmap.
This makes Nifty batch rendering work on android.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10488 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-15 20:45:36 +00:00
iwg..om
a53c052f74 Fix issue with how Android logging is handled.
- Replaced standard Android logging Handler to avoid Android issue with only logging Level.INFO -> Level.SEVERE log records.  
- Moved logging Handler initialization to AndroidHarness instead of in JmeSystem so logging in AndroidHarness and app startup could be logged.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10485 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-15 01:28:07 +00:00
rem..om
a5c19f54c3 Android : Added a FINE log of all the display configurations available on the device when the context starts.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10469 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-05 19:03:32 +00:00
rem..om
bfb1b21d6b Android : FINE or lower log levels are now displayed in output when configured so
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10468 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-05 19:02:26 +00:00
voi..om
23c1fddf8f Added support to upload/modify sub texture to Renderer interface introducing a new method:
public void modifyTexture(Texture tex, Image pixels, int x, int y);
Implementations added for LWJGL and JOGL. LWJGL seems to work. JOGL is untestet. Android implementation needs to be done by someone else (but is already prepared for).

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10462 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-04 23:28:58 +00:00
rem..om
1d7a631430 Android : MultiSampling is now supported on android
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10460 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-04 15:14:16 +00:00
rem..om
9a28fed581 Android : changed the way the pixel config is passed to the OGLESContext. It's now passed in the appSettings.
This is a first step toward a generalization of the use of appSettings in the AndroidHarness.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10458 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-03-04 09:30:24 +00:00
rem..om
9e3a98931a AndroidInput : Discarded new events when the eventQueue is full to avoid an overflow error. This should only append when more than 1024 events are generated before they've been transformd to JME input events.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10431 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-02-25 18:00:19 +00:00
rem..om
a5dbe2306c Removed some code that was forcing nearest filtering for textures filtering on android
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10430 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-02-25 17:39:07 +00:00