com.jogamp.opengl.impl.x11.glx
Class X11GLXDrawableFactory

java.lang.Object
  extended by javax.media.opengl.GLDrawableFactory
      extended by com.jogamp.opengl.impl.GLDrawableFactoryImpl
          extended by com.jogamp.opengl.impl.x11.glx.X11GLXDrawableFactory

public class X11GLXDrawableFactory
extends GLDrawableFactoryImpl


Field Summary
 
Fields inherited from class com.jogamp.opengl.impl.GLDrawableFactoryImpl
DEBUG
 
Fields inherited from class javax.media.opengl.GLDrawableFactory
glDrawableFactories
 
Constructor Summary
X11GLXDrawableFactory()
           
 
Method Summary
 boolean canCreateContextOnJava2DSurface(AbstractGraphicsDevice device)
           
 boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device)
          Returns true if it is possible to create an external GLDrawable object via GLDrawableFactory.createExternalGLDrawable().
 boolean canCreateGLPbuffer(AbstractGraphicsDevice device)
          Returns true if it is possible to create a GLPbuffer.
 GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
           
protected  GLContext createExternalGLContextImpl()
           
protected  GLDrawable createExternalGLDrawableImpl()
           
protected  GLDrawableImpl createGLPbufferDrawableImpl(NativeSurface target)
          Target must implement SurfaceChangeable
protected  GLDrawableImpl createOffscreenDrawableImpl(NativeSurface target)
           
protected  NativeSurface createOffscreenSurfaceImpl(GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, int width, int height)
          creates an offscreen NativeSurface, which must implement SurfaceChangeable as well, so the windowing system related implementation is able to set the surface handle.
protected  GLDrawableImpl createOnscreenDrawableImpl(NativeSurface target)
           
 AbstractGraphicsDevice getDefaultDevice()
          Retrieve the default device AbstractGraphicsDevice.getConnection().
protected  Buffer getGammaRamp()
          Gets the current gamma ramp.
protected  int getGammaRampLength()
          Returns the length of the computed gamma ramp for this OS and hardware.
 GLDynamicLookupHelper getGLDynamicLookupHelper(int profile)
          Returns the GLDynamicLookupHelper
protected  String getGLXVendorName(AbstractGraphicsDevice device)
           
protected  VersionNumber getGLXVersion(AbstractGraphicsDevice device)
           
 boolean getIsDeviceCompatible(AbstractGraphicsDevice device)
           
protected  com.jogamp.opengl.impl.x11.glx.X11GLXDrawableFactory.SharedResource getOrCreateShared(AbstractGraphicsDevice device)
           
protected  GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device)
           
protected  long getOrCreateSharedDpy(AbstractGraphicsDevice device)
           
 boolean glXVersionGreaterEqualOneThree(AbstractGraphicsDevice device)
           
protected  boolean isGLXVendorATI(AbstractGraphicsDevice device)
           
protected  boolean isGLXVendorNVIDIA(AbstractGraphicsDevice device)
           
protected  void resetGammaRamp(Buffer originalGammaRamp)
          Resets the gamma ramp, potentially using the specified Buffer as data to restore the original values.
protected  boolean setGammaRamp(float[] ramp)
          Sets the gamma ramp for the main screen.
protected  void shutdownInstance()
           
 
Methods inherited from class com.jogamp.opengl.impl.GLDrawableFactoryImpl
createExternalGLContext, createExternalGLDrawable, createGLDrawable, createGLPbuffer, createGLPbufferDrawable, createOffscreenDrawable, getFactoryImpl, maybeDoSingleThreadedWorkaround, resetDisplayGamma, setDisplayGamma
 
Methods inherited from class javax.media.opengl.GLDrawableFactory
getFactory, getFactoryImpl, getIsSharedContextAvailable, getOrCreateSharedContext, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X11GLXDrawableFactory

public X11GLXDrawableFactory()
Method Detail

getGLDynamicLookupHelper

public GLDynamicLookupHelper getGLDynamicLookupHelper(int profile)
Description copied from class: GLDrawableFactoryImpl
Returns the GLDynamicLookupHelper

Specified by:
getGLDynamicLookupHelper in class GLDrawableFactoryImpl
Parameters:
profile - if EGL/ES, profile 1 refers to ES1 and 2 to ES2, otherwise the profile is ignored.

getDefaultDevice

public final AbstractGraphicsDevice getDefaultDevice()
Description copied from class: GLDrawableFactory
Retrieve the default device AbstractGraphicsDevice.getConnection(). for this factory
The implementation must return a non null default device, which must not be opened, ie. it's native handle may be null.

Specified by:
getDefaultDevice in class GLDrawableFactory
Returns:
the default shared device for this factory, eg. :0.0 on X11 desktop.

getIsDeviceCompatible

public final boolean getIsDeviceCompatible(AbstractGraphicsDevice device)
Specified by:
getIsDeviceCompatible in class GLDrawableFactory
Returns:
true if the device is compatible with this factory, ie. if it can be used for creation. Otherwise false.

getOrCreateShared

