aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/gl-ignore-gl2_es-enums.cfg26
-rw-r--r--make/gl-ignore-gl2_es12-special.cfg64
-rw-r--r--src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java42
3 files changed, 49 insertions, 83 deletions
diff --git a/make/gl-ignore-gl2_es-enums.cfg b/make/gl-ignore-gl2_es-enums.cfg
index 3b182bcd2..c208cad3d 100644
--- a/make/gl-ignore-gl2_es-enums.cfg
+++ b/make/gl-ignore-gl2_es-enums.cfg
@@ -194,4 +194,30 @@ Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Y.*
Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Z.*
Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.*
Ignore GL_MAX_CUBE_MAP_TEXTURE_SIZE.*
+Ignore GL_FRAMEBUFFER.*
+Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.*
+Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.*
+Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE.*
+Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL.*
+Ignore GL_FRAMEBUFFER_BINDING.*
+Ignore GL_FRAMEBUFFER_COMPLETE.*
+Ignore GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT.*
+Ignore GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS.*
+Ignore GL_FRAMEBUFFER_INCOMPLETE_FORMATS.*
+Ignore GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT.*
+Ignore GL_FRAMEBUFFER_UNSUPPORTED.*
+Ignore GL_COLOR_ATTACHMENT0.*
+Ignore GL_DEPTH_ATTACHMENT.*
+Ignore GL_STENCIL_ATTACHMENT.*
+Ignore GL_RENDERBUFFER.*
+Ignore GL_RENDERBUFFER_ALPHA_SIZE.*
+Ignore GL_RENDERBUFFER_BINDING.*
+Ignore GL_RENDERBUFFER_BLUE_SIZE.*
+Ignore GL_RENDERBUFFER_DEPTH_SIZE.*
+Ignore GL_RENDERBUFFER_GREEN_SIZE.*
+Ignore GL_RENDERBUFFER_HEIGHT.*
+Ignore GL_RENDERBUFFER_INTERNAL_FORMAT.*
+Ignore GL_RENDERBUFFER_RED_SIZE.*
+Ignore GL_RENDERBUFFER_STENCIL_SIZE.*
+Ignore GL_RENDERBUFFER_WIDTH.*
diff --git a/make/gl-ignore-gl2_es12-special.cfg b/make/gl-ignore-gl2_es12-special.cfg
index a3e55f594..addcace1b 100644
--- a/make/gl-ignore-gl2_es12-special.cfg
+++ b/make/gl-ignore-gl2_es12-special.cfg
@@ -57,8 +57,6 @@ Ignore GL_COLOR_ARRAY_POINTER
Ignore GL_COLOR_ARRAY_SIZE
Ignore GL_COLOR_ARRAY_STRIDE
Ignore GL_COLOR_ARRAY_TYPE
-Ignore GL_COLOR_ATTACHMENT0
-Ignore GL_COLOR_ATTACHMENT0_OES
Ignore GL_COLOR_LOGIC_OP
Ignore GL_COLOR_MATERIAL
Ignore GL_COMBINE
@@ -91,8 +89,6 @@ Ignore GL_DECAL
Ignore GL_DECR_WRAP
Ignore GL_DECR_WRAP_OES
Ignore GL_DELETE_STATUS
-Ignore GL_DEPTH_ATTACHMENT
-Ignore GL_DEPTH_ATTACHMENT_OES
Ignore GL_DEPTH_COMPONENT
Ignore GL_DEPTH_COMPONENT16
Ignore GL_DEPTH_COMPONENT16_OES
@@ -124,39 +120,6 @@ Ignore GL_FOG_MODE
Ignore GL_FOG_START
Ignore GL_FRAGMENT_SHADER
Ignore GL_FRAGMENT_SHADER_DERIVATIVE_HINT
-Ignore GL_FRAMEBUFFER
-Ignore GL_FRAMEBUFFER_ATTACHABLE_NV
-Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
-Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES
-Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
-Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES
-Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
-Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES
-Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT
-Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
-Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES
-Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_HEIGHT_NV
-Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_NORMALIZED_NV
-Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_OFFSET_NV
-Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_SIZE_NV
-Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_STRIDE_NV
-Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_TYPE_NV
-Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_WIDTH_NV
-Ignore GL_FRAMEBUFFER_BINDING
-Ignore GL_FRAMEBUFFER_BINDING_OES
-Ignore GL_FRAMEBUFFER_COMPLETE
-Ignore GL_FRAMEBUFFER_COMPLETE_OES
-Ignore GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
-Ignore GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES
-Ignore GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
-Ignore GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES
-Ignore GL_FRAMEBUFFER_INCOMPLETE_FORMATS
-Ignore GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES
-Ignore GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
-Ignore GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES
-Ignore GL_FRAMEBUFFER_OES
-Ignore GL_FRAMEBUFFER_UNSUPPORTED
-Ignore GL_FRAMEBUFFER_UNSUPPORTED_OES
Ignore GL_FUNC_ADD
Ignore GL_FUNC_ADD_OES
Ignore GL_FUNC_REVERSE_SUBTRACT
@@ -324,29 +287,6 @@ Ignore GL_PROJECTION_STACK_DEPTH
Ignore GL_QUADRATIC_ATTENUATION
Ignore GL_R11F_G11F_B10F_EXT
Ignore GL_REFLECTION_MAP_OES
-Ignore GL_RENDERBUFFER
-Ignore GL_RENDERBUFFER_ALPHA_SIZE
-Ignore GL_RENDERBUFFER_ALPHA_SIZE_OES
-Ignore GL_RENDERBUFFER_BINDING
-Ignore GL_RENDERBUFFER_BINDING_OES
-Ignore GL_RENDERBUFFER_BLUE_SIZE
-Ignore GL_RENDERBUFFER_BLUE_SIZE_OES
-Ignore GL_RENDERBUFFER_DEPTH_SIZE
-Ignore GL_RENDERBUFFER_DEPTH_SIZE_OES
-Ignore GL_RENDERBUFFER_GREEN_SIZE
-Ignore GL_RENDERBUFFER_GREEN_SIZE_OES
-Ignore GL_RENDERBUFFER_HEIGHT
-Ignore GL_RENDERBUFFER_HEIGHT_OES
-Ignore GL_RENDERBUFFER_INTERNAL_FORMAT
-Ignore GL_RENDERBUFFER_INTERNAL_FORMAT_OES
-Ignore GL_RENDERBUFFER_OES
-Ignore GL_RENDERBUFFER_OES
-Ignore GL_RENDERBUFFER_RED_SIZE
-Ignore GL_RENDERBUFFER_RED_SIZE_OES
-Ignore GL_RENDERBUFFER_STENCIL_SIZE
-Ignore GL_RENDERBUFFER_STENCIL_SIZE_OES
-Ignore GL_RENDERBUFFER_WIDTH
-Ignore GL_RENDERBUFFER_WIDTH_OES
Ignore GL_RESCALE_NORMAL
Ignore GL_RGB565
Ignore GL_RGB565_OES
@@ -383,8 +323,6 @@ Ignore GL_SRC2_ALPHA
Ignore GL_SRC2_RGB
Ignore GL_STACK_OVERFLOW
Ignore GL_STACK_UNDERFLOW
-Ignore GL_STENCIL_ATTACHMENT
-Ignore GL_STENCIL_ATTACHMENT_OES
Ignore GL_STENCIL_BACK_FAIL
Ignore GL_STENCIL_BACK_FUNC
Ignore GL_STENCIL_BACK_PASS_DEPTH_FAIL
@@ -445,6 +383,8 @@ Ignore GL_WEIGHT_ARRAY_STRIDE_OES
Ignore GL_WEIGHT_ARRAY_TYPE_OES
Ignore GL_WRITE_ONLY_OES
Ignore GL_XOR
+Ignore GL_.+_NV
+Ignore GL_.+_ATI
Ignore glIsFramebuffer
Ignore glIsFramebufferOES
Ignore glIsProgram
diff --git a/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java b/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java
index 4cbf3e217..5c1932513 100644
--- a/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java
+++ b/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java
@@ -275,9 +275,9 @@ public class GL2JPanel extends JPanel implements AWTGLAutoDrawable {
if (Java2D.isFBOEnabled() &&
Java2D.getOGLSurfaceType(g) == Java2D.FBOBJECT) {
if (DEBUG && VERBOSE) {
- System.err.println("GL2JPanel: Fetching GL_FRAMEBUFFER_BINDING_EXT");
+ System.err.println("GL2JPanel: Fetching GL_FRAMEBUFFER_BINDING");
}
- gl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING_EXT, frameBuffer, 0);
+ gl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, frameBuffer, 0);
if (fbObjectWorkarounds ||
!checkedForFBObjectWorkarounds) {
@@ -287,9 +287,9 @@ public class GL2JPanel extends JPanel implements AWTGLAutoDrawable {
// Query the framebuffer for its color buffer so we can hook
// it back up in our context (should not be necessary)
- gl.glGetFramebufferAttachmentParameteriv(GL2.GL_FRAMEBUFFER_EXT,
- GL2.GL_COLOR_ATTACHMENT0_EXT,
- GL2.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT,
+ gl.glGetFramebufferAttachmentParameteriv(GL2.GL_FRAMEBUFFER,
+ GL2.GL_COLOR_ATTACHMENT0,
+ GL2.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME,
frameBufferTexture, 0);
if (DEBUG && VERBOSE) {
System.err.println("GL2JPanel: FBO COLOR_ATTACHMENT0: " + frameBufferTexture[0]);
@@ -312,7 +312,7 @@ public class GL2JPanel extends JPanel implements AWTGLAutoDrawable {
// simultaneously bound to more than one context. Java2D will
// re-bind the FBO during the next validation of its context.
// Note: this breaks rendering at least on NVidia hardware
- gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER_EXT, 0);
+ gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, 0);
}
}
}
@@ -367,9 +367,9 @@ public class GL2JPanel extends JPanel implements AWTGLAutoDrawable {
if (!checkedForFBObjectWorkarounds) {
checkedForFBObjectWorkarounds = true;
gl.glBindTexture(fboTextureTarget, 0);
- gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER_EXT, frameBuffer[0]);
- if (gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER_EXT) !=
- GL2.GL_FRAMEBUFFER_COMPLETE_EXT) {
+ gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, frameBuffer[0]);
+ if (gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER) !=
+ GL2.GL_FRAMEBUFFER_COMPLETE) {
// Need to do workarounds
fbObjectWorkarounds = true;
createNewDepthBuffer = true;
@@ -405,36 +405,36 @@ public class GL2JPanel extends JPanel implements AWTGLAutoDrawable {
" with width " + width[0] + ", height " + height[0]);
}
- gl.glBindRenderbuffer(GL2.GL_RENDERBUFFER_EXT, frameBufferDepthBuffer[0]);
+ gl.glBindRenderbuffer(GL2.GL_RENDERBUFFER, frameBufferDepthBuffer[0]);
// FIXME: may need a loop here like in Java2D
- gl.glRenderbufferStorage(GL2.GL_RENDERBUFFER_EXT, GL2.GL_DEPTH_COMPONENT24, width[0], height[0]);
+ gl.glRenderbufferStorage(GL2.GL_RENDERBUFFER, GL2.GL_DEPTH_COMPONENT24, width[0], height[0]);
- gl.glBindRenderbuffer(GL2.GL_RENDERBUFFER_EXT, 0);
+ gl.glBindRenderbuffer(GL2.GL_RENDERBUFFER, 0);
createNewDepthBuffer = false;
}
gl.glBindTexture(fboTextureTarget, 0);
- gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER_EXT, frameBuffer[0]);
+ gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, frameBuffer[0]);
if (fbObjectWorkarounds) {
// Hook up the color and depth buffer attachment points for this framebuffer
- gl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER_EXT,
- GL2.GL_COLOR_ATTACHMENT0_EXT,
+ gl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER,
+ GL2.GL_COLOR_ATTACHMENT0,
fboTextureTarget,
frameBufferTexture[0],
0);
if (DEBUG && VERBOSE) {
System.err.println("GL2JPanel: frameBufferDepthBuffer: " + frameBufferDepthBuffer[0]);
}
- gl.glFramebufferRenderbuffer(GL2.GL_FRAMEBUFFER_EXT,
- GL2.GL_DEPTH_ATTACHMENT_EXT,
- GL2.GL_RENDERBUFFER_EXT,
+ gl.glFramebufferRenderbuffer(GL2.GL_FRAMEBUFFER,
+ GL2.GL_DEPTH_ATTACHMENT,
+ GL2.GL_RENDERBUFFER,
frameBufferDepthBuffer[0]);
}
if (DEBUG) {
- int status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER_EXT);
- if (status != GL2.GL_FRAMEBUFFER_COMPLETE_EXT) {
+ int status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER);
+ if (status != GL2.GL_FRAMEBUFFER_COMPLETE) {
throw new GLException("Error: framebuffer was incomplete: status = 0x" +
Integer.toHexString(status));
}
@@ -459,7 +459,7 @@ public class GL2JPanel extends JPanel implements AWTGLAutoDrawable {
// apparent driver bugs or at least unspecified behavior causing
// OpenGL to run out of memory with certain cards and drivers
GL2 gl = joglContext.getGL().getGL2();
- gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER_EXT, 0);
+ gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, 0);
}
}