54 Commits

Author SHA1 Message Date
Kirill Vainer
148c78a943 GL: make lwjgl implementation classes final 2015-09-05 14:03:32 -04:00
Kirill Vainer
5c35b9bb22 Renderer: delete deprecated renderers 2015-05-11 19:31:10 -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
michael
5c70938ccf Added GL_PATCHES as new constant 2015-02-28 13:32:16 +01:00
michael
1949a7d831 Added GL4 Interface,
Added GL_*_SHADER constants
Added Caps to the Renderer
Added required converters
2015-02-23 20:23:18 +01:00
shadowislord
9651d6d822 GL interface: add support for PBO, FB readback, and fences (ARB sync) 2015-02-15 16:42:42 -05:00
Nehon
5e3e8fbd6e fixed compilation issue in deprecated LWJGLRenderer 2015-02-13 09:25:59 +01:00
shadowislord
d3cbf7fbf2 GL implementations: Fix uploading of buffers with position != 0
* this is required for pregenerated mipmaps in e.g. DDS files
 * others checks are added to make sure a zero-length buffer cannot be uploaded (that's an error for now)
2015-02-07 19:08:54 -05:00
shadowislord
3a61032575 Make LwjglGL implement the GL3 interface (for OpenGL3+ function names) 2015-02-01 20:08:34 -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
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
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
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
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
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
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