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 newILcdGLDrawablefor an externally supplied OpenGL context.Creates a new ILcdGLCapabilities object with default parameters.default TLcdGLDrawableHolderCreates a new ILcdGLDrawable with default capabilities.default TLcdGLDrawableHoldercreateGLDrawable(ILcdGLCapabilities aGLCapabilities) Creates a new ILcdGLDrawable with the specified capabilities.default TLcdGLDrawableHoldercreateGLDrawable(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser) Creates a new ILcdGLDrawable with the specified capabilities.default TLcdGLDrawableHoldercreateGLDrawable(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 TLcdGLDrawableHoldercreateGLDrawable(ILcdGLCapabilities aGLCapabilities, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice.default TLcdGLDrawableHoldercreateGLDrawable(GraphicsDevice aGraphicsDevice) Creates an ILcdGLDrawable with default capabilities for the specified GraphicsDevice.default ILcdGLOffScreenDrawablecreateGLOffScreenDrawable(int aWidth, int aHeight) Creates a new offscreen ILcdGLDrawable with the specified size and default capabilities.default ILcdGLOffScreenDrawablecreateGLOffScreenDrawable(int aWidth, int aHeight, ILcdGLCapabilities aGLCapabilities) Creates a new offscreen ILcdGLDrawable with the specified size and capabilities.default ILcdGLOffScreenDrawablecreateGLOffScreenDrawable(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 ILcdGLDrawableCreates a newILcdGLDrawablefor use in JavaFX applications.default ILcdGLDrawablecreateJavaFXDrawable(int aWidth, int aHeight) Creates a newILcdGLDrawablewith the specified size, for use in JavaFX applications.default TLcdGLDrawableHolderCreates a new ILcdGLDrawable with default capabilities.default TLcdGLDrawableHoldercreateLightweightGLDrawable(ILcdGLCapabilities aGLCapabilities) Creates a new ILcdGLDrawable with the specified capabilities.default TLcdGLDrawableHoldercreateLightweightGLDrawable(ILcdGLCapabilities aGLCapabilities, ILcdGLCapabilitiesChooser aGLCapabilitiesChooser) Creates a new ILcdGLDrawable with the specified capabilities.default TLcdGLDrawableHoldercreateLightweightGLDrawable(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 TLcdGLDrawableHoldercreateLightweightGLDrawable(ILcdGLCapabilities aGLCapabilities, GraphicsDevice aGraphicsDevice) Creates a new ILcdGLDrawable with the specified capabilities for the given GraphicsDevice.default TLcdGLDrawableHoldercreateLightweightGLDrawable(GraphicsDevice aGraphicsDevice) Creates an ILcdGLDrawable with default capabilities for the specified GraphicsDevice.default booleanIndicates 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 newILcdGLDrawablefor an externally supplied OpenGL context. SeeILcdGLExternalDrawablefor 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 newILcdGLDrawablefor use in JavaFX applications.- Returns:
- a new
ILcdGLDrawablethat can be cast to a JavaFX Node. - Since:
- 2020.0
-
createJavaFXDrawable
Creates a newILcdGLDrawablewith the specified size, for use in JavaFX applications.- Returns:
- a new
ILcdGLDrawablethat can be cast to a JavaFX Node. - Since:
- 2020.0
-