aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-06-23 08:03:04 +0200
committerSven Gothel <[email protected]>2019-06-23 08:03:04 +0200
commitbba73bc096250a3c7fc036d84b1ea054d1b70b06 (patch)
treeed02575eac2a46bd49627444dcce972946ae8d2e /src/test/com/jogamp/opengl
parent154e91978498d8b6db9ce34a1f06b298bcf4c361 (diff)
iOS: Initial working commit supporting iOS (ipad pro 11)
using our OpenJFK 9 x86_64 and arm64 build. Test demo class is 'com.jogamp.opengl.demos.ios.Hello', residing in the new demo folder 'src/demos/com/jogamp/opengl/demos/ios/Hello.java'. This commit does not yet include a working NEWT specialization for iOS, but it shall followup soon. Instead this commit demonstrates JOGL operating on native UIWindow, UIView and CAEAGLLayer as provided by Nativewindow's IOSUtil. Test Video https://www.youtube.com/watch?v=Z4lUQNFTGMI +++ Notable bug: The FBO used and sharing the COLORBUFFER RENDERBUFFER memory resources with CAEAGLLayer to be displayed in the UIView seemingly cannot handle GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24 or GL_DEPTH_COMPONENT32 depth buffer - none at all (Device + Simulation). Therefor the default demo GLEventListener chosen here don't require a depth buffer ;-) This issue can hopefully be mitigated with other means than using a flat FBO sink similar to FBO multisampling.
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryES2OffscrnCapsNEWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGL2OffscrnCapsNEWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java20
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLnBitmapCapsNEWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedExternalContextAWT.java6
11 files changed, 23 insertions, 95 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java
index 4f666920a..c24254b89 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java
@@ -235,11 +235,11 @@ public class TestGLAutoDrawableDelegateOnOffscrnCapsNEWT extends UITestCase {
@Test
public void testAvailableInfo() {
- GLDrawableFactory f = GLDrawableFactory.getDesktopFactory();
+ GLDrawableFactory f = GLDrawableFactory.getFactory(false);
if(null != f) {
System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
}
- f = GLDrawableFactory.getEGLFactory();
+ f = GLDrawableFactory.getFactory(true);
if(null != f) {
System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryES2OffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryES2OffscrnCapsNEWT.java
index 7cef9e448..1ca099cb1 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryES2OffscrnCapsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryES2OffscrnCapsNEWT.java
@@ -155,18 +155,6 @@ public class TestGLAutoDrawableFactoryES2OffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testAvailableInfo() {
- GLDrawableFactory f = GLDrawableFactory.getDesktopFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- f = GLDrawableFactory.getEGLFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- }
-
- @Test
public void testES2OffScreenAutoDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGL2OffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGL2OffscrnCapsNEWT.java
index a23e81d69..26ef2b0af 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGL2OffscrnCapsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGL2OffscrnCapsNEWT.java
@@ -155,18 +155,6 @@ public class TestGLAutoDrawableFactoryGL2OffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testAvailableInfo() {
- GLDrawableFactory f = GLDrawableFactory.getDesktopFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- f = GLDrawableFactory.getEGLFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- }
-
- @Test
public void testGL2OffScreenAutoDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java
index 9934ae862..0e132526c 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java
@@ -129,21 +129,21 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase {
@Test
public void test00AvailableInfo() {
- GLDrawableFactory f = GLDrawableFactory.getDesktopFactory();
+ GLDrawableFactory f = GLDrawableFactory.getFactory(false);
if(null != f) {
System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
}
- f = GLDrawableFactory.getEGLFactory();
+ f = GLDrawableFactory.getFactory(true);
if(null != f) {
System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
}
}
@Test
- public void test01ES2OnEGL() throws InterruptedException {
- final GLDrawableFactory factory = GLDrawableFactory.getEGLFactory();
+ public void test01ES2OnMobile() throws InterruptedException {
+ final GLDrawableFactory factory = GLDrawableFactory.getFactory(true);
if( null == factory ) {
- System.err.println("EGL Factory n/a");
+ System.err.println("Mobile Factory n/a");
return;
}
final AbstractGraphicsDevice prodDevice = factory.getDefaultDevice();
@@ -163,10 +163,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase {
}
@Test
- public void test02GLOnEGL() throws InterruptedException {
- final GLDrawableFactory factory = GLDrawableFactory.getEGLFactory();
+ public void test02GLOnMobile() throws InterruptedException {
+ final GLDrawableFactory factory = GLDrawableFactory.getFactory(true);
if( null == factory ) {
- System.err.println("EGL Factory n/a");
+ System.err.println("Mobile Factory n/a");
return;
}
final AbstractGraphicsDevice prodDevice = factory.getDefaultDevice();
@@ -189,7 +189,7 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase {
@Test
public void test11ES2OnDesktop() throws InterruptedException {
- final GLDrawableFactory deskFactory = GLDrawableFactory.getDesktopFactory();
+ final GLDrawableFactory deskFactory = GLDrawableFactory.getFactory(false);
if( null == deskFactory ) {
System.err.println("Desktop Factory n/a");
return;
@@ -217,7 +217,7 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase {
@Test
public void test12GLOnDesktop() throws InterruptedException {
- final GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory();
+ final GLDrawableFactory factory = GLDrawableFactory.getFactory(false);
if( null == factory ) {
System.err.println("Desktop Factory n/a");
return;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLnBitmapCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLnBitmapCapsNEWT.java
index 6a7b09be1..efbb847db 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLnBitmapCapsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLnBitmapCapsNEWT.java
@@ -146,18 +146,6 @@ public class TestGLAutoDrawableFactoryGLnBitmapCapsNEWT extends UITestCase {
System.out.println("Fin Drawable: "+glad);
}
- @Test
- public void testAvailableInfo() {
- GLDrawableFactory f = GLDrawableFactory.getDesktopFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- f = GLDrawableFactory.getEGLFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- }
-
// Might be reduced to !double-buff
@Test
public void testGL2OffScreenBitmapDblBuf() throws InterruptedException {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java
index 6138ce6ee..f521f45ec 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java
@@ -245,18 +245,6 @@ public class TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT extends UITestCase {
}
@Test
- public void testAvailableInfo() {
- GLDrawableFactory f = GLDrawableFactory.getDesktopFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- f = GLDrawableFactory.getEGLFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- }
-
- @Test
public void testGL2OnScreenDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java
index 34148501d..d4bd227db 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java
@@ -188,18 +188,6 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testAvailableInfo() {
- GLDrawableFactory f = GLDrawableFactory.getDesktopFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- f = GLDrawableFactory.getEGLFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- }
-
- @Test
public void testGL2OnScreenSglBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java
index ce968751e..339d27a3e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java
@@ -258,18 +258,6 @@ public class TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT extends UITestCase
}
@Test
- public void testAvailableInfo() {
- GLDrawableFactory f = GLDrawableFactory.getDesktopFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- f = GLDrawableFactory.getEGLFactory();
- if(null != f) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString());
- }
- }
-
- @Test
public void testGL2OnScreenDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java
index edb681d01..987dcaf9c 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java
@@ -67,7 +67,7 @@ public class TestGLProfile00NEWT extends UITestCase {
public void test11DumpDesktopGLInfo() throws InterruptedException {
Assert.assertTrue("JOGL is not initialized ...", GLProfile.isInitialized());
System.err.println("Desktop");
- final GLDrawableFactory desktopFactory = GLDrawableFactory.getDesktopFactory();
+ final GLDrawableFactory desktopFactory = GLDrawableFactory.getFactory(false);
if( null != desktopFactory ) {
System.err.println(JoglVersion.getDefaultOpenGLInfo(desktopFactory.getDefaultDevice(), null, false));
System.err.println(Platform.getNewline()+Platform.getNewline()+Platform.getNewline());
@@ -77,12 +77,12 @@ public class TestGLProfile00NEWT extends UITestCase {
}
@Test
- public void test12DumpEGLGLInfo() throws InterruptedException {
+ public void test12DumpMobileGLInfo() throws InterruptedException {
Assert.assertTrue("JOGL is not initialized ...", GLProfile.isInitialized());
- System.err.println("EGL");
- final GLDrawableFactory eglFactory = GLDrawableFactory.getEGLFactory();
- if( null != eglFactory ) {
- System.err.println(JoglVersion.getDefaultOpenGLInfo(eglFactory.getDefaultDevice(), null, false));
+ System.err.println("ES");
+ final GLDrawableFactory esFactory = GLDrawableFactory.getFactory(true);
+ if( null != esFactory ) {
+ System.err.println(JoglVersion.getDefaultOpenGLInfo(esFactory.getDefaultDevice(), null, false));
} else {
System.err.println("\tNULL");
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
index 2921e8102..f2f35012d 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
@@ -54,11 +54,11 @@ public class TestGLProfile01NEWT extends GLProfile0XBase {
System.err.println(JoglVersion.getInstance());
System.err.println(NewtVersion.getInstance());
- final GLDrawableFactory deskFactory = GLDrawableFactory.getDesktopFactory();
+ final GLDrawableFactory deskFactory = GLDrawableFactory.getFactory(false);
if( null != deskFactory ) {
System.err.println(JoglVersion.getDefaultOpenGLInfo(deskFactory.getDefaultDevice(), null, true).toString());
}
- final GLDrawableFactory eglFactory = GLDrawableFactory.getEGLFactory();
+ final GLDrawableFactory eglFactory = GLDrawableFactory.getFactory(true);
if( null != eglFactory ) {
System.err.println(JoglVersion.getDefaultOpenGLInfo(eglFactory.getDefaultDevice(), null, true).toString());
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedExternalContextAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedExternalContextAWT.java
index 0987b2978..3c2607249 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedExternalContextAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedExternalContextAWT.java
@@ -47,7 +47,7 @@ public class TestSharedExternalContextAWT {
System.err.println("Master Thread Start: "+Thread.currentThread().getName());
final GLProfile glProfile = GLProfile.getDefault();
final GLCapabilities caps = new GLCapabilities(glProfile);
- final GLAutoDrawable buffer = GLDrawableFactory.getDesktopFactory().createOffscreenAutoDrawable(
+ final GLAutoDrawable buffer = GLDrawableFactory.getFactory(false).createOffscreenAutoDrawable(
GLProfile.getDefaultDevice(), caps, null, 512, 512
);
// The listener will set up the context sharing in its init() method.
@@ -127,7 +127,7 @@ public class TestSharedExternalContextAWT {
System.err.println(); System.err.println();
System.err.println("Master (orig) Ct: "+drawable.getContext());
// Create the external context on the caller thread.
- final GLContext master = GLDrawableFactory.getDesktopFactory().createExternalGLContext();
+ final GLContext master = GLDrawableFactory.getFactory(false).createExternalGLContext();
System.err.println(); System.err.println();
System.err.println("External Context: "+master);
@@ -137,7 +137,7 @@ public class TestSharedExternalContextAWT {
// FIXME: We actually need to hook into GLContext make-current lock
// masterLock.lock();
try {
- fOffscreenDrawable = GLDrawableFactory.getDesktopFactory().createOffscreenAutoDrawable(
+ fOffscreenDrawable = GLDrawableFactory.getFactory(false).createOffscreenAutoDrawable(
GLProfile.getDefaultDevice(),
new GLCapabilities(GLProfile.getDefault()),
null, // new DefaultGLCapabilitiesChooser(),