50 Commits

Author SHA1 Message Date
Nehon
995ab83a9e Deprecated LwjglRenderer and Lwjgl's TextureUtils. URA is used when choosing LWJGL as renderer. 2014-12-28 16:23:27 +01: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
shadowislord
d3258429ec Use unified renderer architecture for LWJGL by default (other backends pending) 2014-12-05 22:36:55 -05:00
shadowislord
f189b94a4d Implement the new GL interface for the LWJGL backend 2014-12-05 22:34:54 -05:00
shadowislord
af58aeb779 Fix Renderer.copyFrameBuffer() exception 2014-11-28 11:43:52 -05:00
shadowislord
de0027eee3 Fix OGL version parsing 2014-11-20 19:40:31 -05:00
shadowislord
18807cf175 Fix issue #138
Texture arrays not supporting compressed formats
Also fixed loading texture arrays with mipmaps
2014-11-18 21:13:50 -05:00
shadowislord
a177ffa208 Fix syntax error when compiling jme3-lwjgl 2014-11-15 16:31:40 -05:00
shadowislord
91715c4a48 Add support for URA, or Unified Renderer Architecture for audio
* Unified all renderers into common class 'ALAudioRenderer'
 * LWJGL and Android now implement the AL / ALC / EFX interfaces to provide a common OpenAL backend for jME
 * Added support for OpenAL Soft "Pause Device" extension, which allows the engine to pause the context while running in the background (currently requires OpenAL soft 1.16 and thus is Android only feature)
