Package com.jogamp.opengl
Class GLPipelineFactory
- java.lang.Object
-
- com.jogamp.opengl.GLPipelineFactory
-
public class GLPipelineFactory extends Object
Factory for pipelining GL instances
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUG
-
Constructor Summary
Constructors Constructor Description GLPipelineFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GLcreate(String pipelineClazzBaseName, Class<?> reqInterface, GL downstream, Object[] additionalArgs)Creates a pipelined GL instance using the given downstreamdownstreamand optional argumentsadditionalArgsfor the constructor.
-
-
-
Method Detail
-
create
public static final GL create(String pipelineClazzBaseName, Class<?> reqInterface, GL downstream, Object[] additionalArgs)
Creates a pipelined GL instance using the given downstreamdownstreamand optional argumentsadditionalArgsfor the constructor.Sample code which installs a Debug and Trace pipeline automatic w/ user defined interface, here: GL2ES2:
gl = drawable.setGL( GLPipelineFactory.create("com.jogamp.opengl.Debug", GL2ES2.class, gl, null) ); gl = drawable.setGL( GLPipelineFactory.create("com.jogamp.opengl.Trace", GL2ES2.class, gl, new Object[] { System.err } ) );or automatic w/ automatic defined class:gl = drawable.setGL( GLPipelineFactory.create("com.jogamp.opengl.Debug", null, gl, null) ); gl = drawable.setGL( GLPipelineFactory.create("com.jogamp.opengl.Trace", null, gl, new Object[] { System.err } ) );The upstream GL instance is determined as follows:
- Use
pipelineClazzBaseNameas the class name's full basename, incl. package name - For the
downstreamclass and it's superclasses, do: - For all
downstreamclass and superclass interfaces, do: - If
reqInterfaceis not null and the interface is unequal, continue loop. - If
downstreamis not instance of interface, continue loop. - If upstream class is available use it, end loop.
- Parameters:
pipelineClazzBaseName- the basename of the pipline class namereqInterface- optional requested interface to be used, may be null, in which case the first matching one is useddownstream- is always the 1st argument for the upstream constructoradditionalArgs- additional arguments for the upstream constructor
- Use
-
-