aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenanse <[email protected]>2012-11-19 10:21:07 -0600
committerRenanse <[email protected]>2012-11-19 10:21:07 -0600
commitc817547edf886eb7d22fd3e8297b46430f124cf5 (patch)
tree4f05708606e3d0bef6f58af3cc9bbf949de47a1b
parentde4beae41b126bcfd0d25a9ebc779089496b0dc3 (diff)
Fixed jogl2-based texture utils to contain values for a few dozen types.
Fixed headers. Fixed pom files to remove old references to jogl1 and to reference jogl2 in the same way we reference other libs in trunk pom.
-rw-r--r--trunk/ardor3d-jogl/pom.xml52
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtAwtCanvas.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/NewtWindowContainer.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtFocusWrapper.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKey.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShaderObjectsStateUtil.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java2
-rw-r--r--trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/util/JoglTextureUtil.java162
-rw-r--r--trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/LwjglShaderObjectsStateUtil.java72
-rw-r--r--trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/util/LwjglTextureUtil.java6
-rw-r--r--trunk/pom.xml26
16 files changed, 192 insertions, 148 deletions
diff --git a/trunk/ardor3d-jogl/pom.xml b/trunk/ardor3d-jogl/pom.xml
index fffd522..56c0800 100644
--- a/trunk/ardor3d-jogl/pom.xml
+++ b/trunk/ardor3d-jogl/pom.xml
@@ -23,32 +23,30 @@
</plugins>
</build>
<dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>ardor3d-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jogamp.gluegen</groupId>
- <artifactId>gluegen-rt-main</artifactId>
- <version>2.0-rc11</version>
- </dependency>
- <dependency>
- <groupId>org.jogamp.jogl</groupId>
- <artifactId>jogl-all-main</artifactId>
- <version>2.0-rc11</version>
- </dependency>
- <!--
- <dependency>
- <groupId>org.jogamp.joal</groupId>
- <artifactId>joal-main</artifactId>
- <version>2.0-rc11</version>
- </dependency>
- <dependency>
- <groupId>org.jogamp.jocl</groupId>
- <artifactId>jocl-main</artifactId>
- <version>2.0-rc11</version>
- </dependency> -->
- </dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ardor3d-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.gluegen</groupId>
+ <artifactId>gluegen-rt-main</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.jogl</groupId>
+ <artifactId>jogl-all-main</artifactId>
+ </dependency>
+ <!--
+ <dependency>
+ <groupId>org.jogamp.joal</groupId>
+ <artifactId>joal-main</artifactId>
+ <version>2.0-rc11</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.jocl</groupId>
+ <artifactId>jocl-main</artifactId>
+ <version>2.0-rc11</version>
+ </dependency> -->
+ </dependencies>
</project>
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtAwtCanvas.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtAwtCanvas.java
index 60e8a67..8b2517a 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtAwtCanvas.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtAwtCanvas.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java
index 8fe2e49..3333d90 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/NewtWindowContainer.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/NewtWindowContainer.java
index 3687c37..5470a36 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/NewtWindowContainer.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/NewtWindowContainer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtFocusWrapper.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtFocusWrapper.java
index be2101d..5068e6c 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtFocusWrapper.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtFocusWrapper.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKey.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKey.java
index a37a7b2..30861a4 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKey.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKey.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java
index 478ad19..43bd01a 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtKeyboardWrapper.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java
index 272f2b0..1a9f8cc 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java
index bbd9d09..6ecf6bb 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseWrapper.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShaderObjectsStateUtil.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShaderObjectsStateUtil.java
index 8c0f59f..f254b29 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShaderObjectsStateUtil.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglShaderObjectsStateUtil.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java
index af0941d..e98ced2 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java
index 21ef5df..96927ae 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008-2011 Ardor Labs, Inc.
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
*
* This file is part of Ardor3D.
*
diff --git a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/util/JoglTextureUtil.java b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/util/JoglTextureUtil.java
index 504cb1b..2e9ab9e 100644
--- a/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/util/JoglTextureUtil.java
+++ b/trunk/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/util/JoglTextureUtil.java
@@ -18,7 +18,6 @@ import javax.media.opengl.GL2GL3;
import com.ardor3d.image.ImageDataFormat;
import com.ardor3d.image.PixelDataType;
-import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.image.Texture.ApplyMode;
import com.ardor3d.image.Texture.CombinerFunctionAlpha;
import com.ardor3d.image.Texture.CombinerFunctionRGB;
@@ -30,13 +29,14 @@ import com.ardor3d.image.Texture.DepthTextureCompareMode;
import com.ardor3d.image.Texture.DepthTextureMode;
import com.ardor3d.image.Texture.MagnificationFilter;
import com.ardor3d.image.Texture.MinificationFilter;
+import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.renderer.state.TextureState.CorrectionType;
public abstract class JoglTextureUtil {
public static int getGLInternalFormat(final TextureStoreFormat format) {
switch (format) {
- // first some frequently used formats
+ // first some frequently used formats
case RGBA8:
return GL.GL_RGBA8;
case RGB8:
@@ -47,6 +47,10 @@ public abstract class JoglTextureUtil {
return GL2GL3.GL_COMPRESSED_RGBA;
case CompressedRGB:
return GL2GL3.GL_COMPRESSED_RGB;
+ case CompressedRG:
+ return GL2GL3.GL_COMPRESSED_RG;
+ case CompressedRed:
+ return GL2GL3.GL_COMPRESSED_RED;
case CompressedLuminance:
return GL2.GL_COMPRESSED_LUMINANCE;
case CompressedLuminanceAlpha:
@@ -157,56 +161,48 @@ public abstract class JoglTextureUtil {
return GL2.GL_INTENSITY16F;
case Intensity32F:
return GL2.GL_INTENSITY32F;
- case CompressedRG:
- break;
- case CompressedRed:
- break;
- case GuessCompressedFormat:
- break;
- case GuessNoCompressedFormat:
- break;
+ case R8:
+ return GL2ES2.GL_R8;
case R16:
- break;
+ return GL2GL3.GL_R16;
+ case RG8:
+ return GL2ES2.GL_RG8;
+ case RG16:
+ return GL2GL3.GL_RG16;
case R16F:
- break;
+ return GL2ES2.GL_R16F;
+ case R32F:
+ return GL2GL3.GL_R32F;
+ case RG16F:
+ return GL2ES2.GL_RG16F;
+ case RG32F:
+ return GL2GL3.GL_RG32F;
+ case R8I:
+ return GL2GL3.GL_R8I;
+ case R8UI:
+ return GL2GL3.GL_R8UI;
case R16I:
- break;
+ return GL2GL3.GL_R16I;
case R16UI:
- break;
- case R32F:
- break;
+ return GL2GL3.GL_R16UI;
case R32I:
- break;
+ return GL2GL3.GL_R32I;
case R32UI:
- break;
- case R8:
- break;
- case R8I:
- break;
- case R8UI:
- break;
- case RG16:
- break;
- case RG16F:
- break;
+ return GL2GL3.GL_R32UI;
+ case RG8I:
+ return GL2GL3.GL_RG8I;
+ case RG8UI:
+ return GL2GL3.GL_RG8UI;
case RG16I:
- break;
+ return GL2GL3.GL_RG16I;
case RG16UI:
- break;
- case RG32F:
- break;
+ return GL2GL3.GL_RG16UI;
case RG32I:
- break;
+ return GL2GL3.GL_RG32I;
case RG32UI:
- break;
- case RG8:
- break;
- case RG8I:
- break;
- case RG8UI:
- break;
+ return GL2GL3.GL_RG32UI;
default:
- break;
+ break;
}
throw new IllegalArgumentException("Incorrect format set: " + format);
}
@@ -253,7 +249,7 @@ public abstract class JoglTextureUtil {
case BGR:
return GL2GL3.GL_BGR;
case BGRA:
- return GL2.GL_BGRA;
+ return GL.GL_BGRA;
case Red:
return GL2ES2.GL_RED;
case Blue:
@@ -264,22 +260,22 @@ public abstract class JoglTextureUtil {
return GL2.GL_COLOR_INDEX;
case StencilIndex:
return GL2ES2.GL_STENCIL_INDEX;
- case PrecompressedDXT1:
- break;
- case PrecompressedDXT1A:
- break;
- case PrecompressedDXT3:
- break;
- case PrecompressedDXT5:
- break;
- case PrecompressedLATC_L:
- break;
- case PrecompressedLATC_LA:
- break;
- case RG:
- break;
- default:
- break;
+ case PrecompressedDXT1:
+ break;
+ case PrecompressedDXT1A:
+ break;
+ case PrecompressedDXT3:
+ break;
+ case PrecompressedDXT5:
+ break;
+ case PrecompressedLATC_L:
+ break;
+ case PrecompressedLATC_LA:
+ break;
+ case RG:
+ break;
+ default:
+ break;
}
throw new IllegalArgumentException("Incorrect format set: " + format);
}
@@ -352,56 +348,32 @@ public abstract class JoglTextureUtil {
case Depth32:
case Depth32F:
return GL2ES2.GL_DEPTH_COMPONENT;
- case CompressedRG:
- break;
- case CompressedRed:
- break;
- case GuessCompressedFormat:
- break;
- case GuessNoCompressedFormat:
- break;
+ case R8:
case R16:
- break;
case R16F:
- break;
+ case R32F:
+ case R8I:
+ case R8UI:
case R16I:
- break;
case R16UI:
- break;
- case R32F:
- break;
case R32I:
- break;
case R32UI:
- break;
- case R8:
- break;
- case R8I:
- break;
- case R8UI:
- break;
+ case CompressedRed:
+ return GL2ES2.GL_RED;
+ case RG8:
case RG16:
- break;
case RG16F:
- break;
+ case RG32F:
+ case RG8I:
+ case RG8UI:
case RG16I:
- break;
case RG16UI:
- break;
- case RG32F:
- break;
case RG32I:
- break;
case RG32UI:
- break;
- case RG8:
- break;
- case RG8I:
- break;
- case RG8UI:
- break;
+ case CompressedRG:
+ return GL2ES2.GL_RG;
default:
- break;
+ break;
}
throw new IllegalArgumentException("Incorrect format set: " + format);
}
diff --git a/trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/LwjglShaderObjectsStateUtil.java b/trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/LwjglShaderObjectsStateUtil.java
index 5917637..1440cd1 100644
--- a/trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/LwjglShaderObjectsStateUtil.java
+++ b/trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/LwjglShaderObjectsStateUtil.java
@@ -17,6 +17,7 @@ import java.util.logging.Logger;
import org.lwjgl.opengl.ARBFragmentShader;
import org.lwjgl.opengl.ARBGeometryShader4;
import org.lwjgl.opengl.ARBShaderObjects;
+import org.lwjgl.opengl.ARBTessellationShader;
import org.lwjgl.opengl.ARBVertexProgram;
import org.lwjgl.opengl.ARBVertexShader;
import org.lwjgl.opengl.GL11;
@@ -124,6 +125,61 @@ public abstract class LwjglShaderObjectsStateUtil {
}
}
+ if (caps.isTessellationShadersSupported()) {
+ if (state.getTessellationControlShader() != null) {
+ if (state._tessellationControlShaderID != -1) {
+ removeTessControlShader(state);
+ }
+
+ state._tessellationControlShaderID = ARBShaderObjects
+ .glCreateShaderObjectARB(ARBTessellationShader.GL_TESS_CONTROL_SHADER);
+
+ // Create the sources
+ ARBShaderObjects.glShaderSourceARB(state._tessellationControlShaderID,
+ state.getTessellationControlShader());
+
+ // Compile the tessellation control shader
+ final IntBuffer compiled = BufferUtils.createIntBuffer(1);
+ ARBShaderObjects.glCompileShaderARB(state._tessellationControlShaderID);
+ ARBShaderObjects.glGetObjectParameterARB(state._tessellationControlShaderID,
+ ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB, compiled);
+ checkProgramError(compiled, state._tessellationControlShaderID, state._tessellationControlShaderName);
+
+ // Attach the program
+ ARBShaderObjects.glAttachObjectARB(state._programID, state._tessellationControlShaderID);
+ } else if (state._tessellationControlShaderID != -1) {
+ removeTessControlShader(state);
+ state._tessellationControlShaderID = -1;
+ }
+
+ if (state.getTessellationEvaluationShader() != null) {
+ if (state._tessellationEvaluationShaderID != -1) {
+ removeTessEvalShader(state);
+ }
+
+ state._tessellationEvaluationShaderID = ARBShaderObjects
+ .glCreateShaderObjectARB(ARBTessellationShader.GL_TESS_CONTROL_SHADER);
+
+ // Create the sources
+ ARBShaderObjects.glShaderSourceARB(state._tessellationEvaluationShaderID,
+ state.getTessellationEvaluationShader());
+
+ // Compile the tessellation control shader
+ final IntBuffer compiled = BufferUtils.createIntBuffer(1);
+ ARBShaderObjects.glCompileShaderARB(state._tessellationEvaluationShaderID);
+ ARBShaderObjects.glGetObjectParameterARB(state._tessellationEvaluationShaderID,
+ ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB, compiled);
+ checkProgramError(compiled, state._tessellationEvaluationShaderID,
+ state._tessellationEvaluationShaderName);
+
+ // Attach the program
+ ARBShaderObjects.glAttachObjectARB(state._programID, state._tessellationEvaluationShaderID);
+ } else if (state._tessellationEvaluationShaderID != -1) {
+ removeTessEvalShader(state);
+ state._tessellationEvaluationShaderID = -1;
+ }
+ }
+
ARBShaderObjects.glLinkProgramARB(state._programID);
checkLinkError(state._programID);
state.setNeedsRefresh(true);
@@ -179,6 +235,22 @@ public abstract class LwjglShaderObjectsStateUtil {
}
}
+ /** Removes the tessellation control shader */
+ private static void removeTessControlShader(final GLSLShaderObjectsState state) {
+ if (state._tessellationControlShaderID != -1) {
+ ARBShaderObjects.glDetachObjectARB(state._programID, state._tessellationControlShaderID);
+ ARBShaderObjects.glDeleteObjectARB(state._tessellationControlShaderID);
+ }
+ }
+
+ /** Removes the tessellation evaluation shader */
+ private static void removeTessEvalShader(final GLSLShaderObjectsState state) {
+ if (state._tessellationEvaluationShaderID != -1) {
+ ARBShaderObjects.glDetachObjectARB(state._programID, state._tessellationEvaluationShaderID);
+ ARBShaderObjects.glDeleteObjectARB(state._tessellationEvaluationShaderID);
+ }
+ }
+
/**
* Check for program errors. If an error is detected, program exits.
*
diff --git a/trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/util/LwjglTextureUtil.java b/trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/util/LwjglTextureUtil.java
index 9a08026..1380fe5 100644
--- a/trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/util/LwjglTextureUtil.java
+++ b/trunk/ardor3d-lwjgl/src/main/java/com/ardor3d/scene/state/lwjgl/util/LwjglTextureUtil.java
@@ -211,6 +211,8 @@ public abstract class LwjglTextureUtil {
return ARBTextureRg.GL_RG32I;
case RG32UI:
return ARBTextureRg.GL_RG32UI;
+ default:
+ break;
}
throw new IllegalArgumentException("Incorrect format set: " + format);
}
@@ -294,6 +296,8 @@ public abstract class LwjglTextureUtil {
return GL11.GL_COLOR_INDEX;
case StencilIndex:
return GL11.GL_STENCIL_INDEX;
+ default:
+ break;
}
throw new IllegalArgumentException("Incorrect format set: " + format);
}
@@ -390,6 +394,8 @@ public abstract class LwjglTextureUtil {
case RG32UI:
case CompressedRG:
return ARBTextureRg.GL_RG;
+ default:
+ break;
}
throw new IllegalArgumentException("Incorrect format set: " + format);
}
diff --git a/trunk/pom.xml b/trunk/pom.xml
index 44e8162..f33c806 100644
--- a/trunk/pom.xml
+++ b/trunk/pom.xml
@@ -123,6 +123,7 @@
<!-- these properties help simplify specifying some commonly occurring variables -->
<properties>
<lwjgl.version>2.8.4</lwjgl.version>
+ <jogl.version>2.0-rc11</jogl.version>
<jdom.version>ardor3d-1.1.1</jdom.version>
<swt.version>3650</swt.version>
<osgi.project.version>0.9_SNAPSHOT</osgi.project.version>
@@ -150,22 +151,17 @@
<version>2.4</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>net.java.dev.jogl</groupId>
- <artifactId>jogl</artifactId>
- <version>ardor3d-1.1.2-pre-20080523</version>
- </dependency>
- <dependency>
- <groupId>net.java.dev.jogl</groupId>
- <artifactId>jogl-natives</artifactId>
- <version>ardor3d-1.1.2-pre-20080523</version>
- </dependency>
- <dependency>
- <groupId>com.projectdarkstar.ext.net.java.dev.gluegen</groupId>
- <artifactId>gluegen-rt</artifactId>
- <version>1.0b06</version>
- </dependency>
<dependency>
+ <groupId>org.jogamp.gluegen</groupId>
+ <artifactId>gluegen-rt-main</artifactId>
+ <version>${jogl.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.jogl</groupId>
+ <artifactId>jogl-all-main</artifactId>
+ <version>${jogl.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<version>${lwjgl.version}</version>