summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java11
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java14
7 files changed, 17 insertions, 18 deletions
diff --git a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java
index 1fc736ee7..7c99e2cf3 100644
--- a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java
+++ b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java
@@ -180,7 +180,7 @@ public class MovieSimpleActivity1 extends NewtBaseActivity {
windowBounds.setWidth( wh[0] );
windowBounds.setHeight( wh[1] );
}
- glWindowHUD.setSharedContext(glWindowMain.getContext());
+ glWindowHUD.setSharedAutoDrawable(glWindowMain);
demoHUD = new MovieSimple(mPlayerShared);
mPlayerSub = mPlayerShared;
} else {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
index 0469092fb..6f8d6c626 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
@@ -92,7 +92,7 @@ public class TestSharedContextListNEWT extends UITestCase {
Assert.assertNotNull(glWindow);
glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared "+useShared);
if(useShared) {
- glWindow.setSharedContext(sharedDrawable.getContext());
+ glWindow.setSharedAutoDrawable(sharedDrawable);
}
glWindow.setSize(width, height);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java
index a11ddcdb0..16467771d 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java
@@ -93,7 +93,7 @@ public class TestSharedContextListNEWT2 extends UITestCase {
Assert.assertNotNull(glWindow);
glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared "+useShared);
if(useShared) {
- glWindow.setSharedContext(sharedDrawable.getContext());
+ glWindow.setSharedAutoDrawable(sharedDrawable);
}
glWindow.setSize(width, height);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java
index a9e7c0cc1..8f84e293d 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java
@@ -120,7 +120,7 @@ public class TestSharedContextVBOES1NEWT extends UITestCase {
glWindow.setPosition(x, y);
glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared "+useShared);
if(useShared) {
- glWindow.setSharedContext(sharedDrawable.getContext());
+ glWindow.setSharedAutoDrawable(sharedDrawable);
}
glWindow.setSize(width, height);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java
index 3efbabb20..d2d1384e4 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java
@@ -33,6 +33,7 @@ import java.util.List;
import com.jogamp.newt.opengl.GLWindow;
import javax.media.nativewindow.util.InsetsImmutable;
+import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLProfile;
@@ -76,14 +77,14 @@ public class TestSharedContextVBOES2NEWT0 extends UITestCase {
}
}
- protected GLWindow runTestGL(final Animator animator, final int x, final int y, final GearsES2 gears, final GLContext sharedContext) throws InterruptedException {
- final boolean useShared = null != sharedContext;
+ protected GLWindow runTestGL(final Animator animator, final int x, final int y, final GearsES2 gears, final GLAutoDrawable sharedDrawable) throws InterruptedException {
+ final boolean useShared = null != sharedDrawable;
final GLWindow glWindow = GLWindow.create(caps);
Assert.assertNotNull(glWindow);
glWindow.setPosition(x, y);
glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared "+useShared);
if(useShared) {
- glWindow.setSharedContext(sharedContext);
+ glWindow.setSharedAutoDrawable(sharedDrawable);
}
glWindow.setSize(width, height);
glWindow.addGLEventListener(gears);
@@ -130,7 +131,7 @@ public class TestSharedContextVBOES2NEWT0 extends UITestCase {
final GearsES2 g2 = new GearsES2(0);
g2.setSharedGearsObjects(g1.getGear1(), g1.getGear2(), g1.getGear3());
final GLWindow f2 = runTestGL(animator, f1.getX()+width+insets.getTotalWidth(),
- f1.getY()+0, g2, f1.getContext());
+ f1.getY()+0, g2, f1);
final GLContext ctx2 = f2.getContext();
Assert.assertTrue("Ctx1 is not shared", ctx1.isShared());
Assert.assertTrue("Ctx2 is not shared", ctx2.isShared());
@@ -153,7 +154,7 @@ public class TestSharedContextVBOES2NEWT0 extends UITestCase {
final GearsES2 g3 = new GearsES2(0);
g3.setSharedGearsObjects(g1.getGear1(), g1.getGear2(), g1.getGear3());
final GLWindow f3 = runTestGL(animator, f1.getX()+0,
- f1.getY()+height+insets.getTotalHeight(), g3, f1.getContext());
+ f1.getY()+height+insets.getTotalHeight(), g3, f1);
final GLContext ctx3 = f3.getContext();
Assert.assertTrue("Ctx1 is not shared", ctx1.isShared());
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java
index 3a61f169e..fb15509d0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java
@@ -135,7 +135,7 @@ public class TestSharedContextVBOES2NEWT1 extends UITestCase {
glWindow.setPosition(x, y);
glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared "+useShared);
if(useShared) {
- glWindow.setSharedContext(sharedDrawable.getContext());
+ glWindow.setSharedAutoDrawable(sharedDrawable);
}
glWindow.setSize(width, height);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java
index 1921dca60..a101c05d0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java
@@ -128,12 +128,11 @@ public class TestSharedContextVBOES2NEWT2 extends UITestCase {
f1.invoke(false, new GLRunnable() {
@Override
public boolean run(final GLAutoDrawable drawable) {
- final GLContext ctx1 = f1.getContext();
- Assert.assertTrue("Ctx is shared before shared creation", !ctx1.isShared());
- f2.setSharedContext(ctx1);
+ Assert.assertTrue("Ctx is shared before shared creation", !f1.getContext().isShared());
+ f2.setSharedAutoDrawable(f1);
f2.setVisible(true);
f2.display(); // kick off GLContext ..
- f3.setSharedContext(ctx1);
+ f3.setSharedAutoDrawable(f1);
f3.setVisible(true);
f3.display(); // kick off GLContext ..
return true;
@@ -253,11 +252,10 @@ public class TestSharedContextVBOES2NEWT2 extends UITestCase {
f1.invoke(false, new GLRunnable() {
@Override
public boolean run(final GLAutoDrawable drawable) {
- final GLContext ctx1 = f1.getContext();
- Assert.assertTrue("Ctx is shared before shared creation", !ctx1.isShared());
- f2.setSharedContext(ctx1);
+ Assert.assertTrue("Ctx is shared before shared creation", !f1.getContext().isShared());
+ f2.setSharedAutoDrawable(f1);
f2.setVisible(true);
- f3.setSharedContext(ctx1);
+ f3.setSharedAutoDrawable(f1);
f3.setVisible(true);
return true;
}