Package processing.opengl
Class PSurfaceJOGL
java.lang.Object
processing.opengl.PSurfaceJOGL
- All Implemented Interfaces:
PSurface
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassprotected classprotected classprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.jogamp.opengl.util.FPSAnimatorprotected static ArrayList<com.jogamp.opengl.util.FPSAnimator>protected com.jogamp.newt.awt.NewtCanvasAWTprotected float[]protected com.jogamp.newt.Displayprotected Rectangleprotected Throwableprotected PGraphicsstatic com.jogamp.opengl.GLProfileSelected GL profileprotected com.jogamp.newt.Screenprotected Rectangleprotected static com.jogamp.opengl.GLAutoDrawableprotected PAppletprotected intprotected intprotected intprotected intprotected com.jogamp.newt.opengl.GLWindowprotected intFields inherited from interface processing.core.PSurface
MIN_WINDOW_HEIGHT, MIN_WINDOW_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected floatprotected static RectanglegetDisplayBounds(int displayNum) Get the native window object associated with this drawing surface.floatvoidprotected voidprotected voidvoidprotected voidinitGL()protected voidprotected voidvoidinitOffscreen(PApplet sketch) protected voidbooleanprotected voidnativeKeyEvent(com.jogamp.newt.event.KeyEvent nativeEvent, int peAction) protected voidnativeMouseEvent(com.jogamp.newt.event.MouseEvent nativeEvent, int peAction) booleanvoidOn the next trip through the animation thread, things should go sleepy-bye.voidplacePresent(int stopColor) voidplaceWindow(int[] location, int[] editorLocation) voidvoidvoidselectFolder(String prompt, String callbackMethod, File file, Object callbackObject) voidselectInput(String prompt, String callbackMethod, File file, Object callbackObject) voidselectOutput(String prompt, String callbackMethod, File file, Object callbackObject) voidsetAlwaysOnTop(boolean always) Dumb name, but inherited from Frame and no better ideas.voidsetCursor(int kind) voidvoidsetFrameRate(float fps) voidvoidsetLocation(int x, int y) voidsetResizable(boolean resizable) Set true if we want to resize things (default is not resizable)voidsetSize(int wide, int high) voidsetSmooth(int level) voidSet the window (and dock, or whatever necessary) title.voidsetVisible(boolean visible) Show or hide the window.voidvoidStart the animation threadbooleanStop the animation thread (set it null)
-
Field Details
-
profile
public static com.jogamp.opengl.GLProfile profileSelected GL profile -
pgl
-
window
protected com.jogamp.newt.opengl.GLWindow window -
animator
protected com.jogamp.opengl.util.FPSAnimator animator -
screenRect
-
sketch
-
graphics
-
sketchWidthRequested
protected int sketchWidthRequested -
sketchHeightRequested
protected int sketchHeightRequested -
sketchWidth
protected int sketchWidth -
sketchHeight
protected int sketchHeight -
display
protected com.jogamp.newt.Display display -
screen
protected com.jogamp.newt.Screen screen -
displayRect
-
drawException
-
canvas
protected com.jogamp.newt.awt.NewtCanvasAWT canvas -
animators
-
windowScaleFactor
protected int windowScaleFactor -
currentPixelScale
protected float[] currentPixelScale
-
-
Constructor Details
-
PSurfaceJOGL
-
-
Method Details
-
initOffscreen
- Specified by:
initOffscreenin interfacePSurface
-
initFrame
-
getNative
Description copied from interface:PSurfaceGet the native window object associated with this drawing surface. For Java2D, this will be an AWT Frame object. For OpenGL, the window. The data returned here is subject to the whims of the renderer, and using this method means you're willing to deal with underlying implementation changes and that you won't throw a fit like a toddler if your code breaks sometime in the future. -
initDisplay
protected void initDisplay() -
getDisplayBounds
-
initGL
protected void initGL() -
initWindow
protected void initWindow() -
initListeners
protected void initListeners() -
initAnimator
protected void initAnimator() -
setTitle
Description copied from interface:PSurfaceSet the window (and dock, or whatever necessary) title. -
setVisible
public void setVisible(boolean visible) Description copied from interface:PSurfaceShow or hide the window.- Specified by:
setVisiblein interfacePSurface
-
setResizable
public void setResizable(boolean resizable) Description copied from interface:PSurfaceSet true if we want to resize things (default is not resizable)- Specified by:
setResizablein interfacePSurface
-
setIcon
-
setAlwaysOnTop
public void setAlwaysOnTop(boolean always) Description copied from interface:PSurfaceDumb name, but inherited from Frame and no better ideas.- Specified by:
setAlwaysOnTopin interfacePSurface
-
initIcons
protected void initIcons() -
placeWindow
public void placeWindow(int[] location, int[] editorLocation) - Specified by:
placeWindowin interfacePSurface
-
placePresent
public void placePresent(int stopColor) - Specified by:
placePresentin interfacePSurface
-
startThread
public void startThread()Description copied from interface:PSurfaceStart the animation thread- Specified by:
startThreadin interfacePSurface
-
pauseThread
public void pauseThread()Description copied from interface:PSurfaceOn the next trip through the animation thread, things should go sleepy-bye. Does not pause the thread immediately because that needs to happen on the animation thread itself, so fires on the next trip through draw().- Specified by:
pauseThreadin interfacePSurface
-
resumeThread
public void resumeThread()- Specified by:
resumeThreadin interfacePSurface
-
stopThread
public boolean stopThread()Description copied from interface:PSurfaceStop the animation thread (set it null)- Specified by:
stopThreadin interfacePSurface- Returns:
- false if already stopped
-
isStopped
public boolean isStopped() -
setLocation
public void setLocation(int x, int y) - Specified by:
setLocationin interfacePSurface
-
setSize
public void setSize(int wide, int high) -
getPixelScale
public float getPixelScale() -
getCurrentPixelScale
protected float getCurrentPixelScale() -
getComponent
-
setSmooth
public void setSmooth(int level) -
setFrameRate
public void setFrameRate(float fps) - Specified by:
setFrameRatein interfacePSurface
-
requestFocus
public void requestFocus() -
nativeMouseEvent
protected void nativeMouseEvent(com.jogamp.newt.event.MouseEvent nativeEvent, int peAction) -
nativeKeyEvent
protected void nativeKeyEvent(com.jogamp.newt.event.KeyEvent nativeEvent, int peAction) -
setCursor
public void setCursor(int kind) -
setCursor
-
showCursor
public void showCursor()- Specified by:
showCursorin interfacePSurface
-
hideCursor
public void hideCursor()- Specified by:
hideCursorin interfacePSurface
-
loadImage
-
openLink
-
selectInput
- Specified by:
selectInputin interfacePSurface
-
selectOutput
- Specified by:
selectOutputin interfacePSurface
-
selectFolder
- Specified by:
selectFolderin interfacePSurface
-