Package org.jzy3d.chart.factories
Class NativePainterFactory
java.lang.Object
org.jzy3d.chart.factories.NativePainterFactory
- All Implemented Interfaces:
IPainterFactory
- Direct Known Subclasses:
AWTPainterFactory,NewtPainterFactory,SWTPainterFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.jogamp.opengl.GLCapabilitiesprotected IChartFactoryprotected booleanprotected intprotected booleanprotected booleanprotected int -
Constructor Summary
ConstructorsConstructorDescriptionInitialize a factory with a default desiredGLCapabilitiesdefined bygetDefaultCapabilities(GLProfile)based on the detectedGLProfile, eitherGLProfile.GL2orGLProfile.GL2ES2ifGLProfile.GL2is not available.NativePainterFactory(com.jogamp.opengl.GLCapabilities capabilities) -
Method Summary
Modifier and TypeMethodDescriptionstatic com.jogamp.opengl.GLProfileOPENGL PROFILE AND CAPABILITIES HELPERScom.jogamp.opengl.GLCapabilitiesReturn desired Open GL Capabilitiesstatic com.jogamp.opengl.GLCapabilitiesgetDefaultCapabilities(com.jogamp.opengl.GLProfile glp) static com.jogamp.opengl.GLCapabilitiesgetOffscreenCapabilities(com.jogamp.opengl.GLProfile glp) This profile has prove to fix the fact that using a raw GLCapabilities without settings let screenshot as gray onlybooleanbooleanbooleannewAnimator(ICanvas canvas) newRenderer3D(View view) Only needed byINativeCanvasnewSymbolHandler(IImageWrapper image) voidsetChartFactory(IChartFactory chartFactory) voidsetDebugGL(boolean debugGL) If true, will let GL triggerif an error occur in OpenGL which ease debugging.invalid @link
GLExceptionvoidsetOffscreen(int width, int height) Set the painter factory with the offscreen image dimension will configureCapabilities.setOnscreen(boolean)properly and let inheriting painters they should useOffscreenCanvasinstead of theICanvasthey use by default for display.voidsetOffscreen(Rectangle rectangle) voidvoidsetTraceGL(boolean traceGL) If true, will enable GL code tracing in console.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jzy3d.chart.factories.IPainterFactory
newCanvas, newFrame, newFrame, newKeyboardCameraController, newKeyboardScreenshotController, newMouseCameraController, newMousePickingController, newViewOverlay, newViewportLayout
-
Field Details
-
chartFactory
-
capabilities
protected com.jogamp.opengl.GLCapabilities capabilities -
offscreen
protected boolean offscreen -
width
protected int width -
height
protected int height -
traceGL
protected boolean traceGL -
debugGL
protected boolean debugGL
-
-
Constructor Details
-
NativePainterFactory
public NativePainterFactory()Initialize a factory with a default desiredGLCapabilitiesdefined bygetDefaultCapabilities(GLProfile)based on the detectedGLProfile, eitherGLProfile.GL2orGLProfile.GL2ES2ifGLProfile.GL2is not available. If none of these profile is available, anUnsupportedOperationExceptionis thrown. -
NativePainterFactory
public NativePainterFactory(com.jogamp.opengl.GLCapabilities capabilities)
-
-
Method Details
-
getCapabilities
public com.jogamp.opengl.GLCapabilities getCapabilities()Return desired Open GL Capabilities -
newRenderer3D
Only needed byINativeCanvas -
newPainter
- Specified by:
newPainterin interfaceIPainterFactory
-
newAnimator
- Specified by:
newAnimatorin interfaceIPainterFactory
-
newSymbolHandler
- Specified by:
newSymbolHandlerin interfaceIPainterFactory
-
getChartFactory
- Specified by:
getChartFactoryin interfaceIPainterFactory
-
setChartFactory
- Specified by:
setChartFactoryin interfaceIPainterFactory
-
isOffscreen
public boolean isOffscreen()- Specified by:
isOffscreenin interfaceIPainterFactory
-
setOffscreenDisabled
public void setOffscreenDisabled()- Specified by:
setOffscreenDisabledin interfaceIPainterFactory
-
setOffscreen
public void setOffscreen(int width, int height) Set the painter factory with the offscreen image dimension will configureCapabilities.setOnscreen(boolean)properly and let inheriting painters they should useOffscreenCanvasinstead of theICanvasthey use by default for display.- Specified by:
setOffscreenin interfaceIPainterFactory
-
setOffscreen
- Specified by:
setOffscreenin interfaceIPainterFactory
-
getOffscreenDimension
- Specified by:
getOffscreenDimensionin interfaceIPainterFactory
-
detectGLProfile
public static com.jogamp.opengl.GLProfile detectGLProfile()OPENGL PROFILE AND CAPABILITIES HELPERS -
getOffscreenCapabilities
public static com.jogamp.opengl.GLCapabilities getOffscreenCapabilities(com.jogamp.opengl.GLProfile glp) This profile has prove to fix the fact that using a raw GLCapabilities without settings let screenshot as gray only -
getDefaultCapabilities
public static com.jogamp.opengl.GLCapabilities getDefaultCapabilities(com.jogamp.opengl.GLProfile glp) -
isTraceGL
public boolean isTraceGL() -
setTraceGL
public void setTraceGL(boolean traceGL) If true, will enable GL code tracing in console. Default is false. This is equivalent to enabling the JVM flag-Djogl.debug.TraceGLGL -
isDebugGL
public boolean isDebugGL()- Specified by:
isDebugGLin interfaceIPainterFactory
-
setDebugGL
public void setDebugGL(boolean debugGL) If true, will let GL triggerif an error occur in OpenGL which ease debugging. Default is false. This is equivalent to enabling the JVM flaginvalid @link
GLException-Djogl.debug.DebugGL- Specified by:
setDebugGLin interfaceIPainterFactory
-