Package com.luciad.view.opengl.binding
Interface ILcdGLExternalDrawable
- All Superinterfaces:
ILcdGLDrawable
Represents an ILcdGLDrawable which is
associated with an externally created OpenGL context. External drawables can be
used, for instance, to enable context sharing between a LuciadLightspeed view and
an OpenGL context created by native code.
Since the repaint cycle of the external OpenGL context might not be controlled by
the Java code, implementations of this interface are not able to determine
when to invoke their
event listeners.
Therefore, this interface defines methods that correspond to those of
ILcdGLEventListener
, and it is the application's responsibility to
invoke them manually at the appropriate time.- Since:
- 2013.1
-
Method Summary
Modifier and TypeMethodDescriptionvoid
display()
Signals to this drawable's event listeners that the external context has been made current and may be rendered into.void
dispose()
Signals to this drawable's event listeners that the external context is going to be destroyed.void
init()
Signals to this drawable's event listeners that the external OpenGL context has been initialized.void
reshape
(int aX, int aY, int aWidth, int aHeight) Signals to this drawable's event listeners that the external context's dimensions have changed.Methods inherited from interface com.luciad.view.opengl.binding.ILcdGLDrawable
addGLEventListener, destroy, getChosenGLCapabilities, getDPIScale, getGL, getGLInformation, getGLU, getSize, getViewportSize, invokeAndWait, invokeLater, isCurrent, isRealized, removeGLEventListener, setGL, setGLU
-
Method Details
-
init
void init()Signals to this drawable's event listeners that the external OpenGL context has been initialized. The external OpenGL context must be current when calling this method. -
display
void display()Signals to this drawable's event listeners that the external context has been made current and may be rendered into. The external OpenGL context must be current when calling this method.- Specified by:
display
in interfaceILcdGLDrawable
-
reshape
void reshape(int aX, int aY, int aWidth, int aHeight) Signals to this drawable's event listeners that the external context's dimensions have changed. The external OpenGL context must be current when calling this method.- Parameters:
aX
- the new X coordinate of the viewport's lower left corneraY
- the new Y coordinate of the viewport's lower left corneraWidth
- the new width of the viewportaHeight
- the new height of the viewport
-
dispose
void dispose()Signals to this drawable's event listeners that the external context is going to be destroyed. The external OpenGL context must be current when calling this method.
-