summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-09-16 13:27:06 +0200
committerSven Gothel <[email protected]>2012-09-16 13:27:06 +0200
commite30c2c7d06847889d961d12b50e77e4dfd6e525f (patch)
treee0d280af948f52088e2b072bacf3b6b6469cf456 /src/test/com/jogamp/opengl
parent33896a42dcec55d52030fae33e64fa966c67f91d (diff)
OSX: Capture 'invalid drawable' message cause by NSOpenGLContext::setView(NULL || incomplete-view) ; Add missing [ctx release] in MyNSOpenGLLayer ; Misc
NSOpenGLContext::setView(NULL || incomplete-view) was called on 2 occasions: [1] - MacOSXCGLContext native createContext [2] - NSOpenGLLayer internals For [1], we simply don't call setView(..) ourselfs in case view is NULL or incomplete (invisible) For [2], we need to wrap the class 'MyNSOpenGLContext:NSOpenGLContext' and capture setView(NULL) ++ Add missing [ctx release] in MyNSOpenGLLayer, otherwise resource won't get dealloc'ed +++ Misc: - MacOSXCGLContext. contextRealized(true): set pbuffer -> ctx, otherwise 1st makeCurrent call will not catch it - MacOSXOnscreenCGLContext: don't add ContextUpdater to invisible ProxySurface's (dummy window)
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java12
2 files changed, 24 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java
index d181800c5..3c9afbd2f 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java
@@ -33,7 +33,9 @@ import java.awt.Button;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Frame;
+import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import javax.media.opengl.GLAnimatorControl;
@@ -203,6 +205,7 @@ public class TestOffscreenLayer01GLCanvasAWT extends UITestCase {
}
public static void main(String args[]) throws IOException {
+ boolean waitForKey = false;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
durationPerTest = atoi(args[++i]);
@@ -215,8 +218,17 @@ public class TestOffscreenLayer01GLCanvasAWT extends UITestCase {
useMSAA = true;
} else if(args[i].equals("-still")) {
noAnimation = true;
+ } else if(args[i].equals("-wait")) {
+ waitForKey = true;
}
}
+ if(waitForKey) {
+ BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+ System.err.println("Press enter to continue");
+ try {
+ System.err.println(stdin.readLine());
+ } catch (IOException e) { }
+ }
String tstname = TestOffscreenLayer01GLCanvasAWT.class.getName();
/*
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java
index c2185d6c3..ef7541d3f 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java
@@ -33,7 +33,9 @@ import java.awt.Button;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Frame;
+import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import javax.media.opengl.GLAnimatorControl;
@@ -200,6 +202,7 @@ public class TestOffscreenLayer02NewtCanvasAWT extends UITestCase {
}
public static void main(String args[]) throws IOException {
+ boolean waitForKey = false;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
durationPerTest = atoi(args[++i]);
@@ -212,8 +215,17 @@ public class TestOffscreenLayer02NewtCanvasAWT extends UITestCase {
useMSAA = true;
} else if(args[i].equals("-still")) {
noAnimation = true;
+ } else if(args[i].equals("-wait")) {
+ waitForKey = true;
}
}
+ if(waitForKey) {
+ BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+ System.err.println("Press enter to continue");
+ try {
+ System.err.println(stdin.readLine());
+ } catch (IOException e) { }
+ }
String tstname = TestOffscreenLayer02NewtCanvasAWT.class.getName();
/*
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {