public interface ILcdGLDrawable
Modifier and Type | Method and Description |
---|---|
void |
addGLEventListener(ILcdGLEventListener aListener) |
void |
destroy()
Disposes of this drawable.
|
void |
display()
Causes OpenGL rendering to be performed for this drawable.
|
ILcdGLCapabilities |
getChosenGLCapabilities()
Returns the
ILcdGLCapabilities that were used to construct this
drawable. |
default double |
getDPIScale()
Returns the DPI scaling factor of this drawable.
|
ILcdGL |
getGL()
Returns the ILcdGL object associated with the drawable.
|
Properties |
getGLInformation()
Returns a properties object containing information about the underlying OpenGL implementation
that is being used.
|
ILcdGLU |
getGLU()
Returns the ILcdGLU object associated with the drawable.
|
Dimension |
getSize()
Returns the current size of the drawable.
|
Dimension |
getViewportSize()
Returns the size of the viewport (in pixels).
|
void |
invokeAndWait(ILcdGLRunnable glRunnable)
Invokes the given runnable with the drawable's OpenGL context made current.
|
void |
invokeLater(ILcdGLRunnable glRunnable)
Schedules the given runnable to be invoked when the drawable's OpenGL
context is current.
|
boolean |
isCurrent()
Returns true if this drawable's OpenGL context is current.
|
default boolean |
isRealized()
Indicates whether this drawable has effectively been initialized.
|
void |
removeGLEventListener(ILcdGLEventListener aListener) |
void |
setGL(ILcdGL aGL)
Sets the ILcdGL used by this drawable.
|
void |
setGLU(ILcdGLU aGLU)
Sets the ILcdGLU used by this drawable.
|
void addGLEventListener(ILcdGLEventListener aListener)
void removeGLEventListener(ILcdGLEventListener aListener)
Dimension getSize()
Dimension getViewportSize()
DPI scale factor
.
See ALspViewXYZWorldTransformation
for more information about high DPI support in Lightspeed views.ILcdGL getGL()
void setGL(ILcdGL aGL)
aGL
- an ILcdGLILcdGLU getGLU()
void setGLU(ILcdGLU aGLU)
aGLU
- an ILcdGLUvoid display()
Properties getGLInformation()
boolean isCurrent()
void destroy()
ILcdGLCapabilities getChosenGLCapabilities()
ILcdGLCapabilities
that were used to construct this
drawable. These capabilities may be useful, for instance, to create a
second drawable with the same framebuffer layout.void invokeLater(ILcdGLRunnable glRunnable)
glRunnable
- the runnable to schedulevoid invokeAndWait(ILcdGLRunnable glRunnable)
glRunnable
- the runnable to executedefault boolean isRealized()
default double getDPIScale()
OpenGL viewport width or height
and the
width or height of the drawable itself
. When DPI scaling is
enabled in the host operating system, the former will be larger than the latter.
For instance, if the DPI scale is set to 150%, then this method will return 1.5
and getViewportSize()
will be 50% wider and taller than getSize()
.
See ALspViewXYZWorldTransformation
for more
information about DPI scaling in Lightspeed views.
Note that calling this method before the drawable is fully realized
may return an incorrect result.