protected final com.jogamp.opengl.impl.x11.glx.X11GLXDrawableFactory.SharedResource getOrCreateShared(AbstractGraphicsDevice device)

getOrCreateSharedContextImpl

protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device)
Specified by:
getOrCreateSharedContextImpl in class GLDrawableFactory

getOrCreateSharedDpy

protected final long getOrCreateSharedDpy(AbstractGraphicsDevice device)

getGLXVersion

protected final VersionNumber getGLXVersion(AbstractGraphicsDevice device)

getGLXVendorName

protected final String getGLXVendorName(AbstractGraphicsDevice device)

isGLXVendorATI

protected final boolean isGLXVendorATI(AbstractGraphicsDevice device)

isGLXVendorNVIDIA

protected final boolean isGLXVendorNVIDIA(AbstractGraphicsDevice device)

shutdownInstance

protected final void shutdownInstance()
Specified by:
shutdownInstance in class GLDrawableFactory

createOnscreenDrawableImpl

protected final GLDrawableImpl createOnscreenDrawableImpl(NativeSurface target)
Specified by:
createOnscreenDrawableImpl in class GLDrawableFactoryImpl

createOffscreenDrawableImpl

protected final GLDrawableImpl createOffscreenDrawableImpl(NativeSurface target)
Specified by:
createOffscreenDrawableImpl in class GLDrawableFactoryImpl

glXVersionGreaterEqualOneThree

public final boolean glXVersionGreaterEqualOneThree(AbstractGraphicsDevice device)

canCreateGLPbuffer

public final boolean canCreateGLPbuffer(AbstractGraphicsDevice device)
Description copied from class: GLDrawableFactory
Returns true if it is possible to create a GLPbuffer. Some older graphics cards do not have this capability.

Specified by:
canCreateGLPbuffer in class GLDrawableFactoryImpl

createGLPbufferDrawableImpl

protected final GLDrawableImpl createGLPbufferDrawableImpl(NativeSurface target)
Description copied from class: GLDrawableFactoryImpl
Target must implement SurfaceChangeable

Specified by:
createGLPbufferDrawableImpl in class GLDrawableFactoryImpl

createOffscreenSurfaceImpl

protected final NativeSurface createOffscreenSurfaceImpl(GLCapabilitiesImmutable capsChosen,
                                                         GLCapabilitiesImmutable capsRequested,
                                                         GLCapabilitiesChooser chooser,
                                                         int width,
                                                         int height)
Description copied from class: GLDrawableFactoryImpl
creates an offscreen NativeSurface, which must implement SurfaceChangeable as well, so the windowing system related implementation is able to set the surface handle.

Specified by:
createOffscreenSurfaceImpl in class GLDrawableFactoryImpl

createExternalGLContextImpl

protected final GLContext createExternalGLContextImpl()
Specified by:
createExternalGLContextImpl in class GLDrawableFactoryImpl

canCreateExternalGLDrawable

public final boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device)
Description copied from class: GLDrawableFactory
Returns true if it is possible to create an external GLDrawable object via GLDrawableFactory.createExternalGLDrawable().

Specified by:
canCreateExternalGLDrawable in class GLDrawableFactory

createExternalGLDrawableImpl

protected final GLDrawable createExternalGLDrawableImpl()
Specified by:
createExternalGLDrawableImpl in class GLDrawableFactoryImpl

canCreateContextOnJava2DSurface

public final boolean canCreateContextOnJava2DSurface(AbstractGraphicsDevice device)
Specified by:
canCreateContextOnJava2DSurface in class GLDrawableFactoryImpl

createContextOnJava2DSurface

public final GLContext createContextOnJava2DSurface(Object graphics,
                                                    GLContext shareWith)
                                             throws GLException
Specified by:
createContextOnJava2DSurface in class GLDrawableFactoryImpl
Throws:
GLException

getGammaRampLength

protected final int getGammaRampLength()
Description copied from class: GLDrawableFactoryImpl
Returns the length of the computed gamma ramp for this OS and hardware. Returns 0 if gamma changes are not supported.

Overrides:
getGammaRampLength in class GLDrawableFactoryImpl

setGammaRamp

protected final boolean setGammaRamp(float[] ramp)
Description copied from class: GLDrawableFactoryImpl
Sets the gamma ramp for the main screen. Returns false if gamma ramp changes were not supported.

Overrides:
setGammaRamp in class GLDrawableFactoryImpl

getGammaRamp

protected final Buffer getGammaRamp()
Description copied from class: GLDrawableFactoryImpl
Gets the current gamma ramp. This is basically an opaque value used only on some platforms to reset the gamma ramp to its original settings.

Overrides:
getGammaRamp in class GLDrawableFactoryImpl

resetGammaRamp

protected final void resetGammaRamp(Buffer originalGammaRamp)
Description copied from class: GLDrawableFactoryImpl
Resets the gamma ramp, potentially using the specified Buffer as data to restore the original values.

Overrides:
resetGammaRamp in class GLDrawableFactoryImpl


Copyright 2010 JogAmp Community.