@Override public Object clone() { try { return super.clone(); } catch (final RuntimeException e) { throw new NativeWindowException(e); } }
@Override public final long getDisplayHandle() { return config.getNativeGraphicsConfiguration().getScreen().getDevice().getHandle(); }
@Override public void destroyNotify() { if(upstreamSurfaceHookLifecycleEnabled) { upstream.destroy(this); if( containsUpstreamOptionBits( ProxySurface.OPT_PROXY_OWNS_UPSTREAM_DEVICE ) ) { final AbstractGraphicsDevice aDevice = getGraphicsConfiguration().getScreen().getDevice(); aDevice.close(); clearUpstreamOptionBits( ProxySurface.OPT_PROXY_OWNS_UPSTREAM_DEVICE ); } invalidateImpl(); } this.surfaceHandle_old = 0; }
@Override public final GLCapabilitiesImmutable getChosenGLCapabilities() { return (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getChosenCapabilities(); }
static void unregisterFactory() { final String nwType = NativeWindowFactory.getNativeWindowType(false); if(NativeWindowFactory.TYPE_X11 == nwType) { GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, GLCapabilitiesImmutable.class, nativeGraphicsConfigurationFactory); } /* else if(NativeWindowFactory.TYPE_WINDOWS == NativeWindowFactory.getNativeWindowType(false)) { GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.windows.WindowsGraphicsDevice.class, nativeGraphicsConfigurationFactory); } else if(NativeWindowFactory.TYPE_MACOSX == NativeWindowFactory.getNativeWindowType(false)) { } */ nativeGraphicsConfigurationFactory = null; fallbackGraphicsConfigurationFactory = null; GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.egl.EGLGraphicsDevice.class, GLCapabilitiesImmutable.class, kdeglGraphicsConfigurationFactory); kdeglGraphicsConfigurationFactory = null; }
/** * {@link NativeSurface#unlockSurface() Unlocks} the underlying windowing toolkit {@link NativeSurface surface}, * which may render the {@link #getHandle() drawable handle} invalid. * * @see NativeSurface#unlockSurface() * @see #getHandle() */ public final void unlockSurface() { surface.unlockSurface(); }
protected GLDrawableImpl(final GLDrawableFactory factory, final NativeSurface comp, final boolean realized) { this(factory, comp, (GLCapabilitiesImmutable) comp.getGraphicsConfiguration().getRequestedCapabilities(), realized); }
@Override public final void create(final ProxySurface s) { if(null != upstream) { upstream.create(s); } }
@Override public boolean close() { toolkitLock.dispose(); if(0 != handle) { handle = 0; return true; } return false; }
/** Constructs a new X11GraphicsDevice corresponding to the given native display handle and default * {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#getDefaultToolkitLock(String, long)}. * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long) */ public X11GraphicsDevice(final long display, final int unitID, final boolean owner) { this(display, unitID, NativeWindowFactory.getDefaultToolkitLock(NativeWindowFactory.TYPE_X11, display), owner); }
@Override public Object clone() { return super.clone(); } }
@Override protected void invalidateImpl() { if(0 != surfaceHandle) { throw new NativeWindowException("didn't release surface Handle: "+this); } windowHandle = 0; // surfaceHandle = 0; }
@Override public int compare(final VisualIDHolder vid1, final VisualIDHolder vid2) { final int id1 = vid1.getVisualID(type); final int id2 = vid2.getVisualID(type); if(id1 > id2) { return 1; } else if(id1 < id2) { return -1; } return 0; } }
@Override public Object clone() { return super.clone(); } }
@Override public final long getDisplayHandle() { return config.getNativeGraphicsConfiguration().getScreen().getDevice().getHandle(); }
@Override public final void create(final ProxySurface s) { if(null != upstream) { upstream.create(s); } }