aboutsummaryrefslogtreecommitdiffstats
path: root/trunk/ardor3d-jogl/src
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 /trunk/ardor3d-jogl/src
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.
Diffstat (limited to 'trunk/ardor3d-jogl/src')
-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
12 files changed, 78 insertions, 106 deletions
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);
}