aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/gl-ignore-gl2_es-enums.cfg10
-rw-r--r--make/gl-ignore-gl2_es12-special.cfg24
-rwxr-xr-xmake/stub_includes/opengl/GLES2/gl2ext.h3
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/GLBufferSizeTracker.java2
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java2
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java2
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java6
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java72
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java134
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java12
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java4
-rwxr-xr-xsrc/classes/com/sun/opengl/util/texture/Texture.java14
-rw-r--r--src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java2
13 files changed, 138 insertions, 149 deletions
diff --git a/make/gl-ignore-gl2_es-enums.cfg b/make/gl-ignore-gl2_es-enums.cfg
index e3b555fa0..3b182bcd2 100644
--- a/make/gl-ignore-gl2_es-enums.cfg
+++ b/make/gl-ignore-gl2_es-enums.cfg
@@ -185,3 +185,13 @@ Ignore GL_VENDOR
Ignore GL_VERSION
Ignore GL_VIEWPORT
Ignore GL_ZERO
+Ignore GL_TEXTURE_CUBE_MAP.*
+Ignore GL_TEXTURE_BINDING_CUBE_MAP.*
+Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_X.*
+Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_X.*
+Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Y.*
+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.*
+
diff --git a/make/gl-ignore-gl2_es12-special.cfg b/make/gl-ignore-gl2_es12-special.cfg
index 2e5d16ba8..a3e55f594 100644
--- a/make/gl-ignore-gl2_es12-special.cfg
+++ b/make/gl-ignore-gl2_es12-special.cfg
@@ -209,8 +209,6 @@ Ignore GL_MATRIX_PALETTE_OES
Ignore GL_MAX_ARRAY_TEXTURE_LAYERS_EXT
Ignore GL_MAX_CLIP_PLANES
Ignore GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
-Ignore GL_MAX_CUBE_MAP_TEXTURE_SIZE
-Ignore GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES
Ignore GL_MAX_FRAGMENT_UNIFORM_VECTORS
Ignore GL_MAX_LIGHTS
Ignore GL_MAX_MODELVIEW_STACK_DEPTH
@@ -404,8 +402,6 @@ Ignore GL_SUBTRACT
Ignore GL_TEXTURE_2D_ARRAY_EXT
Ignore GL_TEXTURE_2D_OES
Ignore GL_TEXTURE_BINDING_2D_ARRAY_EXT
-Ignore GL_TEXTURE_BINDING_CUBE_MAP
-Ignore GL_TEXTURE_BINDING_CUBE_MAP_OES
Ignore GL_TEXTURE_COORD_ARRAY
Ignore GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING
Ignore GL_TEXTURE_COORD_ARRAY_POINTER
@@ -413,26 +409,6 @@ Ignore GL_TEXTURE_COORD_ARRAY_SIZE
Ignore GL_TEXTURE_COORD_ARRAY_STRIDE
Ignore GL_TEXTURE_COORD_ARRAY_TYPE
Ignore GL_TEXTURE_CROP_RECT_OES
-Ignore GL_TEXTURE_CUBE_MAP
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_X
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES
-Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES
-Ignore GL_TEXTURE_CUBE_MAP_OES
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_X
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Y
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Z
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES
-Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES
Ignore GL_TEXTURE_ENV
Ignore GL_TEXTURE_ENV_COLOR
Ignore GL_TEXTURE_ENV_MODE
diff --git a/make/stub_includes/opengl/GLES2/gl2ext.h b/make/stub_includes/opengl/GLES2/gl2ext.h
index b531df2fb..8580e2bdf 100755
--- a/make/stub_includes/opengl/GLES2/gl2ext.h
+++ b/make/stub_includes/opengl/GLES2/gl2ext.h
@@ -64,6 +64,8 @@ extern "C" {
#define GL_OES_EGL_image 1
#ifdef GL_OES_EGL_image
+/** sgothel: wrong defines and/or numbers:
+ *
#define GL_TEXTURE_2D_OES 0x1
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x3
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x4
@@ -73,6 +75,7 @@ extern "C" {
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x8
#define GL_RENDERBUFFER_OES 0x9
#define GL_TEXTURE_RECTANGLE_NV_OES 0xb
+ */
typedef void *GLeglImageOES;
GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
diff --git a/src/classes/com/sun/opengl/impl/GLBufferSizeTracker.java b/src/classes/com/sun/opengl/impl/GLBufferSizeTracker.java
index 3cc756788..53fcc2de1 100755
--- a/src/classes/com/sun/opengl/impl/GLBufferSizeTracker.java
+++ b/src/classes/com/sun/opengl/impl/GLBufferSizeTracker.java
@@ -48,7 +48,7 @@ import javax.media.opengl.*;
* turn the resulting base address into a java.nio.ByteBuffer, we need
* to know the size in bytes of the allocated OpenGL buffer object.
* Previously we would compute this size by using
- * glGetBufferParameterivARB with a pname of GL_BUFFER_SIZE_ARB, but
+ * glGetBufferParameterivARB with a pname of GL_BUFFER_SIZE, but
* it appears doing so each time glMapBuffer is called is too costly
* on at least Apple's new multithreaded OpenGL implementation. <P>
*
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
index 7b29dbfb6..bdde0c887 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
@@ -88,7 +88,7 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
rect = false;
}
}
- textureTarget = (rect ? GL2.GL_TEXTURE_RECTANGLE_EXT : GL.GL_TEXTURE_2D);
+ textureTarget = (rect ? GL2.GL_TEXTURE_RECTANGLE: GL.GL_TEXTURE_2D);
int[] tmp = new int[1];
gl.glGenTextures(1, tmp, 0);
texture = tmp[0];
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
index dab06f19a..7828e6a2c 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -101,7 +101,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
int renderTarget;
GLCapabilities capabilities = getCapabilities();
if (GLProfile.isGL2() && capabilities.getPbufferRenderToTextureRectangle()) {
- renderTarget = GL2.GL_TEXTURE_RECTANGLE_EXT;
+ renderTarget = GL2.GL_TEXTURE_RECTANGLE;
} else {
int w = getNextPowerOf2(getWidth());
int h = getNextPowerOf2(getHeight());
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java
index 7af3cbfc9..f6be43f57 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java
@@ -68,7 +68,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
WGLExt wglExt = getWGLExt();
gl.glBindTexture(textureTarget, texture);
if (rtt && hasRTT) {
- if (!wglExt.wglBindTexImageARB(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT_ARB)) {
+ if (!wglExt.wglBindTexImageARB(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT)) {
throw new GLException("Binding of pbuffer to texture failed: " + wglGetLastError());
}
}
@@ -84,7 +84,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
}
if (rtt && hasRTT) {
WGLExt wglExt = getWGLExt();
- if (!wglExt.wglReleaseTexImageARB(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT_ARB)) {
+ if (!wglExt.wglReleaseTexImageARB(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT)) {
throw new GLException("Releasing of pbuffer from texture failed: " + wglGetLastError());
}
}
@@ -123,7 +123,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
if (DEBUG) {
System.err.println(" Using render-to-texture-rectangle");
}
- textureTarget = GL2.GL_TEXTURE_RECTANGLE_EXT;
+ textureTarget = GL2.GL_TEXTURE_RECTANGLE;
} else {
if (DEBUG) {
System.err.println(" Using vanilla render-to-texture");
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
index eabaaa796..0cc8133d8 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
@@ -195,15 +195,15 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
if (DEBUG) {
System.err.println("" + nformats + " suitable pixel formats found");
// query pixel format
- iattributes[0] = WGLExt.WGL_RED_BITS_ARB;
- iattributes[1] = WGLExt.WGL_GREEN_BITS_ARB;
- iattributes[2] = WGLExt.WGL_BLUE_BITS_ARB;
- iattributes[3] = WGLExt.WGL_ALPHA_BITS_ARB;
- iattributes[4] = WGLExt.WGL_DEPTH_BITS_ARB;
- iattributes[5] = (useFloat ? (ati ? WGLExt.WGL_PIXEL_TYPE_ARB : WGLExt.WGL_FLOAT_COMPONENTS_NV) : WGLExt.WGL_RED_BITS_ARB);
- iattributes[6] = (haveMultisample ? WGLExt.WGL_SAMPLE_BUFFERS_ARB : WGLExt.WGL_RED_BITS_ARB);
- iattributes[7] = (haveMultisample ? WGLExt.WGL_SAMPLES_ARB : WGLExt.WGL_RED_BITS_ARB);
- iattributes[8] = WGLExt.WGL_DRAW_TO_PBUFFER_ARB;
+ iattributes[0] = WGLExt.WGL_RED_BITS;
+ iattributes[1] = WGLExt.WGL_GREEN_BITS;
+ iattributes[2] = WGLExt.WGL_BLUE_BITS;
+ iattributes[3] = WGLExt.WGL_ALPHA_BITS;
+ iattributes[4] = WGLExt.WGL_DEPTH_BITS;
+ iattributes[5] = (useFloat ? (ati ? WGLExt.WGL_PIXEL_TYPE: WGLExt.WGL_FLOAT_COMPONENTS_NV) : WGLExt.WGL_RED_BITS);
+ iattributes[6] = (haveMultisample ? WGLExt.WGL_SAMPLE_BUFFERS: WGLExt.WGL_RED_BITS);
+ iattributes[7] = (haveMultisample ? WGLExt.WGL_SAMPLES: WGLExt.WGL_RED_BITS);
+ iattributes[8] = WGLExt.WGL_DRAW_TO_PBUFFER;
int[] ivalues = new int[9];
for (int i = 0; i < nformats; i++) {
if (!wglExt.wglGetPixelFormatAttribivARB(parentHdc, pformats[i], 0, 9, iattributes, 0, ivalues, 0)) {
@@ -222,9 +222,9 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
System.err.print(" samples: " + ivalues[7]);
if (useFloat) {
if (ati) {
- if (ivalues[5] == WGLExt.WGL_TYPE_RGBA_FLOAT_ATI) {
+ if (ivalues[5] == WGLExt.WGL_TYPE_RGBA_FLOAT) {
System.err.print(" [ati float]");
- } else if (ivalues[5] != WGLExt.WGL_TYPE_RGBA_ARB) {
+ } else if (ivalues[5] != WGLExt.WGL_TYPE_RGBA) {
System.err.print(" [unknown pixel type " + ivalues[5] + "]");
}
} else {
@@ -251,20 +251,20 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
niattribs = 0;
if (rtt) {
- iattributes[niattribs++] = WGLExt.WGL_TEXTURE_FORMAT_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_TEXTURE_FORMAT;
if (useFloat) {
iattributes[niattribs++] = WGLExt.WGL_TEXTURE_FLOAT_RGB_NV;
} else {
- iattributes[niattribs++] = WGLExt.WGL_TEXTURE_RGBA_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_TEXTURE_RGBA;
}
- iattributes[niattribs++] = WGLExt.WGL_TEXTURE_TARGET_ARB;
- iattributes[niattribs++] = rect ? WGLExt.WGL_TEXTURE_RECTANGLE_NV : WGLExt.WGL_TEXTURE_2D_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_TEXTURE_TARGET;
+ iattributes[niattribs++] = rect ? WGLExt.WGL_TEXTURE_RECTANGLE_NV : WGLExt.WGL_TEXTURE_2D;
- iattributes[niattribs++] = WGLExt.WGL_MIPMAP_TEXTURE_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_MIPMAP_TEXTURE;
iattributes[niattribs++] = GL.GL_FALSE;
- iattributes[niattribs++] = WGLExt.WGL_PBUFFER_LARGEST_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_PBUFFER_LARGEST;
iattributes[niattribs++] = GL.GL_FALSE;
}
@@ -298,23 +298,23 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
// Re-query chosen pixel format
{
niattribs = 0;
- iattributes[niattribs++] = WGLExt.WGL_ACCELERATION_ARB;
- iattributes[niattribs++] = WGLExt.WGL_RED_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER_ARB;
- iattributes[niattribs++] = WGLExt.WGL_STEREO_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS_ARB;
- iattributes[niattribs++] = (useFloat ? (ati ? WGLExt.WGL_PIXEL_TYPE_ARB : WGLExt.WGL_FLOAT_COMPONENTS_NV) : WGLExt.WGL_RED_BITS_ARB);
- iattributes[niattribs++] = (haveMultisample ? WGLExt.WGL_SAMPLE_BUFFERS_ARB : WGLExt.WGL_RED_BITS_ARB);
- iattributes[niattribs++] = (haveMultisample ? WGLExt.WGL_SAMPLES_ARB : WGLExt.WGL_RED_BITS_ARB);
- iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_PBUFFER_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCELERATION;
+ iattributes[niattribs++] = WGLExt.WGL_RED_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER;
+ iattributes[niattribs++] = WGLExt.WGL_STEREO;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS;
+ iattributes[niattribs++] = (useFloat ? (ati ? WGLExt.WGL_PIXEL_TYPE: WGLExt.WGL_FLOAT_COMPONENTS_NV) : WGLExt.WGL_RED_BITS);
+ iattributes[niattribs++] = (haveMultisample ? WGLExt.WGL_SAMPLE_BUFFERS: WGLExt.WGL_RED_BITS);
+ iattributes[niattribs++] = (haveMultisample ? WGLExt.WGL_SAMPLES: WGLExt.WGL_RED_BITS);
+ iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_PBUFFER;
int[] ivalues = new int[niattribs];
// FIXME: usually prefer to throw exceptions, but failure here is not critical
if (wglExt.wglGetPixelFormatAttribivARB(parentHdc, pformats[whichFormat], 0, niattribs, iattributes, 0, ivalues, 0)) {
@@ -324,9 +324,9 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
// Determine the actual width and height we were able to create.
int[] tmp = new int[1];
- wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_WIDTH_ARB, tmp, 0 );
+ wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_WIDTH, tmp, 0 );
width = tmp[0];
- wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_HEIGHT_ARB, tmp, 0 );
+ wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_HEIGHT, tmp, 0 );
height = tmp[0];
nw.setSize(width, height);
} finally {
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
index b0063382c..3b69ad3a2 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
@@ -203,37 +203,37 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
// meaningless, and put in whether it can render to a
// window, to a pbuffer, or to a pixmap)
int niattribs = 0;
- iattributes[0] = WGLExt.WGL_NUMBER_PIXEL_FORMATS_ARB;
+ iattributes[0] = WGLExt.WGL_NUMBER_PIXEL_FORMATS;
if (dummyWGLExt.wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, iattributes, 0, iresults, 0)) {
numFormats = iresults[0];
if (DEBUG) {
- System.err.println("wglGetPixelFormatAttribivARB reported WGL_NUMBER_PIXEL_FORMATS_ARB = " + numFormats);
+ System.err.println("wglGetPixelFormatAttribivARB reported WGL_NUMBER_PIXEL_FORMATS = " + numFormats);
}
// Should we be filtering out the pixel formats which aren't
// applicable, as we are doing here?
// We don't have enough information in the GLCapabilities to
// represent those that aren't...
- iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_WINDOW_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCELERATION_ARB;
- iattributes[niattribs++] = WGLExt.WGL_SUPPORT_OPENGL_ARB;
- iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER_ARB;
- iattributes[niattribs++] = WGLExt.WGL_STEREO_ARB;
- iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;
- iattributes[niattribs++] = WGLExt.WGL_RED_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_WINDOW;
+ iattributes[niattribs++] = WGLExt.WGL_ACCELERATION;
+ iattributes[niattribs++] = WGLExt.WGL_SUPPORT_OPENGL;
+ iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER;
+ iattributes[niattribs++] = WGLExt.WGL_STEREO;
+ iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE;
+ iattributes[niattribs++] = WGLExt.WGL_RED_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS;
if (haveWGLARBMultisample) {
- iattributes[niattribs++] = WGLExt.WGL_SAMPLE_BUFFERS_ARB;
- iattributes[niattribs++] = WGLExt.WGL_SAMPLES_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_SAMPLE_BUFFERS;
+ iattributes[niattribs++] = WGLExt.WGL_SAMPLES;
}
availableCaps = new GLCapabilities[numFormats];
@@ -421,66 +421,66 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
int niattribs = 0;
- iattributes[niattribs++] = WGLExt.WGL_SUPPORT_OPENGL_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_SUPPORT_OPENGL;
iattributes[niattribs++] = GL.GL_TRUE;
if (pbuffer) {
- iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_PBUFFER_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_PBUFFER;
iattributes[niattribs++] = GL.GL_TRUE;
} else {
- iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_WINDOW_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_WINDOW;
iattributes[niattribs++] = GL.GL_TRUE;
}
- iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER;
if (capabilities.getDoubleBuffered()) {
iattributes[niattribs++] = GL.GL_TRUE;
} else {
iattributes[niattribs++] = GL.GL_FALSE;
}
- iattributes[niattribs++] = WGLExt.WGL_STEREO_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_STEREO;
if (capabilities.getStereo()) {
iattributes[niattribs++] = GL.GL_TRUE;
} else {
iattributes[niattribs++] = GL.GL_FALSE;
}
- iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS;
iattributes[niattribs++] = capabilities.getDepthBits();
- iattributes[niattribs++] = WGLExt.WGL_RED_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_RED_BITS;
iattributes[niattribs++] = capabilities.getRedBits();
- iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS;
iattributes[niattribs++] = capabilities.getGreenBits();
- iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS;
iattributes[niattribs++] = capabilities.getBlueBits();
- iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS;
iattributes[niattribs++] = capabilities.getAlphaBits();
- iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS;
iattributes[niattribs++] = capabilities.getStencilBits();
if (capabilities.getAccumRedBits() > 0 ||
capabilities.getAccumGreenBits() > 0 ||
capabilities.getAccumBlueBits() > 0 ||
capabilities.getAccumAlphaBits() > 0) {
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_BITS;
iattributes[niattribs++] = (capabilities.getAccumRedBits() +
capabilities.getAccumGreenBits() +
capabilities.getAccumBlueBits() +
capabilities.getAccumAlphaBits());
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS;
iattributes[niattribs++] = capabilities.getAccumRedBits();
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS;
iattributes[niattribs++] = capabilities.getAccumGreenBits();
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS;
iattributes[niattribs++] = capabilities.getAccumBlueBits();
- iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS;
iattributes[niattribs++] = capabilities.getAccumAlphaBits();
}
if (wglExt.isExtensionAvailable("WGL_ARB_multisample")) {
if (capabilities.getSampleBuffers()) {
- iattributes[niattribs++] = WGLExt.WGL_SAMPLE_BUFFERS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_SAMPLE_BUFFERS;
iattributes[niattribs++] = GL.GL_TRUE;
- iattributes[niattribs++] = WGLExt.WGL_SAMPLES_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_SAMPLES;
iattributes[niattribs++] = capabilities.getNumSamples();
}
}
@@ -526,16 +526,16 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
if (rtt) {
throw new GLException("Render-to-floating-point-texture not supported on ATI hardware");
} else {
- iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;
- iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA_FLOAT_ATI;
+ iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE;
+ iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA_FLOAT;
}
} else {
if (!rtt) {
// Currently we don't support non-truecolor visuals in the
// GLCapabilities, so we don't offer the option of making
// color-index pbuffers.
- iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;
- iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE;
+ iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA;
}
}
@@ -553,13 +553,13 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
iattributes[niattribs++] = WGLExt.WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV;
iattributes[niattribs++] = GL.GL_TRUE;
} else {
- iattributes[niattribs++] = rect ? WGLExt.WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV : WGLExt.WGL_BIND_TO_TEXTURE_RGB_ARB;
+ iattributes[niattribs++] = rect ? WGLExt.WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV : WGLExt.WGL_BIND_TO_TEXTURE_RGB;
iattributes[niattribs++] = GL.GL_TRUE;
}
}
} else {
- iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;
- iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE;
+ iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA;
}
return true;
@@ -573,43 +573,43 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
for (int i = 0; i < niattribs; i++) {
int attr = iattribs[i];
switch (attr) {
- case WGLExt.WGL_DRAW_TO_WINDOW_ARB:
+ case WGLExt.WGL_DRAW_TO_WINDOW:
if (requireRenderToWindow && iresults[i] != GL.GL_TRUE)
return null;
break;
- case WGLExt.WGL_DRAW_TO_PBUFFER_ARB:
+ case WGLExt.WGL_DRAW_TO_PBUFFER:
break;
- case WGLExt.WGL_ACCELERATION_ARB:
- res.setHardwareAccelerated(iresults[i] == WGLExt.WGL_FULL_ACCELERATION_ARB);
+ case WGLExt.WGL_ACCELERATION:
+ res.setHardwareAccelerated(iresults[i] == WGLExt.WGL_FULL_ACCELERATION);
break;
- case WGLExt.WGL_SUPPORT_OPENGL_ARB:
+ case WGLExt.WGL_SUPPORT_OPENGL:
if (iresults[i] != GL.GL_TRUE)
return null;
break;
- case WGLExt.WGL_DEPTH_BITS_ARB:
+ case WGLExt.WGL_DEPTH_BITS:
res.setDepthBits(iresults[i]);
break;
- case WGLExt.WGL_STENCIL_BITS_ARB:
+ case WGLExt.WGL_STENCIL_BITS:
res.setStencilBits(iresults[i]);
break;
- case WGLExt.WGL_DOUBLE_BUFFER_ARB:
+ case WGLExt.WGL_DOUBLE_BUFFER:
res.setDoubleBuffered(iresults[i] == GL.GL_TRUE);
break;
- case WGLExt.WGL_STEREO_ARB:
+ case WGLExt.WGL_STEREO:
res.setStereo(iresults[i] == GL.GL_TRUE);
break;
- case WGLExt.WGL_PIXEL_TYPE_ARB:
+ case WGLExt.WGL_PIXEL_TYPE:
// Fail softly with unknown results here
- if (iresults[i] == WGLExt.WGL_TYPE_RGBA_ARB ||
- iresults[i] == WGLExt.WGL_TYPE_RGBA_FLOAT_ATI) {
+ if (iresults[i] == WGLExt.WGL_TYPE_RGBA||
+ iresults[i] == WGLExt.WGL_TYPE_RGBA_FLOAT) {
res.setPbufferFloatingPointBuffers(true);
}
break;
@@ -620,43 +620,43 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
}
break;
- case WGLExt.WGL_RED_BITS_ARB:
+ case WGLExt.WGL_RED_BITS:
res.setRedBits(iresults[i]);
break;
- case WGLExt.WGL_GREEN_BITS_ARB:
+ case WGLExt.WGL_GREEN_BITS:
res.setGreenBits(iresults[i]);
break;
- case WGLExt.WGL_BLUE_BITS_ARB:
+ case WGLExt.WGL_BLUE_BITS:
res.setBlueBits(iresults[i]);
break;
- case WGLExt.WGL_ALPHA_BITS_ARB:
+ case WGLExt.WGL_ALPHA_BITS:
res.setAlphaBits(iresults[i]);
break;
- case WGLExt.WGL_ACCUM_RED_BITS_ARB:
+ case WGLExt.WGL_ACCUM_RED_BITS:
res.setAccumRedBits(iresults[i]);
break;
- case WGLExt.WGL_ACCUM_GREEN_BITS_ARB:
+ case WGLExt.WGL_ACCUM_GREEN_BITS:
res.setAccumGreenBits(iresults[i]);
break;
- case WGLExt.WGL_ACCUM_BLUE_BITS_ARB:
+ case WGLExt.WGL_ACCUM_BLUE_BITS:
res.setAccumBlueBits(iresults[i]);
break;
- case WGLExt.WGL_ACCUM_ALPHA_BITS_ARB:
+ case WGLExt.WGL_ACCUM_ALPHA_BITS:
res.setAccumAlphaBits(iresults[i]);
break;
- case WGLExt.WGL_SAMPLE_BUFFERS_ARB:
+ case WGLExt.WGL_SAMPLE_BUFFERS:
res.setSampleBuffers(iresults[i] != 0);
break;
- case WGLExt.WGL_SAMPLES_ARB:
+ case WGLExt.WGL_SAMPLES:
res.setNumSamples(iresults[i]);
break;
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
index 8bf18e670..e9e4fc055 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -251,8 +251,8 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
res.setAccumBlueBits (glXGetConfig(display, info, GLX.GLX_ACCUM_BLUE_SIZE, tmp, 0));
res.setAccumAlphaBits(glXGetConfig(display, info, GLX.GLX_ACCUM_ALPHA_SIZE, tmp, 0));
if (isMultisampleAvailable()) {
- res.setSampleBuffers(glXGetConfig(display, info, GLX.GLX_SAMPLE_BUFFERS_ARB, tmp, 0) != 0);
- res.setNumSamples (glXGetConfig(display, info, GLX.GLX_SAMPLES_ARB, tmp, 0));
+ res.setSampleBuffers(glXGetConfig(display, info, GLX.GLX_SAMPLE_BUFFERS, tmp, 0) != 0);
+ res.setNumSamples (glXGetConfig(display, info, GLX.GLX_SAMPLES, tmp, 0));
}
return res;
}
@@ -327,9 +327,9 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
res[idx++] = caps.getAccumAlphaBits();
}
if (isMultisampleAvailable && caps.getSampleBuffers()) {
- res[idx++] = GLXExt.GLX_SAMPLE_BUFFERS_ARB;
+ res[idx++] = GLXExt.GLX_SAMPLE_BUFFERS;
res[idx++] = GL.GL_TRUE;
- res[idx++] = GLXExt.GLX_SAMPLES_ARB;
+ res[idx++] = GLXExt.GLX_SAMPLES;
res[idx++] = caps.getNumSamples();
}
if (pbuffer) {
@@ -404,11 +404,11 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
caps.setAccumAlphaBits(ivalues[i]);
break;
- case GLXExt.GLX_SAMPLE_BUFFERS_ARB:
+ case GLXExt.GLX_SAMPLE_BUFFERS:
caps.setSampleBuffers(ivalues[i] != GL.GL_FALSE);
break;
- case GLXExt.GLX_SAMPLES_ARB:
+ case GLXExt.GLX_SAMPLES:
caps.setNumSamples(ivalues[i]);
break;
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
index d5cdd6016..8caf2fa33 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
@@ -169,8 +169,8 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
this.fbConfig = fbConfig;
// Pick innocent query values if multisampling or floating point buffers not available
- int sbAttrib = ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable() ? GLXExt.GLX_SAMPLE_BUFFERS_ARB : GLX.GLX_RED_SIZE;
- int samplesAttrib = ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable() ? GLXExt.GLX_SAMPLES_ARB : GLX.GLX_RED_SIZE;
+ int sbAttrib = ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable() ? GLXExt.GLX_SAMPLE_BUFFERS: GLX.GLX_RED_SIZE;
+ int samplesAttrib = ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable() ? GLXExt.GLX_SAMPLES: GLX.GLX_RED_SIZE;
int floatNV = getCapabilities().getPbufferFloatingPointBuffers() ? GLX.GLX_FLOAT_COMPONENTS_NV : GLX.GLX_RED_SIZE;
// Query the fbconfig to determine its GLCapabilities
diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java
index 56f7e8a6a..b1066f120 100755
--- a/src/classes/com/sun/opengl/util/texture/Texture.java
+++ b/src/classes/com/sun/opengl/util/texture/Texture.java
@@ -259,7 +259,7 @@ public class Texture {
*
* @return the OpenGL target of this texture
* @see javax.media.opengl.GL#GL_TEXTURE_2D
- * @see javax.media.opengl.GL2#GL_TEXTURE_RECTANGLE_ARB
+ * @see javax.media.opengl.GL2#GL_TEXTURE_RECTANGLE
*/
public int getTarget() {
return target;
@@ -350,7 +350,7 @@ public class Texture {
* @return the texture coordinates corresponding to the specified sub-image
*/
public TextureCoords getSubImageTexCoords(int x1, int y1, int x2, int y2) {
- if (target == GL2.GL_TEXTURE_RECTANGLE_ARB) {
+ if (target == GL2.GL_TEXTURE_RECTANGLE) {
if (mustFlipVertically) {
return new TextureCoords(x1, texHeight - y1, x2, texHeight - y2);
} else {
@@ -460,7 +460,7 @@ public class Texture {
texWidth = imgWidth;
texHeight = imgHeight;
- texTarget = GL2.GL_TEXTURE_RECTANGLE_ARB;
+ texTarget = GL2.GL_TEXTURE_RECTANGLE;
} else {
// If we receive non-power-of-two compressed texture data and
// don't have true hardware support for compressed textures, we
@@ -590,8 +590,8 @@ public class Texture {
int magFilter = GL.GL_LINEAR;
int wrapMode = (gl.isExtensionAvailable("GL_VERSION_1_2") || !gl.isGL2()) ? GL.GL_CLAMP_TO_EDGE : GL2.GL_CLAMP;
- // REMIND: figure out what to do for GL_TEXTURE_RECTANGLE_ARB
- if (texTarget != GL2.GL_TEXTURE_RECTANGLE_ARB) {
+ // REMIND: figure out what to do for GL_TEXTURE_RECTANGLE
+ if (texTarget != GL2.GL_TEXTURE_RECTANGLE) {
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_MIN_FILTER, minFilter);
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_MAG_FILTER, magFilter);
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_WRAP_S, wrapMode);
@@ -605,7 +605,7 @@ public class Texture {
// map
if ((this.target == 0) ||
(this.target == GL.GL_TEXTURE_2D) ||
- (this.target == GL2.GL_TEXTURE_RECTANGLE_ARB)) {
+ (this.target == GL2.GL_TEXTURE_RECTANGLE)) {
this.target = texTarget;
}
@@ -852,7 +852,7 @@ public class Texture {
private void setImageSize(int width, int height, int target) {
imgWidth = width;
imgHeight = height;
- if (target == GL2.GL_TEXTURE_RECTANGLE_ARB) {
+ if (target == GL2.GL_TEXTURE_RECTANGLE) {
if (mustFlipVertically) {
coords = new TextureCoords(0, imgHeight, imgWidth, 0);
} else {
diff --git a/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java b/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java
index a48fa3676..4cbf3e217 100644
--- a/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java
+++ b/src/classes/javax/media/opengl/awt/gl2/GL2JPanel.java
@@ -361,7 +361,7 @@ public class GL2JPanel extends JPanel implements AWTGLAutoDrawable {
}
// The texture target for Java2D's OpenGL pipeline when using FBOs
- // -- either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB
+ // -- either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE
int fboTextureTarget = Java2D.getOGLTextureType(g);
if (!checkedForFBObjectWorkarounds) {