Interface ILcdGLDrawableFactory
This factory can create two types of drawables:
- Visible drawables, embedded in an AWT component or JavaFX node. For AWT applications, a TLcdGLDrawableHolder encapsulates both the ILcdGLDrawable and the Component that can be shown on screen. JavaFX drawables can be cast directly to a JavaFX Node.
- Offscreen drawables. An offscreen drawable is not displayable as such, but its contents can be retrieved as an Image.
An ILcdGLDrawable can also perform OpenGL context sharing with another drawable. This is done by passing the other drawable as an argument to the createGLDrawable() method. The two drawables will then be able to share certain OpenGL resources, such as texture objects and display lists.
Finally, ILcdGLDrawables can also be created for a specific GraphicsDevice. This is useful in multi-monitor configurations where the application wants to control on which display device the drawable is created.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newILcdGLDrawable
for an externally supplied OpenGL context.Creates a new ILcdGLCapabilities object with default parameters.default TLcdGLDrawableHolder
Creates a new ILcdGLDrawable with default capabilities.default TLcdGLDrawableHolder
createGLDrawable
(ILcdGLCapabilities aGLCapabilities) Creates a new ILcdGLDrawable with the specified capabilities.default TLcdGLDrawableHolder
createGLDrawable
(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser) Creates a new ILcdGLDrawable with the specified capabilities.default TLcdGLDrawableHolder
createGLDrawable
(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice.createGLDrawable
(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, GraphicsDevice aGraphicsDevice, ILcdGLDrawable aShareWith) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice.default TLcdGLDrawableHolder
createGLDrawable
(ILcdGLCapabilities aGLCapabilities, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice.default TLcdGLDrawableHolder
createGLDrawable
(GraphicsDevice aGraphicsDevice) Creates an ILcdGLDrawable with default capabilities for the specified GraphicsDevice.default ILcdGLOffScreenDrawable
createGLOffScreenDrawable
(int aWidth, int aHeight) Creates a new offscreen ILcdGLDrawable with the specified size and default capabilities.default ILcdGLOffScreenDrawable
createGLOffScreenDrawable
(int aWidth, int aHeight, ILcdGLCapabilities aGLCapabilities) Creates a new offscreen ILcdGLDrawable with the specified size and capabilities.default ILcdGLOffScreenDrawable
createGLOffScreenDrawable
(int aWidth, int aHeight, ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser) Creates a new offscreen ILcdGLDrawable with the specified size and capabilities.createGLOffScreenDrawable
(int aWidth, int aHeight, ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, ILcdGLDrawable aShareWith) Creates a new offscreen ILcdGLDrawable with the specified size and capabilities.default ILcdGLDrawable
Creates a newILcdGLDrawable
for use in JavaFX applications.default ILcdGLDrawable
createJavaFXDrawable
(int aWidth, int aHeight) Creates a newILcdGLDrawable
with the specified size, for use in JavaFX applications.default TLcdGLDrawableHolder
Creates a new ILcdGLDrawable with default capabilities.default TLcdGLDrawableHolder
createLightweightGLDrawable
(ILcdGLCapabilities aGLCapabilities) Creates a new ILcdGLDrawable with the specified capabilities.default TLcdGLDrawableHolder
createLightweightGLDrawable
(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser) Creates a new ILcdGLDrawable with the specified capabilities.default TLcdGLDrawableHolder
createLightweightGLDrawable
(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice.createLightweightGLDrawable
(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, GraphicsDevice aGraphicsDevice, ILcdGLDrawable aShareWith) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice.default TLcdGLDrawableHolder
createLightweightGLDrawable
(ILcdGLCapabilities aGLCapabilities, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice.default TLcdGLDrawableHolder
createLightweightGLDrawable
(GraphicsDevice aGraphicsDevice) Creates an ILcdGLDrawable with default capabilities for the specified GraphicsDevice.default boolean
Indicates whether this OpenGL binding can support GL context sharing.
-
Method Details
-
createGLCapabilities
ILcdGLCapabilities createGLCapabilities()Creates a new ILcdGLCapabilities object with default parameters. This object can be modified according to the application's requirements and then be used to create an ILcdGLDrawable.- Returns:
- an ILcdGLCapabilities
-
createGLDrawable
Creates a new ILcdGLDrawable with default capabilities.- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createGLDrawable
Creates a new ILcdGLDrawable with the specified capabilities.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilities- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createGLDrawable
Creates an ILcdGLDrawable with default capabilities for the specified GraphicsDevice. This method can be used in multi-monitor environments to create a drawable for a specific display device.- Parameters:
aGraphicsDevice
- a GraphicsDevice- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createGLDrawable
default TLcdGLDrawableHolder createGLDrawable(ILcdGLCapabilities aGLCapabilities, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice. This method can be used in multi-monitor environments to create a drawable for a specific display device.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilitiesaGraphicsDevice
- a GraphicsDevice- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createGLDrawable
default TLcdGLDrawableHolder createGLDrawable(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser) Creates a new ILcdGLDrawable with the specified capabilities. The supplied ILcdGLCapabilitiesChooser will be used to choose an ILcdGLCapabilities from the list of capabilities supported by the underlying graphics hardware.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilitiesaGLCapabilitiesChooser
- an ILcdGLCapabilitiesChooser- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createGLDrawable
default TLcdGLDrawableHolder createGLDrawable(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice. This method can be used in multi-monitor environments to create a drawable for a specific display device. The supplied ILcdGLCapabilitiesChooser will be used to choose an ILcdGLCapabilities from the list of capabilities supported by the underlying graphics hardware.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilitiesaGLCapabilitiesChooser
- an ILcdGLCapabilitiesChooseraGraphicsDevice
- a GraphicsDevice- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createGLDrawable
TLcdGLDrawableHolder createGLDrawable(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, GraphicsDevice aGraphicsDevice, ILcdGLDrawable aShareWith) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice. This method can be used in multi-monitor environments to create a drawable for a specific display device. The supplied ILcdGLCapabilitiesChooser will be used to choose an ILcdGLCapabilities from the list of capabilities supported by the underlying graphics hardware. Additionally, an existing ILcdGLDrawable can be supplied with which the new drawable should perform context sharing. Context sharing enables the use of OpenGL resources such as texture objects across multiple drawables.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilitiesaGLCapabilitiesChooser
- an ILcdGLCapabilitiesChooseraGraphicsDevice
- a GraphicsDeviceaShareWith
- an existing ILcdGLDrawable to do context sharing with- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createLightweightGLDrawable
Creates a new ILcdGLDrawable with default capabilities.- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createLightweightGLDrawable
Creates a new ILcdGLDrawable with the specified capabilities.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilities- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createLightweightGLDrawable
default TLcdGLDrawableHolder createLightweightGLDrawable(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser) Creates a new ILcdGLDrawable with the specified capabilities. The supplied ILcdGLCapabilitiesChooser will be used to choose an ILcdGLCapabilities from the list of capabilities supported by the underlying graphics hardware.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilitiesaGLCapabilitiesChooser
- an ILcdGLCapabilitiesChooser- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createLightweightGLDrawable
Creates an ILcdGLDrawable with default capabilities for the specified GraphicsDevice. This method can be used in multi-monitor environments to create a drawable for a specific display device.- Parameters:
aGraphicsDevice
- a GraphicsDevice- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createLightweightGLDrawable
default TLcdGLDrawableHolder createLightweightGLDrawable(ILcdGLCapabilities aGLCapabilities, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice. This method can be used in multi-monitor environments to create a drawable for a specific display device.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilitiesaGraphicsDevice
- a GraphicsDevice- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createLightweightGLDrawable
default TLcdGLDrawableHolder createLightweightGLDrawable(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice. This method can be used in multi-monitor environments to create a drawable for a specific display device. The supplied ILcdGLCapabilitiesChooser will be used to choose an ILcdGLCapabilities from the list of capabilities supported by the underlying graphics hardware.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilitiesaGLCapabilitiesChooser
- an ILcdGLCapabilitiesChooseraGraphicsDevice
- a GraphicsDevice- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createLightweightGLDrawable
TLcdGLDrawableHolder createLightweightGLDrawable(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, GraphicsDevice aGraphicsDevice, ILcdGLDrawable aShareWith) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice. This method can be used in multi-monitor environments to create a drawable for a specific display device. The supplied ILcdGLCapabilitiesChooser will be used to choose an ILcdGLCapabilities from the list of capabilities supported by the underlying graphics hardware. Additionally, an existing ILcdGLDrawable can be supplied with which the new drawable should perform context sharing. Context sharing enables the use of OpenGL resources such as texture objects across multiple drawables.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aGLCapabilities
- an ILcdGLCapabilitiesaGLCapabilitiesChooser
- an ILcdGLCapabilitiesChooseraGraphicsDevice
- a GraphicsDeviceaShareWith
- an existing ILcdGLDrawable to do context sharing with- Returns:
- a TLcdGLDrawableHolder containing the new ILcdGLDrawable
-
createGLOffScreenDrawable
Creates a new offscreen ILcdGLDrawable with the specified size and default capabilities.- Parameters:
aWidth
- the initial width of the drawable (in pixels)aHeight
- the initial height of the drawable (in pixels)- Returns:
- an ILcdGLOffScreenDrawable
-
createGLOffScreenDrawable
default ILcdGLOffScreenDrawable createGLOffScreenDrawable(int aWidth, int aHeight, ILcdGLCapabilities aGLCapabilities) Creates a new offscreen ILcdGLDrawable with the specified size and capabilities.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aWidth
- the initial width of the drawable (in pixels)aHeight
- the initial height of the drawable (in pixels)aGLCapabilities
- an ILcdGLCapabilities- Returns:
- an ILcdGLOffScreenDrawable
-
createGLOffScreenDrawable
default ILcdGLOffScreenDrawable createGLOffScreenDrawable(int aWidth, int aHeight, ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser) Creates a new offscreen ILcdGLDrawable with the specified size and capabilities. The supplied ILcdGLCapabilitiesChooser will be used to choose an ILcdGLCapabilities from the list of capabilities supported by the underlying graphics hardware.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aWidth
- the initial width of the drawable (in pixels)aHeight
- the initial height of the drawable (in pixels)aGLCapabilities
- an ILcdGLCapabilitiesaGLCapabilitiesChooser
- an ILcdGLCapabilitiesChooser- Returns:
- an ILcdGLOffScreenDrawable
-
createGLOffScreenDrawable
ILcdGLOffScreenDrawable createGLOffScreenDrawable(int aWidth, int aHeight, ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser, ILcdGLDrawable aShareWith) Creates a new offscreen ILcdGLDrawable with the specified size and capabilities. The supplied ILcdGLCapabilitiesChooser will be used to choose an ILcdGLCapabilities from the list of capabilities supported by the underlying graphics hardware. Additionally, an existing ILcdGLDrawable can be supplied with which the new drawable should perform context sharing. Context sharing enables the use of OpenGL resources such as texture objects across multiple drawables.Note that the values in ILcdGLCapabilities are considered to be hints: there is no guarantee that the requested color depths, framebuffer layouts or other settings will effectively be available when the drawable is created.
- Parameters:
aWidth
- the initial width of the drawable (in pixels)aHeight
- the initial height of the drawable (in pixels)aGLCapabilities
- an ILcdGLCapabilitiesaGLCapabilitiesChooser
- an ILcdGLCapabilitiesChooseraShareWith
- an existing ILcdGLDrawable to do context sharing with- Returns:
- an ILcdGLOffScreenDrawable
-
createExternalGLDrawable
ILcdGLExternalDrawable createExternalGLDrawable()Creates a newILcdGLDrawable
for an externally supplied OpenGL context. SeeILcdGLExternalDrawable
for more information.- Returns:
- a drawable for the current (pre-existing) OpenGL context
-
isContextSharingSupported
default boolean isContextSharingSupported()Indicates whether this OpenGL binding can support GL context sharing.- Returns:
- true if this OpenGL binding supports GL context sharing
- Since:
- 2018.1
-
createJavaFXDrawable
Creates a newILcdGLDrawable
for use in JavaFX applications.- Returns:
- a new
ILcdGLDrawable
that can be cast to a JavaFX Node. - Since:
- 2020.0
-
createJavaFXDrawable
Creates a newILcdGLDrawable
with the specified size, for use in JavaFX applications.- Returns:
- a new
ILcdGLDrawable
that can be cast to a JavaFX Node. - Since:
- 2020.0
-