2014-11-15 15:15:50 -05:00
shadowislord
4717e7006f Goodbye, OpenGL1 2014-11-09 12:29:28 -05:00
shadowislord
62cfbc8a3e Remove usage of all deprecated image formats 2014-11-09 11:50:57 -05:00
shadowislord
b83603cd8f Added support for ETC1 compression (regular OGL only for now) 2014-11-07 21:04:55 -05:00
shadowislord
15f35fc5c6 Fix "DXT1 not supported by hardware" error that started appearing since the renderer refactor. 2014-11-05 23:13:15 -05:00
David Bernard
4fdde38bc2 Merge remote-tracking branch 'upstream/master' into fix_fb_depth24stencil8 2014-11-05 12:15:38 +01:00
David Bernard
37da17e3eb add support of DepthStencil into *Renderer
+ a test app
- only tested on desktop with Lwjgl
2014-11-05 12:15:14 +01:00
shadowislord
84046018ba Avoid use of LWJGL specific ContextCapabilities class.
Instead parse GL_EXTENSIONS and use that to determine supported features.
2014-11-04 23:28:50 -05:00
shadowislord
22ab7c11c7 * Ensure cubemaps have square dimensions before uploading 2014-11-04 16:47:51 -05:00
shadowislord
7860ccca52 * Use mipmap minification modes only if mipmaps are actually available 2014-11-04 16:40:09 -05:00
shadowislord
4d7dcc17bb * Don't depend on ContextCapabilities for determining OGL / GLSL versions 2014-11-04 16:27:14 -05:00
shadowislord
e225e6ff89 * Move certain render context specific fields from Renderer into RenderContext 2014-11-04 14:12:29 -05:00
pspeed42
5a482e2b98 Added another Photoshop tyle blend mode: Exclusion
Performs a sort of color XOR with source and destination.
Very useful for UI highlighting but is a bizarre (and
potentially useful) effect in 3D.
2014-09-10 14:00:27 -04:00
shadowislord
dbd9ed9d78 Merge pull request #126 from kwando/screen_blendmode
Add Screen blend mode.
2014-09-07 16:54:23 -04:00
pspeed42
e76e770d17 Modified the multi-slot buffer support to work even
if the buffer is not instanced.  Saw no real reason
not to and it makes buffer support more flexible.
2014-07-11 01:38:14 -04:00
pspeed42
216f874175 Added support for instancing at the mesh level.
(so far only for lwjgl because I'm lazy)
Went ahead and added in divisor support while I was
at it because it doesn't cost anything and there might
be use-cases for it.
Mesh now knows about instances and you can directly
ask it for an instance count.  I haven't added support
for proper bounding box calculation but it should
at least be possible now.
2014-07-11 01:14:47 -04:00
pspeed42
7ca599dfd9 More tabs to spaces. 2014-07-11 00:03:04 -04:00
Hannes Nevalainen
ccb946e65d Add Screen blend mode. 2014-07-01 19:17:25 +02:00
shadowislord
a166e8cb17 * Avoid "AL not closed" error by joining with audio thread when exiting app 2014-06-08 22:01:39 -04:00
shadowislord
cc20781a02 * Ensure LwjglOffscreenBuffer extracts the required natives
* Fix Installer class in SDK to use NativeLibraryLoader.setCustomNativesFolder() instead of the Natives.setCustomDir()
2014-06-07 12:53:55 -04:00
shadowislord
03f8df05b6 LwjglRenderer - Preparing for abstraction layer shift
* All GL calls are done via static imports
 * Once again remove dependency on GL21 / GL30 - with the generator it will be possible to choose whether to target GL2+extensions or GL3 core
 * ContextCapabilities is field in Renderer, not allowed to use GLContext to retrieve it anymore
 * Assume depth textures are always supported (they should be since GL1.4)
2014-06-06 23:29:25 -04:00
shadowislord
54ffe15dda * Switch to new native library loader
* Deprecate old library loader
 * Add warning when the requested number of antialiasing samples cannot be satisfied
 * Cleaned up LwjglContext.determineMaxSamples()
2014-06-06 20:39:37 -04:00
abies
6adb15abd6 Fix badly specified RGB10_A2 format 2014-06-07 00:04:10 +02:00
shadowislord
65094e9ca1 * Put the shader compile log on the next line so its slightly more readable 2014-06-05 23:28:28 -04:00
shadowislord
ad7fdb6fab * Deprecate texture wrap modes not supported in OpenGL 3
* Make sure engine is not using them anywhere
2014-06-05 22:51:51 -04:00
shadowislord
c925104f5e * Ensure the statistics properly represent number of objects / triangles / vertices rendered when using instancing 2014-06-05 22:37:00 -04:00
shadowislord
948fdb21eb * Add new flag to Platform enum which specifies if its 32-bit platform or 64-bit.
* Add new but currently unused native extraction engine which supports user-specified native libraries as well as deferred extraction of libraries.
2014-06-05 22:32:06 -04:00
shadowislord
2aad768c8a * Forgot to remove withSRGB from LwjglCanvas 2014-06-03 23:18:20 -04:00
shadowislord
1a1d74f83e * More sanity checking when enabling sRGB pipeline, to ensure its actually supported before calling any sRGB related functions. Also provide more log messages if something is odd or goes wrong.
* Remove the sanity check from TextureUtil since it is now done once during initialization of the renderer.
 * If LwjglRenderer.VALIDATE_SHADER is enabled, log shader compilation warnings as Level.WARNING instead of Level.FINE. Also slightly better grammar in shader compile / link messages.
2014-06-02 23:25:31 -04:00
shadowislord
ce761cd20b Merge branch 'master' of github.com:jMonkeyEngine/jmonkeyengine 2014-06-02 23:04:28 -04:00
shadowislord
7d8c95f9c8 * Remove references to esoteric EXT_abgr and EXT_bgra extensions entirely, which might even be causing issues on some systems, instead replaced with standard OpenGL 1.2 constants
* ARGB8 and BGRA8 formats now support sRGB -> linear conversion if sRGB pipeline is used, previously they were ignored.
 * All float and half float formats are considered supported if we either support OpenGL 3 or ARB float texture.
 * Cleanup TextureUtil a bit by removing constant references from ARBHalfFloatPixel, ARBTextureFloat, EXTPackedFloat, EXTTextureSharedExponent and EXTTextureSRGB to GL21 and GL30 classes (which are identical anyway).
 * Check if we support sRGB textures before choosing sRGB format (although this check should have been done earlier? not sure..)
2014-06-02 22:59:40 -04:00
shadowislord
60fa6a7e38 Merge pull request #128 from GreenCubes/patch-1
* Fix issue where using a texture array with pregenerated mipmaps would fail with a GL error.
2014-06-02 12:27:54 -04:00
shadowislord
465e2b2280 * Make sure to set texture max level depending on whether mipmaps are to be generated, included in texture, or not required at all - this reduces memory allocated by GPU for textures that do not use mipmaps. 2014-06-01 15:03:08 -04:00
shadowislord
68cb1e900f Automatically upload GLSL 1.0 shaders as GLSL 1.1 if using desktop OpenGL to allow stricter error checking. 2014-06-01 14:59:17 -04:00
shadowislord
81498d6f79 * Introduce Image.isNPOT() which is now used to check if the image is non-power-of-2 in renderer implementations. 2014-05-31 12:27:31 -04:00
shadowislord
35cfae5ef0 * Merge revision 11058 from experimental branch
- Add instanced geometry support. This is performed by uploading 4 vertex buffers each containing 4 floats. The top 3 rows are the world matrix and the bottom row is a quaternion representing the normal matrix. Hence, both unshaded and lit geometries can be rendered through instancing.
See Instancing.glsllib for more information as well as the comment in LwjglRenderer.
2014-05-31 11:46:58 -04:00
Nehon
09e705dcc4 Introduced RGB10_A2 Image Format. It offers greater precision for RGB channels at the expense of precision for the alpha channel. This format is convenient for post processing, and especially when gamma correction is turned on. 2014-05-26 12:16:15 +02:00
Nehon
8ff6f8df24 Introduced a new Enum ColorSpace.
One can now mark a texture param in a material definition as linear by using -Linear at the end of the parameter declaration (case insensitive).
An Image bound to a material texture param in a linear color space will have its ColorSpace set to linear when bound to the material by mat.setTexture("name", texture);
Added the -LINEAR flag to all texture param that needed it in stock materials (lighting.j3md, terrainLighting.j3md, different Filter materials).
2014-05-26 12:11:57 +02:00
Nehon
e4ba4e9e9e - Image loaders now assume ALL images are in sRGB space and set the flag accordingly
- All images constructors now take the isSrgb flag as a parameter, all engine classes has been changed to accommodate the change, old constructors has been deprecated for backward compatibility. One should always ask himself in which color space is an image if dealing with gamma correction
- Gamma correction has been defaulted to false in the appSettings
2014-05-26 12:11:56 +02:00
Nehon
77a4002c3d Added support for hardware srgb output (gamma correction).
It can be toggled at render time.
Works with lwjgl
Couldn't test with Jogl and might be not working
Not supported by mobile renderers
2014-05-26 12:11:55 +02:00
Rena4ka
4be7693f1b Mipmapped texture arrays
Fixed TextureUtil to properly handle mipmapped texture 2d arrays and 3d textures
2014-04-22 02:59:03 -07:00
Normen Hansen
a16857c8f4 switch to gradle layout 2014-03-21 02:32:11 +01:00