Interface ILcdGLExternalDrawable

All Superinterfaces:
ILcdGLDrawable

public interface ILcdGLExternalDrawable extends 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 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 interface ILcdGLDrawable
    • 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 corner
      aY - the new Y coordinate of the viewport's lower left corner
      aWidth - the new width of the viewport
      aHeight - 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.