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
public abstract class NativePainterFactory extends Object implements IPainterFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected com.jogamp.opengl.GLCapabilitiescapabilitiesprotected IChartFactorychartFactoryprotected booleandebugGLprotected intheightprotected booleanoffscreenprotected booleantraceGLprotected intwidth
-
Constructor Summary
Constructors Constructor Description NativePainterFactory()Initialize 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.jogamp.opengl.GLProfiledetectGLProfile()OPENGL PROFILE AND CAPABILITIES HELPERScom.jogamp.opengl.GLCapabilitiesgetCapabilities()Return desired Open GL CapabilitiesIChartFactorygetChartFactory()static 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 onlyDimensiongetOffscreenDimension()booleanisDebugGL()booleanisOffscreen()booleanisTraceGL()NativeAnimatornewAnimator(ICanvas canvas)IPainternewPainter()Renderer3dnewRenderer3D(View view)Only needed byINativeCanvasSymbolHandlernewSymbolHandler(IImageWrapper image)voidsetChartFactory(IChartFactory chartFactory)voidsetDebugGL(boolean debugGL)If true, will let GL triggerGLExceptionif an error occur in OpenGL which ease debugging.voidsetOffscreen(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)voidsetOffscreenDisabled()voidsetTraceGL(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, wait
-
Methods inherited from interface org.jzy3d.chart.factories.IPainterFactory
newCanvas, newFrame, newFrame, newKeyboardCameraController, newKeyboardScreenshotController, newMouseCameraController, newMousePickingController, newViewOverlay, newViewportLayout
-
-
-
-
Field Detail
-
chartFactory
protected IChartFactory 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 Detail
-
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 Detail
-
getCapabilities
public com.jogamp.opengl.GLCapabilities getCapabilities()
Return desired Open GL Capabilities
-
newRenderer3D
public Renderer3d newRenderer3D(View view)
Only needed byINativeCanvas
-
newPainter
public IPainter newPainter()
- Specified by:
newPainterin interfaceIPainterFactory
-
newAnimator
public NativeAnimator newAnimator(ICanvas canvas)
- Specified by:
newAnimatorin interfaceIPainterFactory
-
newSymbolHandler
public SymbolHandler newSymbolHandler(IImageWrapper image)
- Specified by:
newSymbolHandlerin interfaceIPainterFactory
-
getChartFactory
public IChartFactory getChartFactory()
- Specified by:
getChartFactoryin interfaceIPainterFactory
-
setChartFactory
public void setChartFactory(IChartFactory chartFactory)
- 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
public void setOffscreen(Rectangle rectangle)
- Specified by:
setOffscreenin interfaceIPainterFactory
-
getOffscreenDimension
public Dimension 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 triggerGLExceptionif an error occur in OpenGL which ease debugging. Default is false. This is equivalent to enabling the JVM flag-Djogl.debug.DebugGL- Specified by:
setDebugGLin interfaceIPainterFactory
-
-