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
Modifier and TypeFieldDescriptionprotected com.jogamp.opengl.GLCapabilities
protected IChartFactory
protected boolean
protected int
protected boolean
protected boolean
protected int
-
Constructor Summary
ConstructorDescriptionInitialize a factory with a default desiredGLCapabilities
defined bygetDefaultCapabilities(GLProfile)
based on the detectedGLProfile
, eitherGLProfile.GL2
orGLProfile.GL2ES2
ifGLProfile.GL2
is not available.NativePainterFactory
(com.jogamp.opengl.GLCapabilities capabilities) -
Method Summary
Modifier and TypeMethodDescriptionstatic com.jogamp.opengl.GLProfile
OPENGL PROFILE AND CAPABILITIES HELPERScom.jogamp.opengl.GLCapabilities
Return desired Open GL Capabilitiesstatic com.jogamp.opengl.GLCapabilities
getDefaultCapabilities
(com.jogamp.opengl.GLProfile glp) 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 onlyboolean
boolean
boolean
newAnimator
(ICanvas canvas) newRenderer3D
(View view) Only needed byINativeCanvas
newSymbolHandler
(IImageWrapper image) void
setChartFactory
(IChartFactory chartFactory) void
setDebugGL
(boolean debugGL) If true, will let GL triggerinvalid @link
GLException
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 useOffscreenCanvas
instead of theICanvas
they use by default for display.void
setOffscreen
(Rectangle rectangle) void
void
setTraceGL
(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 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 desiredGLCapabilities
defined bygetDefaultCapabilities(GLProfile)
based on the detectedGLProfile
, eitherGLProfile.GL2
orGLProfile.GL2ES2
ifGLProfile.GL2
is not available. If none of these profile is available, anUnsupportedOperationException
is 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:
newPainter
in interfaceIPainterFactory
-
newAnimator
- Specified by:
newAnimator
in interfaceIPainterFactory
-
newSymbolHandler
- Specified by:
newSymbolHandler
in interfaceIPainterFactory
-
getChartFactory
- Specified by:
getChartFactory
in interfaceIPainterFactory
-
setChartFactory
- Specified by:
setChartFactory
in interfaceIPainterFactory
-
isOffscreen
public boolean isOffscreen()- Specified by:
isOffscreen
in interfaceIPainterFactory
-
setOffscreenDisabled
public void setOffscreenDisabled()- Specified by:
setOffscreenDisabled
in 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 useOffscreenCanvas
instead of theICanvas
they use by default for display.- Specified by:
setOffscreen
in interfaceIPainterFactory
-
setOffscreen
- Specified by:
setOffscreen
in interfaceIPainterFactory
-
getOffscreenDimension
- Specified by:
getOffscreenDimension
in 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:
isDebugGL
in interfaceIPainterFactory
-
setDebugGL
public void setDebugGL(boolean debugGL) If true, will let GL triggerinvalid @link
GLException
-Djogl.debug.DebugGL
- Specified by:
setDebugGL
in interfaceIPainterFactory
-