summaryrefslogtreecommitdiffstats
path: root/src/jogl/junit/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-26 15:12:51 +0100
committerSven Gothel <[email protected]>2010-03-26 15:12:51 +0100
commit138a5b057e39a4738a2e82f370424a9a21aceea9 (patch)
treee928b54a74810d968f4ca70f724ede32759f73b9 /src/jogl/junit/com/jogamp/opengl
parentffd4f4b39f0600a0432728ab00d20c9127200196 (diff)
http://www.jogamp.org/bugzilla/show_bug.cgi?id=378
Changed solution with a necessary API change of TextureData etc. Adding required GLProfile element to the factories etc, so it is clear for which GLProfile data is being created without the need of a current GLContext. TextureData/AWTTextureData: Removed the glPostInit* effort .. IMPACT: Texture util's API change - minor user code change necessary. +++
Diffstat (limited to 'src/jogl/junit/com/jogamp/opengl')
-rwxr-xr-xsrc/jogl/junit/com/jogamp/opengl/test/junit/texture/awt/Texture1.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jogl/junit/com/jogamp/opengl/test/junit/texture/awt/Texture1.java b/src/jogl/junit/com/jogamp/opengl/test/junit/texture/awt/Texture1.java
index 3157388e9..9772d1a99 100755
--- a/src/jogl/junit/com/jogamp/opengl/test/junit/texture/awt/Texture1.java
+++ b/src/jogl/junit/com/jogamp/opengl/test/junit/texture/awt/Texture1.java
@@ -34,6 +34,8 @@ package com.jogamp.opengl.test.junit.texture.awt;
import com.jogamp.opengl.test.junit.texture.util.gl2.TextureGL2ListenerDraw1;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -92,12 +94,13 @@ public class Texture1 {
@Test
public void test1() {
- GLCanvas glCanvas = new GLCanvas();
+ GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2GL3));
+ GLCanvas glCanvas = new GLCanvas(caps);
frame.add(glCanvas);
frame.setSize(512, 512);
// create texture
- TextureData textureData = AWTTextureIO.newTextureData(textureImage, false);
+ TextureData textureData = AWTTextureIO.newTextureData(caps.getGLProfile(), textureImage, false);
glCanvas.addGLEventListener(new TextureGL2ListenerDraw1(textureData));
Animator animator = new Animator(glCanvas);