From bba73bc096250a3c7fc036d84b1ea054d1b70b06 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 23 Jun 2019 08:03:04 +0200 Subject: 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. --- make/config/jogl/eagl-ios.cfg | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 make/config/jogl/eagl-ios.cfg (limited to 'make/config/jogl/eagl-ios.cfg') diff --git a/make/config/jogl/eagl-ios.cfg b/make/config/jogl/eagl-ios.cfg new file mode 100644 index 000000000..2714cb6a3 --- /dev/null +++ b/make/config/jogl/eagl-ios.cfg @@ -0,0 +1,43 @@ +# This .cfg file is used to generate the interface to the CGL routines +# used internally by the MacOSXGLContext implementation. +JavaOutputDir gensrc/classes +NativeOutputDir gensrc/native/jogl/iOS + +# For easier debugging of GLSemHeader, i.e. less debug output +#DropAllGLDocHeader true + +Package jogamp.opengl.ios.eagl +JavaClass EAGL +Style AllStatic +Include gl-common.cfg +Include gl-common-extensions.cfg +Include gl-desktop.cfg + +# Only NIO direct function, no arrays .. +NIOOnly __ALL__ +NIODirectOnly __ALL__ + +GLSemHeader OpenGLES/EAGL.h + +Opaque long void * + +# Opaque directives for low-level CGL binding (for Java2D/JOGL bridge) +Opaque long EAGLContext * +Opaque long EAGLSharegroup * +Opaque long EAGLDrawable * + +Opaque long CALayer * +Opaque long CAEAGLLayer * +Opaque long UIView * + +CustomCCode #include +CustomCCode #include "ios-window-system.h" + +#IncludeAs CustomJavaCode EAGL eagl-ios-CustomJavaCode.java + +# Implement the first argument to getProcAddress as String instead +# of byte[] +ArgumentIsString getProcAddress 0 + +Import com.jogamp.common.util.Function +Import jogamp.nativewindow.ios.IOSUtil -- cgit v1.2.3