(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.
* 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)
* 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.
- 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.
- 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
state...
This fixes a bug where if alpha test was enabled with
a fall off of 0 that it could never again be disabled
unless alpha falloff was first set to a non-0 value.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10938 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
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
* 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
* 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
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
- Looks like Poly offset behave defferently between ATI and NVIDIA i added a bit of offset to avoid shadow acne for NVIDIA
- Added a flag needCompareModeUpdate in the Texture class to avoid setting it on every frame in the renderer. I changed Lwjgl and Jogl renderer accordingly.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10043 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
- Made the relvent changes in lwjgl1Renderer
- Changed the check in the lwjglRenderer (note that it's deprecated in opengl 3)
- Removed the test in the OglESRenderer since GL_ALPHA_TEST/GL_ALPHA_FUNC no longer exists in OGLES 2, this must be handled in the fragment shader aka the alphaDiscardThreshold that is coming back in an upcoming commit.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9747 75d07b2b-3a1a-0410-a2c5-0572b91ccdca