Update renderer capabilities

* Add capabilities not normally supported by GLES2 for unified renderer
 * Remove ARBProgram since it isn't used by jME3
experimental
shadowislord 10 years ago
parent d7b3cfe287
commit ad26e916ee
  1. 64
      jme3-core/src/main/java/com/jme3/renderer/Caps.java
  2. 4
      jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglRenderer.java

@ -49,6 +49,21 @@ import java.util.Collection;
public enum Caps { public enum Caps {
/** /**
* Supports {@link FrameBuffer FrameBuffers}.
* <p>
* OpenGL: Renderer exposes the GL_EXT_framebuffer_object extension.<br>
* OpenGL ES: Renderer supports OpenGL ES 2.0.
*//**
* Supports {@link FrameBuffer FrameBuffers}.
* <p>
* OpenGL: Renderer exposes the GL_EXT_framebuffer_object extension.<br>
* OpenGL ES: Renderer supports OpenGL ES 2.0.
*//**
* Supports {@link FrameBuffer FrameBuffers}.
* <p>
* OpenGL: Renderer exposes the GL_EXT_framebuffer_object extension.<br>
* OpenGL ES: Renderer supports OpenGL ES 2.0.
*//**
* Supports {@link FrameBuffer FrameBuffers}. * Supports {@link FrameBuffer FrameBuffers}.
* <p> * <p>
* OpenGL: Renderer exposes the GL_EXT_framebuffer_object extension.<br> * OpenGL: Renderer exposes the GL_EXT_framebuffer_object extension.<br>
@ -107,12 +122,12 @@ public enum Caps {
OpenGL32, OpenGL32,
/** /**
* Supports OpenGL ARB program. * Do not use.
* <p> *
* OpenGL: Renderer exposes ARB_vertex_program and ARB_fragment_program * @deprecated do not use.
* extensions.
*/ */
ARBprogram, @Deprecated
Reserved0,
/** /**
* Supports GLSL 1.0 * Supports GLSL 1.0
@ -170,7 +185,7 @@ public enum Caps {
TextureBuffer, TextureBuffer,
/** /**
* Supports floating point textures (Format.RGB16F) * Supports floating point & half textures (Format.RGB16F)
*/ */
FloatTexture, FloatTexture,
@ -204,6 +219,11 @@ public enum Caps {
*/ */
SharedExponentColorBuffer, SharedExponentColorBuffer,
/**
* Do not use.
*
* @deprecated do not use.
*/
@Deprecated @Deprecated
Reserved1, Reserved1,
@ -212,7 +232,9 @@ public enum Caps {
*/ */
NonPowerOfTwoTextures, NonPowerOfTwoTextures,
/// Vertex Buffer features /**
* Supports geometry instancing.
*/
MeshInstancing, MeshInstancing,
/** /**
@ -253,7 +275,33 @@ public enum Caps {
/** /**
* Supports {@link Format#ETC1} texture compression. * Supports {@link Format#ETC1} texture compression.
*/ */
TextureCompressionETC1; TextureCompressionETC1,
/**
* Supports {@link Format#ETC1} texture compression by uploading
* the texture as ETC2 (they are backwards compatible).
*/
TextureCompressionETC2,
/**
* Supports OpenGL ES 2
*/
OpenGLES20,
/**
* Supports RGB8 / RGBA8 textures
*/
Rgba8,
/**
* Supports depth textures.
*/
DepthTexture,
/**
* Supports 32-bit index buffers.
*/
IntegerIndexBuffer;
/** /**
* Returns true if given the renderer capabilities, the texture * Returns true if given the renderer capabilities, the texture

@ -307,10 +307,6 @@ public class JoglRenderer implements Renderer {
caps.add(Caps.MeshInstancing); caps.add(Caps.MeshInstancing);
} }
if (gl.isExtensionAvailable("GL_ARB_fragment_program")) {
caps.add(Caps.ARBprogram);
}
if (gl.isExtensionAvailable("GL_ARB_texture_buffer_object")) { if (gl.isExtensionAvailable("GL_ARB_texture_buffer_object")) {
caps.add(Caps.TextureBuffer); caps.add(Caps.TextureBuffer);
} }

Loading…
Cancel
Save