/** * Creates the NSOpenGLLayer for FBO/PBuffer w/ optional GL3 shader program on Main-Thread *
* It is mandatory that the shared context handle ctx
* is not locked while calling this method.
*
* The NSOpenGLLayer starts in enabled mode, * you may enable/disable it via {@link #setNSOpenGLLayerEnabled(long, boolean)}. *
*/ public static long createNSOpenGLLayer(final long ctx, final int gl3ShaderProgramName, final long fmt, final long p, final int texID, final boolean opaque, final int texWidth, final int texHeight) { return OSXUtil.RunOnMainThread(true, new Function* If disabled, the NSOpenGLLayer will not be displayed, i.e. rendered. *
*/ public static void setNSOpenGLLayerEnabled(final long nsOpenGLLayer, final boolean enable) { OSXUtil.RunOnMainThread(true, new Runnable() { public void run() { setNSOpenGLLayerEnabledImpl(nsOpenGLLayer, enable); } } ); } /** * Releases the NSOpenGLLayer on Main-Thread */ public static void releaseNSOpenGLLayer(final long nsOpenGLLayer) { OSXUtil.RunOnMainThread(true, new Runnable() { public void run() { releaseNSOpenGLLayerImpl(nsOpenGLLayer); } } ); }