210 Commits

Author SHA1 Message Date
shadowislord
b3759d7147 GL tracer: When printing enum, use GL_ONE instead of GL_TRUE 2015-02-07 19:10:35 -05:00
shadowislord
d4e85382db Remove fixed pipeline technique from lighting shader 2015-02-01 20:06:09 -05:00
shadowislord
16e3e00507 Renderer Changes
* Add new "Limits" enum to hold maximums of various renderer capabilities such as texture size
 * Add support for seamless cubemap (enabled by default for mipmapped cubemaps)
 * Fix conflict when using GL tracing with GL debugging
2015-02-01 20:05:16 -05:00
shadowislord
9f3a145dd7 Renderer Changes
* Add new "Limits" enum to hold maximums of various renderer capabilities such as texture size
 * Add support for seamless cubemap (enabled by default for mipmapped cubemaps)
 * Fix conflict when using GL tracing with GL debugging
2015-02-01 20:03:42 -05:00
shadowislord
c212fab37a Deprecate TechniqueDef.isUsingShaders(). Do not use it anywhere in the engine. 2015-02-01 17:26:59 -05:00
shadowislord
a7517c17c0 Deprecate TechniqueDef.isUsingShaders(). Do not use it anywhere in the engine. 2015-02-01 17:22:12 -05:00
shadowislord
4db0acaca9 Image: Deprecate efficient data 2015-02-01 17:19:58 -05:00
shadowislord
8c2e9f687d Sky material: Don't render sky twice; cull back faces. Also disable useless depth writing. 2015-02-01 17:19:10 -05:00
shadowislord
663225c71f SkyFactory: Remove duplicate code, remove use of Image.getEfficientData() 2015-02-01 17:18:18 -05:00
shadowislord
43fcd01114 Remove useless check against material technique name being called 'FixedFunc' 2015-02-01 17:17:05 -05:00
shadowislord
30efc7ce86 ScreenshotAppState to use old FB read-back
Also, set compression quality for JPG to 95% (same as on Android)
2015-01-31 15:01:23 -05:00
shadowislord
4668892c85 Add more constants to GL / GLFbo interfaces so they can be decoded by GLTracer 2015-01-31 14:27:22 -05:00
shadowislord
1e8b5ef338 Avoid glTexParameter calls if not neccessary by storing last texture state in the Image object 2015-01-31 14:26:42 -05:00
shadowislord
38f3f82651 Add two more glUniform* functions as no-enum args in GLTracer 2015-01-31 14:24:16 -05:00
shadowislord
f638afbeb7 * Minor javadoc improvement 2015-01-31 12:52:26 -05:00
shadowislord
13e9cdc201 * Add glReadPixels to GLTracer 2015-01-31 12:49:38 -05:00
shadowislord
86dbade689 * Do not crash if running on x86 / MIPS android system when using JmeSystem.getPlatform() 2015-01-31 12:48:31 -05:00
shadowislord
014d319c11 * Support desktop GL tracing in GLTracer 2015-01-23 22:42:42 -05:00
shadowislord
5bfc5b2c13 Renderer texture handling changes
* Relax NPOT texture restrictions on OpenGL ES 2:
   allow non mip-mapped, non repeating NPOT textures - mainly used for GUI elements
 * Fix various texture array issues:
   - compressed textures were causing a GL error
   - the array size was always set to 1 instead of the actual number of images in the array
2015-01-23 22:34:49 -05:00
shadowislord
4633d9e546 Add GL wrappers for debugging and tracing 2015-01-19 18:20:54 -05:00
shadowislord
6f90009dab Syntax error fixes related to previous changes 2015-01-19 18:19:48 -05:00
shadowislord
6ca111b13d Refactor renderer system
* Support OpenGL ES 2 in GLRenderer (various error fixes)
 * Get rid of OpenGL 1 remenants
 * Other minor cleanups
