Class OpenGLPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.marginallyclever.ro3.apps.viewport.Viewport
com.marginallyclever.ro3.apps.viewport.OpenGLPanel
- All Implemented Interfaces:
com.jogamp.opengl.GLEventListener
,SceneChangeListener
,MouseListener
,MouseMotionListener
,MouseWheelListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
Field Summary
Fields inherited from class com.marginallyclever.ro3.apps.viewport.Viewport
renderPasses
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addGLEventListener
(com.jogamp.opengl.GLEventListener listener) void
void
display
(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) void
dispose
(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) int
getFPS()
int
void
init
(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) boolean
boolean
boolean
void
removeGLEventListener
(com.jogamp.opengl.GLEventListener listener) void
void
void
reshape
(com.jogamp.opengl.GLAutoDrawable glAutoDrawable, int x, int y, int width, int height) void
void
setDoubleBuffered
(boolean doubleBuffered) void
setFsaaSamples
(int fsaaSamples) void
setHardwareAccelerated
(boolean hardwareAccelerated) void
setVerticalSync
(boolean verticalSync) void
Methods inherited from class com.marginallyclever.ro3.apps.viewport.Viewport
addToolChangeListener, afterSceneChange, beforeSceneChange, getActiveCamera, getActiveToolIndex, getAspectRatio, getCursorAsNormalized, getCursorAsNormalized, getCursorPosition, getNumTools, getOrbitChangeFactor, getRayThroughPoint, getRayThroughPointUntransformed, getTool, getUserMovementScale, isOriginShift, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, removeToolChangeListener, renderAllPasses, saveRenderPassState, setActiveCamera, setActiveToolIndex, setFsaaSamples, setOrbitChangeFactor, setOriginShift, setUserMovementScale, updateAllNodes
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
OpenGLPanel
public OpenGLPanel()
-
-
Method Details
-
savePrefs
public void savePrefs() -
addNotify
public void addNotify() -
removeNotify
public void removeNotify()- Overrides:
removeNotify
in classViewport
-
addGLEventListener
public void addGLEventListener(com.jogamp.opengl.GLEventListener listener) -
removeGLEventListener
public void removeGLEventListener(com.jogamp.opengl.GLEventListener listener) -
stopAnimationSystem
public void stopAnimationSystem() -
init
public void init(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) - Specified by:
init
in interfacecom.jogamp.opengl.GLEventListener
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) - Specified by:
dispose
in interfacecom.jogamp.opengl.GLEventListener
-
reshape
public void reshape(com.jogamp.opengl.GLAutoDrawable glAutoDrawable, int x, int y, int width, int height) - Specified by:
reshape
in interfacecom.jogamp.opengl.GLEventListener
-
display
public void display(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) - Specified by:
display
in interfacecom.jogamp.opengl.GLEventListener
-
renderViewportTools
public void renderViewportTools() -
isHardwareAccelerated
public boolean isHardwareAccelerated()- Overrides:
isHardwareAccelerated
in classViewport
-
setHardwareAccelerated
public void setHardwareAccelerated(boolean hardwareAccelerated) - Overrides:
setHardwareAccelerated
in classViewport
-
isDoubleBuffered
public boolean isDoubleBuffered()- Overrides:
isDoubleBuffered
in classJComponent
-
setDoubleBuffered
public void setDoubleBuffered(boolean doubleBuffered) - Overrides:
setDoubleBuffered
in classJComponent
-
getFsaaSamples
public int getFsaaSamples()- Overrides:
getFsaaSamples
in classViewport
-
setFsaaSamples
public void setFsaaSamples(int fsaaSamples) -
isVerticalSync
public boolean isVerticalSync()- Overrides:
isVerticalSync
in classViewport
-
setVerticalSync
public void setVerticalSync(boolean verticalSync) - Overrides:
setVerticalSync
in classViewport
-
getFPS
public int getFPS()
-