aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-07-18 12:24:17 +0000
committerSven Gothel <[email protected]>2008-07-18 12:24:17 +0000
commite1c716511d4c36b3a6ae82eceeb74147a3001dfe (patch)
tree4357912fc5ee44428476ada1d16d5f265363a1b2 /src/classes/com/sun
parentdb5aca42f5678f4f44750e8297464ca7bbbbc944 (diff)
- Using new config feature: 'IgnoreExtendedInterfaceSymbols <java class source file>'
and get rid of manual 'Ignore' configs for common stuff in the base interfaces. - Add: GLUnsupportedException: - Using new config feature 'UnsupportedExceptionType GLUnsupportedException' - GLUnsupportedException is used for anything 'UnsupportedOperationException' - GLU: - GLU itself is no more abstract - GLU contains the tesselator implementation - name, return type, modifiers and arguments - createGLU(..) - operated by profile name now. - GLU itself will be used for GLES2 - Cleanup: - gluegen/GL configs .. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1725 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun')
-rw-r--r--src/classes/com/sun/opengl/impl/GLContextImpl.java4
-rw-r--r--src/classes/com/sun/opengl/impl/GLPbufferImpl.java2
-rw-r--r--src/classes/com/sun/opengl/impl/GLReflection.java4
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLContext.java4
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java8
-rw-r--r--src/classes/com/sun/opengl/impl/glu/tessellator/Render.java14
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java2
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.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/WindowsWGLDrawableFactory.java2
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java6
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java4
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java2
-rwxr-xr-xsrc/classes/com/sun/opengl/util/texture/Texture.java12
14 files changed, 35 insertions, 33 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java
index 014cc9cf5..5a4cd82fd 100644
--- a/src/classes/com/sun/opengl/impl/GLContextImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java
@@ -239,7 +239,7 @@ public abstract class GLContextImpl extends GLContext {
} else if(GLProfile.isGLES1()) {
clazzName="com.sun.opengl.impl.es2.GLES2"+suffix;
} else {
- throw new GLException("uncovered profile");
+ throw new GLUnsupportedException("uncovered profile");
}
return GLReflection.createInstance(clazzName, cstrArgTypes, cstrArgs);
} catch (Exception e) {
@@ -369,7 +369,7 @@ public abstract class GLContextImpl extends GLContext {
use. Returns one of GLPbuffer.APPLE_FLOAT, GLPbuffer.ATI_FLOAT,
or GLPbuffer.NV_FLOAT. */
public int getFloatingPointMode() throws GLException {
- throw new GLException("Not supported on non-pbuffer contexts");
+ throw new GLUnsupportedException("Not supported on non-pbuffer contexts");
}
/** On some platforms the mismatch between OpenGL's coordinate
diff --git a/src/classes/com/sun/opengl/impl/GLPbufferImpl.java b/src/classes/com/sun/opengl/impl/GLPbufferImpl.java
index 1f48ae8a1..9589cc735 100644
--- a/src/classes/com/sun/opengl/impl/GLPbufferImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLPbufferImpl.java
@@ -75,7 +75,7 @@ public class GLPbufferImpl implements GLPbuffer {
public void setSize(int width, int height) {
// FIXME
- throw new GLException("Not yet implemented");
+ throw new GLUnsupportedException("Not yet implemented");
}
public NativeWindow getNativeWindow() {
diff --git a/src/classes/com/sun/opengl/impl/GLReflection.java b/src/classes/com/sun/opengl/impl/GLReflection.java
index 6898db82d..5e55aba31 100644
--- a/src/classes/com/sun/opengl/impl/GLReflection.java
+++ b/src/classes/com/sun/opengl/impl/GLReflection.java
@@ -48,12 +48,12 @@ public final class GLReflection {
try {
factoryClass = Class.forName(clazzName);
if (factoryClass == null) {
- throw new GLException(clazzName + " not available");
+ throw new GLUnsupportedException(clazzName + " not available");
}
try {
factory = factoryClass.getDeclaredConstructor( cstrArgTypes );
} catch(NoSuchMethodException nsme) {
- throw new GLException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found");
+ throw new GLUnsupportedException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found");
}
return factory;
} catch (Exception e) {
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
index 0e6d07a8e..3a23483cb 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLContext.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
@@ -197,8 +197,8 @@ public class EGLContext extends GLContextImpl {
return null;
}
- public void copy(GLContext source, int mask) throws GLException {
- throw new GLException("Not yet implemented");
+ public void copy(GLContext source, int mask) throws GLUnsupportedException {
+ throw new GLUnsupportedException("Not yet implemented");
}
public void bindPbufferToTexture() {
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
index 00f293ffb..9f6d6b789 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
@@ -123,7 +123,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
GLCapabilitiesChooser chooser) {
- throw new GLException("Not yet implemented");
+ throw new GLUnsupportedException("Not yet implemented");
}
public boolean canCreateGLPbuffer() {
@@ -135,7 +135,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
final int initialWidth,
final int initialHeight,
final GLContext shareWith) {
- throw new GLException("Pbuffer support not available on OpenGL ES");
+ throw new GLUnsupportedException("Pbuffer support not available on OpenGL ES");
}
public GLContext createExternalGLContext() {
@@ -147,7 +147,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
}
public GLDrawable createExternalGLDrawable() {
- throw new GLException("Not yet implemented");
+ throw new GLUnsupportedException("Not yet implemented");
}
public void loadGLULibrary() {
@@ -347,6 +347,6 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
throws GLException {
- throw new GLException("Unimplemented on this platform");
+ throw new GLUnsupportedException("Unimplemented on this platform");
}
}
diff --git a/src/classes/com/sun/opengl/impl/glu/tessellator/Render.java b/src/classes/com/sun/opengl/impl/glu/tessellator/Render.java
index 999656b82..cd6e02255 100644
--- a/src/classes/com/sun/opengl/impl/glu/tessellator/Render.java
+++ b/src/classes/com/sun/opengl/impl/glu/tessellator/Render.java
@@ -297,7 +297,7 @@ class Render {
int newState;
int edgeState = -1; /* force edge state output for first vertex */
- tess.callBeginOrBeginData(GL2ES1.GL_TRIANGLES);
+ tess.callBeginOrBeginData(GL.GL_TRIANGLES);
for (; f != null; f = f.trail) {
/* Loop once for each edge (there will always be 3 edges) */
@@ -328,7 +328,7 @@ class Render {
* edge "e". The fan *should* contain exactly "size" triangles
* (otherwise we've goofed up somewhere).
*/
- tess.callBeginOrBeginData( GL2ES1.GL_TRIANGLE_FAN);
+ tess.callBeginOrBeginData( GL.GL_TRIANGLE_FAN);
tess.callVertexOrVertexData( e.Org.data);
tess.callVertexOrVertexData( e.Sym.Org.data);
@@ -350,7 +350,7 @@ class Render {
* edge "e". The strip *should* contain exactly "size" triangles
* (otherwise we've goofed up somewhere).
*/
- tess.callBeginOrBeginData( GL2ES1.GL_TRIANGLE_STRIP);
+ tess.callBeginOrBeginData( GL.GL_TRIANGLE_STRIP);
tess.callVertexOrVertexData( e.Org.data);
tess.callVertexOrVertexData( e.Sym.Org.data);
@@ -384,7 +384,7 @@ class Render {
for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) {
if (f.inside) {
- tess.callBeginOrBeginData( GL2ES1.GL_LINE_LOOP);
+ tess.callBeginOrBeginData( GL.GL_LINE_LOOP);
e = f.anEdge;
do {
tess.callVertexOrVertexData( e.Org.data);
@@ -536,9 +536,9 @@ class Render {
return true;
}
- tess.callBeginOrBeginData( tess.boundaryOnly ? GL2ES1.GL_LINE_LOOP
- : (tess.cacheCount > 3) ? GL2ES1.GL_TRIANGLE_FAN
- : GL2ES1.GL_TRIANGLES);
+ tess.callBeginOrBeginData( tess.boundaryOnly ? GL.GL_LINE_LOOP
+ : (tess.cacheCount > 3) ? GL.GL_TRIANGLE_FAN
+ : GL.GL_TRIANGLES);
tess.callVertexOrVertexData( v[0].data);
if (sign > 0) {
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
index ff5fbbdff..8bf82b3d2 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
@@ -327,7 +327,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
// FIXME: apparently the Apple extension doesn't require a custom memory allocator
- throw new GLException("Not yet implemented");
+ throw new GLUnsupportedException("Not yet implemented");
}
public boolean isFunctionAvailable(String glFunctionName)
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
index c905ed48e..2880ee0ed 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -115,7 +115,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
public GLDrawable createExternalGLDrawable() {
// FIXME
- throw new GLException("Not yet implemented");
+ throw new GLUnsupportedException("Not yet implemented");
}
public void loadGLULibrary() {
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 7828e6a2c..9216e3e17 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -117,7 +117,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
// (undesirable) -- could maybe also do this with pbuffers
/*
if (!gl.isExtensionAvailable("GL_APPLE_float_pixels")) {
- throw new GLException("Floating-point support (GL_APPLE_float_pixels) not available");
+ throw new GLUnsupportedException("Floating-point support (GL_APPLE_float_pixels) not available");
}
*/
if(GLProfile.isGL2()) {
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index 78a617f8e..a13aba0e4 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -129,7 +129,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
final int initialHeight,
final GLContext shareWith) {
if (!canCreateGLPbuffer()) {
- throw new GLException("Pbuffer support not available with current graphics card");
+ throw new GLUnsupportedException("Pbuffer support not available with current graphics card");
}
final List returnList = new ArrayList();
final GLDrawableFactory factory = this;
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 3ba3f060f..d68f087b6 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -178,7 +178,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
final int initialHeight,
final GLContext shareWith) {
if (!canCreateGLPbuffer()) {
- throw new GLException("Pbuffer support not available with current graphics card");
+ throw new GLUnsupportedException("Pbuffer support not available with current graphics card");
}
final List returnList = new ArrayList();
final GLDrawableFactory factory = this;
@@ -340,7 +340,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
glXExtensions.indexOf("GLX_NV_float_buffer") < 0) {
throw new GLException("Floating-point pbuffers on X11 currently require NVidia hardware");
}
- res[idx++] = GLX.GLX_FLOAT_COMPONENTS_NV;
+ res[idx++] = GLXExt.GLX_FLOAT_COMPONENTS_NV;
res[idx++] = GL.GL_TRUE;
}
}
@@ -413,7 +413,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
caps.setNumSamples(ivalues[i]);
break;
- case GLX.GLX_FLOAT_COMPONENTS_NV:
+ case GLXExt.GLX_FLOAT_COMPONENTS_NV:
caps.setPbufferFloatingPointBuffers(ivalues[i] != GL.GL_FALSE);
break;
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java
index 746b7bd26..377d92f98 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java
@@ -54,12 +54,12 @@ public class X11PbufferGLXContext extends X11GLXContext {
public void bindPbufferToTexture() {
// FIXME: figure out how to implement this
- throw new GLException("Not yet implemented");
+ throw new GLUnsupportedException("Not yet implemented");
}
public void releasePbufferFromTexture() {
// FIXME: figure out how to implement this
- throw new GLException("Not yet implemented");
+ throw new GLUnsupportedException("Not yet implemented");
}
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 8caf2fa33..06aeba0b6 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
@@ -171,7 +171,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
// Pick innocent query values if multisampling or floating point buffers not available
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;
+ int floatNV = getCapabilities().getPbufferFloatingPointBuffers() ? GLXExt.GLX_FLOAT_COMPONENTS_NV : GLX.GLX_RED_SIZE;
// Query the fbconfig to determine its GLCapabilities
int[] iattribs = {
diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java
index f0c36e398..ec3692196 100755
--- a/src/classes/com/sun/opengl/util/texture/Texture.java
+++ b/src/classes/com/sun/opengl/util/texture/Texture.java
@@ -519,11 +519,13 @@ public class Texture {
}
try {
- // FIXME: need to get rid of this cast
- GLUgl2 glu = (GLUgl2) GLU.createGLU(gl);
- glu.gluBuild2DMipmaps(texTarget, data.getInternalFormat(),
- data.getWidth(), data.getHeight(),
- data.getPixelFormat(), data.getPixelType(), data.getBuffer());
+ if(gl.isGL2()) {
+ // FIXME: need to get rid of this cast
+ GLUgl2 glu = (GLUgl2) GLU.createGLU();
+ glu.gluBuild2DMipmaps(texTarget, data.getInternalFormat(),
+ data.getWidth(), data.getHeight(),
+ data.getPixelFormat(), data.getPixelType(), data.getBuffer());
+ }
} finally {
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, align[0]); // restore alignment
}