2015-01-19 18:15:25 -05:00
jmekaelthas
fa5845d528 Feature: added smooth/flat support for NURB surfaces. 2015-01-19 21:12:26 +01:00
Nehon
a3f9b75d0b Added proper naming of const in Optics.glsllib and some define tests to avoid name collision when importing several glsllib 2014-12-30 07:52:18 +01:00
Nehon
50ec3023d4 Fixed ScreenshotAppState, VideoRecorderAppSate, AwtPanel and TestRenderToMemory so the frameBuffer is read with an BGRA8 format 2014-12-29 00:17:59 +01:00
Nehon
05baf56130 The skyFactory now supports Equirectangular environment maps, as it's a pretty popular format.
It has been refactored to handle the 3 env map types : CubeMap, SphereMap, EquirectMap
2014-12-28 16:23:32 +01:00
Nehon
9f459af4e3 One can now call readFrameBuffer with a specific format, implementation has been done for the GLRenderer only.
For now only placeholders have been done for the renderers that are still not using URA (all except LWJGL).
2014-12-28 16:23:30 +01:00
iwgeric
a55aae21f9 Minor cleanup of mouse / keyboard methods for touch.
Depreciated InputManager.getSimluateMouse and replaced with InputManager.isSimulateMouse for consistancy.
Removed depreciated TouchInput.getSimulateMouse().
Added InputManager.isSimulateKeyboard() to keep consistancy with mouse methods.
2014-12-12 13:16:41 -05:00
iwgeric
a116389814 Forgot to add isSimulateKeyboard to TouchInput interface. 2014-12-12 13:00:05 -05:00
iwgeric
1ed1463476 Add support for enabling/disabling KeyEvent simulation for soft keyboards on Android similar to MouseEvents. 2014-12-12 12:48:25 -05:00
iwgeric
249f62fe95 remove showVirtualKeyboard from TouchInput 2014-12-12 12:16:45 -05:00
iwgeric
7040e32cc4 Add javadoc to JmeSystem.showSoftKeyboard 2014-12-12 12:04:16 -05:00
iwgeric
d42a777909 Add showSoftKeyboard(boolean show) to JmeSystem.
Includes empty implementations for now.  Android to be implemented in next commit.
2014-12-12 08:15:53 -05:00
shadowislord
ac2f765d5b Cleanup GL interface from unused calls
Also modify glGet***InfoLog a bit to be more compatible with Android
2014-12-09 18:22:14 -05:00
Paul Speed
44c860e2d2 Merge pull request #201 from Bebul/invalidateUpdateListOptimization
Fix invalidateUpdateList not to use both cycle and recursion traverse
2014-12-09 05:36:34 -05:00
Bebul
12d45dedc0 Fix invalidateUpdateList not to use both cycle and recursion traverse 2014-12-09 10:04:44 +01:00
Nehon
30f8ff4b81 added a MipMapImageRaster that can read and write to the different mipmaps of an image 2014-12-09 00:02:34 +01:00
Nehon
1e9d1dd29c ImageCodec and all implementations now take and additional offset in the read/writeComponent methods
DefaultImageRaster now have a setSlice method
2014-12-09 00:01:39 +01:00
Nehon
7c41355cca fixed an issue where calling setCursorVisible on the ChaseCameraAppstate before it's initialized was causing an NPE. 2014-12-09 00:00:08 +01:00
Nehon
505ebd0e6b extractVersion in GLRenderer now uses regexp 2014-12-07 21:36:18 +01:00
Paul Speed
05c6986492 Significantly changed the way updateLogicalState
works internally to avoid full-scene graph traversals
once per frame.
Random unrelated things first:

Spatial constructors were modified to be protected since it
is an abstract class and it's good practice.  I also flipped
them to be this(default values) instead of this() to delegate
constructors.

Geometry and Node constructors were modified in similar ways
to at least call the this(name) version of the constructor
everywhere.

removeControl(Class) was modified to do what it's javadoc
says and only remove the first encountered control.  Prior
to this change, it was removing all matching controls.

The meaty stuff:
Node.updateLogicalState() no longer traverses all children
and never traverses any children at all unless it is the root.
If it is the root node, it keeps a list of all Spatials that
require updates and only iterates that list.

Spatial was modified to have a package-private requiresUpdates()
method that returns true if the requiresUpdates flag is set
or the Spatial has controls.

The requiresUpdates flag can be set by subclasses that require
updateLogicalState() to be called even if they have no controls.
(BitmapText is such an example.)  By default, subclasses will
_always_ have this flag set to true, ie: default to the OLD behavior
and avoid silently breaking.

Subclasses that wish to have the new-hotness optimal behavior
must call setRequiresUpdates(false) in their constructors.
They can opt in to better performance rather than silently
breaking with an upgrade.

The only negative side effect of this change (other than
slightly increased complexity) is that for large scene
graphs with lots and lots of controls or children requiring
updates, a large list of spatials will be kept in the root
node.  This will never exceed "number of spatials in the
scene graph" and so already had a fairly small upper bound
with the old code due to performance.

I think I've captured all of the edge cases... but we'll
see. :)

Stress test example to follow.
2014-12-07 04:39:22 -05:00
shadowislord
bd318f5d1b Introduce the unified renderer architecture for the OpenGL renderer
* Similar to the OpenAL URA, OpenGL calls are now made to an interface
   which is implemented by the backends
 * Major cleanups in the texture util code to handle GLES2 texture formats
 * Split the GL interface into several interfaces depending on API and version:
   - GL (common denominator for all GL APIs)
   - GL2 (desktop GL2)
   - GL3 (desktop GL3)
   - GLFbo (framebuffer object functions)
   - GLExt (desktop GL and OpenGL ES extensions)
 * Added GLTracer class which traces OpenGL calls made by the engine when activated
2014-12-05 22:29:58 -05:00
shadowislord
d8b9c6dab5 Make Renderer.initialize() a standard method since everyone already uses it anyway 2014-12-05 22:15:40 -05:00
shadowislord
ad26e916ee Update renderer capabilities
* Add capabilities not normally supported by GLES2 for unified renderer
 * Remove ARBProgram since it isn't used by jME3
2014-12-05 22:13:28 -05:00
shadowislord
ae70667104 Deprecate WrapMode.BorderClamp since it is deprecated in OGL3+ 2014-12-05 22:07:30 -05:00
shadowislord
610ac6ae24 Make sure Mesh.isAnimated() works for hardware skinning 2014-12-05 22:04:26 -05:00
shadowislord
798ec94b11 Minor cleanup for previous merge 2014-12-05 21:09:55 -05:00
shadowislord
10ee96d839 Merge branch 'updateGeometricStateOptimization' of https://github.com/Bebul/jmonkeyengine 2014-12-05 18:46:55 -05:00
Bebul
c19842c55f clear RF_CHILD_LIGHTLIST even when there are no children 2014-12-04 15:17:39 +01:00
Bebul
a400cb1c58 Optimize updateGeometricState to not recurse all children when not necessary
Conflicts:
	jme3-core/src/main/java/com/jme3/scene/Node.java
2014-12-04 15:17:38 +01:00