com.jogamp.opengl.impl.windows.wgl
Class WindowsWGLDrawableFactory
java.lang.Object
javax.media.opengl.GLDrawableFactory
com.jogamp.opengl.impl.GLDrawableFactoryImpl
com.jogamp.opengl.impl.windows.wgl.WindowsWGLDrawableFactory
public class WindowsWGLDrawableFactory
- extends GLDrawableFactoryImpl
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 |
createOffscreenDrawableImpl(NativeSurface target)
|
protected NativeSurface |
createOffscreenSurfaceImpl(AbstractGraphicsDevice device,
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)
|
protected void |
enterThreadCriticalZone()
|
protected List |
getAvailableCapabilitiesImpl(AbstractGraphicsDevice device)
|
AbstractGraphicsDevice |
getDefaultDevice()
Retrieve the default device connection ,
unit ID and unique ID name . |
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 |
boolean |
getIsDeviceCompatible(AbstractGraphicsDevice device)
|
protected GLContext |
getOrCreateSharedContextImpl(AbstractGraphicsDevice device)
|
protected AbstractGraphicsDevice |
getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device)
|
protected WindowsWGLDrawable |
getOrCreateSharedDrawable(AbstractGraphicsDevice device)
|
protected GLContext |
getSharedContextImpl(AbstractGraphicsDevice device)
|
protected boolean |
hasSharedContextImpl(AbstractGraphicsDevice device)
|
int |
isReadDrawableAvailable(AbstractGraphicsDevice device)
|
protected void |
leaveThreadCriticalZone()
|
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, createOffscreenDrawable, createOffscreenSurface, getFactoryImpl, getOrCreateSharedDevice, maybeDoSingleThreadedWorkaround, resetDisplayGamma, setDisplayGamma |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WindowsWGLDrawableFactory
public WindowsWGLDrawableFactory()
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.
enterThreadCriticalZone
protected void enterThreadCriticalZone()
- Overrides:
enterThreadCriticalZone
in class GLDrawableFactory
leaveThreadCriticalZone
protected void leaveThreadCriticalZone()
- Overrides:
leaveThreadCriticalZone
in class GLDrawableFactory
getDefaultDevice
public final AbstractGraphicsDevice getDefaultDevice()
- Description copied from class:
GLDrawableFactory
- Retrieve the default
device
connection
,
unit ID
and unique ID name
. for this factory
The implementation must return a non null
default device, which must not be opened, ie. it's native handle is 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
- Parameters:
device
- which connection
denotes the shared the target device, may be null
for the platform's default device.
- Returns:
- true if the device is compatible with this factory, ie. if it can be used for creation. Otherwise false.
getSharedContextImpl
protected final GLContext getSharedContextImpl(AbstractGraphicsDevice device)
hasSharedContextImpl
protected final boolean hasSharedContextImpl(AbstractGraphicsDevice device)
getOrCreateSharedContextImpl
protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device)
- Specified by:
getOrCreateSharedContextImpl
in class GLDrawableFactory
getOrCreateSharedDeviceImpl
protected AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device)
- Specified by:
getOrCreateSharedDeviceImpl
in class GLDrawableFactoryImpl
getOrCreateSharedDrawable
protected WindowsWGLDrawable getOrCreateSharedDrawable(AbstractGraphicsDevice device)
shutdownInstance
protected final void shutdownInstance()
- Specified by:
shutdownInstance
in class GLDrawableFactory
getAvailableCapabilitiesImpl
protected List getAvailableCapabilitiesImpl(AbstractGraphicsDevice device)
- Specified by:
getAvailableCapabilitiesImpl
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
isReadDrawableAvailable
public final int isReadDrawableAvailable(AbstractGraphicsDevice device)
- Returns:
- 1 if read drawable extension is available, 0 if not
and -1 if undefined yet, ie no shared device exist at this point.
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
- Parameters:
device
- which connection
denotes the shared the target device, may be null
for the platform's default device.
createOffscreenSurfaceImpl
protected final NativeSurface createOffscreenSurfaceImpl(AbstractGraphicsDevice device,
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
- Parameters:
device
- which connection
denotes the shared the target device, may be null
for the platform's default device.
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.