Class RenderArea

  • All Implemented Interfaces:
    com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.opengl.GLAutoDrawable, com.jogamp.opengl.GLDrawable, com.jogamp.opengl.GLEventListener, com.jogamp.opengl.GLSharedContextSetter, java.util.EventListener, org.eclipse.swt.graphics.Drawable
    Direct Known Subclasses:
    RenderAreaInteractive

    public class RenderArea
    extends com.jogamp.opengl.swt.GLCanvas
    implements com.jogamp.opengl.GLEventListener
    • Field Summary

      • Fields inherited from class org.eclipse.swt.widgets.Control

        handle
      • Fields inherited from interface com.jogamp.opengl.GLAutoDrawable

        SCREEN_CHANGE_ACTION_ENABLED
    • Constructor Summary

      Constructors 
      Constructor Description
      RenderArea​(org.eclipse.swt.widgets.Composite parent, int style)  
      RenderArea​(org.eclipse.swt.widgets.Composite parent, int style, com.jogamp.opengl.GLCapabilities caps)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activateStereo​(boolean activated)  
      void display​(com.jogamp.opengl.GLAutoDrawable drawable)  
      void dispose​(com.jogamp.opengl.GLAutoDrawable drawable)  
      SoSceneManager.AntialiasingModes getAntialiasingMode()
      Gets the antialiasing mode.
      float getAntialiasingQuality()
      Gets the antialiasing quality value.
      SoGLRenderAction getGLRenderAction()
      Gets the render action used for rendering.
      int getStillSuperSamplingDelay()
      Gets delay for supersampling when "still" (not interacting).
      float getStillSuperSamplingQuality()
      Gets quality for supersampling when "still" (not interacting).
      void init​(com.jogamp.opengl.GLAutoDrawable drawable)  
      boolean isRawStereoAvailable()  
      void reshape​(com.jogamp.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)  
      void scheduleRedraw()
      Schedules a redraw for some time in the near future.
      void setAntialiasingMode​(SoSceneManager.AntialiasingModes mode)
      Sets the antialiasing mode.
      void setAntialiasingQuality​(float quality)
      Sets the antialiasing quality value.
      void setGLRenderAction​(SoGLRenderAction ra)
      Defines the render action used for rendering.
      void setSceneGraph​(SoNode sceneGraph)  
      void setStillSuperSamplingDelay​(int delay)
      Sets delay for supersampling when "still" (not interacting).
      void setStillSuperSamplingQuality​(float quality)
      Sets quality for supersampling when "still" (not interacting).
      • Methods inherited from class com.jogamp.opengl.swt.GLCanvas

        addGLEventListener, addGLEventListener, areAllGLEventListenerInitialized, create, createContext, destroy, display, dispose, disposeGLEventListener, flushGLRunnables, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getDelegatedDrawable, getExclusiveContextThread, getFactory, getGL, getGLEventListener, getGLEventListenerCount, getGLEventListenerInitState, getGLProfile, getHandle, getNativeSurface, getRequestedGLCapabilities, getSurfaceHeight, getSurfaceWidth, getUpstreamLock, getUpstreamWidget, invoke, invoke, isGLOriented, isRealized, isThreadGLCapable, main, removeGLEventListener, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setExclusiveContextThread, setGL, setGLEventListenerInitState, setRealized, setSharedAutoDrawable, setSharedContext, swapBuffers, toString, update
      • Methods inherited from class org.eclipse.swt.widgets.Canvas

        drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
      • Methods inherited from class org.eclipse.swt.widgets.Composite

        changed, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
      • Methods inherited from class org.eclipse.swt.widgets.Scrollable

        computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
      • Methods inherited from class org.eclipse.swt.widgets.Control

        addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse
      • Methods inherited from class org.eclipse.swt.widgets.Widget

        addDisposeListener, addListener, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.swt.graphics.Drawable

        isAutoScalable
    • Constructor Detail

      • RenderArea

        public RenderArea​(org.eclipse.swt.widgets.Composite parent,
                          int style)
      • RenderArea

        public RenderArea​(org.eclipse.swt.widgets.Composite parent,
                          int style,
                          com.jogamp.opengl.GLCapabilities caps)
    • Method Detail

      • setGLRenderAction

        public void setGLRenderAction​(SoGLRenderAction ra)
        Defines the render action used for rendering.
      • getGLRenderAction

        public SoGLRenderAction getGLRenderAction()
        Gets the render action used for rendering.
      • getAntialiasingQuality

        public float getAntialiasingQuality()
        Gets the antialiasing quality value.
        Returns:
        the antialiasing quality, factor in the range [0.0,1.0].
      • setAntialiasingQuality

        public void setAntialiasingQuality​(float quality)
        Sets the antialiasing quality value.

        Default value is 0.0. The value 0.0 turns off antialiasing.

        Parameters:
        quality - The quality is a factor in the range [0.0,1.0].
      • setAntialiasingMode

        public void setAntialiasingMode​(SoSceneManager.AntialiasingModes mode)
        Sets the antialiasing mode.

        Default value is NO_ANTIALIASING which turns off antialiasing.

        Parameters:
        mode - the antialiasing algorithm.
      • getStillSuperSamplingQuality

        public float getStillSuperSamplingQuality()
        Gets quality for supersampling when "still" (not interacting).
        Returns:
        the quality for supersampling, factor in the range [0.0,1.0].
      • setStillSuperSamplingQuality

        public void setStillSuperSamplingQuality​(float quality)
        Sets quality for supersampling when "still" (not interacting).

        When quality is greater than 0, still images will be automatically supersampled. Default value is 0.0. Use the value 0.0 to turn off still supersampling. 0.5 is a typical value.

        Parameters:
        quality - The quality is a factor in the range [0.0,1.0].
      • getStillSuperSamplingDelay

        public int getStillSuperSamplingDelay()
        Gets delay for supersampling when "still" (not interacting).
        Returns:
        the delay for supersampling in milliseconds.
      • setStillSuperSamplingDelay

        public void setStillSuperSamplingDelay​(int delay)
        Sets delay for supersampling when "still" (not interacting).

        If greater than 0, images will be supersampled after the specified delay. Default value is 0. The delay is in milliseconds.

        Parameters:
        delay - The delay for supersampling in milliseconds.
      • activateStereo

        public void activateStereo​(boolean activated)
      • isRawStereoAvailable

        public boolean isRawStereoAvailable()
      • setSceneGraph

        public void setSceneGraph​(SoNode sceneGraph)
      • scheduleRedraw

        public void scheduleRedraw()
        Schedules a redraw for some time in the near future.
      • init

        public void init​(com.jogamp.opengl.GLAutoDrawable drawable)
        Specified by:
        init in interface com.jogamp.opengl.GLEventListener
      • dispose

        public void dispose​(com.jogamp.opengl.GLAutoDrawable drawable)
        Specified by:
        dispose in interface com.jogamp.opengl.GLEventListener
      • display

        public void display​(com.jogamp.opengl.GLAutoDrawable drawable)
        Specified by:
        display in interface com.jogamp.opengl.GLEventListener
      • reshape

        public void reshape​(com.jogamp.opengl.GLAutoDrawable drawable,
                            int x,
                            int y,
                            int width,
                            int height)
        Specified by:
        reshape in interface com.jogamp.opengl.GLEventListener