From 138a5b057e39a4738a2e82f370424a9a21aceea9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 26 Mar 2010 15:12:51 +0100 Subject: 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. +++ --- .../junit/com/jogamp/opengl/test/junit/texture/awt/Texture1.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/jogl/junit/com/jogamp/opengl/test') 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); -- cgit v1.2.3