From 0002fccdcd6383874b2813dc6bbe3e33f5f00924 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Tue, 16 Jul 2013 03:46:59 +0200
Subject: Only use base pipelines for Trace/Debug, mock others (ES2, GL2, ..);
 BuildComposablePipeline: Unify GL identify methods

- Only use base pipelines for Trace/Debug, mock others (ES2, GL2, ..)
  The Trace/Debug generated pipelines consume quite some space
  and only the actual GL*Impl pipeline is actually required.

  To make this work, we have to identify the GL type via it's downstream instance
  to implement isGL*() and getGL*() methods, see below!

  Adding dummy Trace/Debug type wrapper for GL2, GL3, GL3bc, GL4 and GLES2.

BuildComposablePipeline: Unify GL identify methods
  As described above, Trace/Debug shall utilize downstream identification for isGL*() and getGL*() methods.

  Custom types, like FixedFuncImpl may choose to be identified by their class inheritance,
  by passing command-line argument 'gl_identity_by_assignable_class'.
---
 .../javax/media/opengl/GLPipelineFactory.java        | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

(limited to 'src/jogl/classes/javax/media/opengl/GLPipelineFactory.java')

diff --git a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
index 2bfc77d4a..c6bf26235 100644
--- a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
@@ -51,8 +51,23 @@ public class GLPipelineFactory {
 
     /** 
      * Creates a pipelined GL instance using the given downstream <code>downstream</code>
-     * and optional arguments <code>additionalArgs</code> for the constructor.<br>
+     * and optional arguments <code>additionalArgs</code> for the constructor.
      *
+     * <p>
+     * Sample code which installs a Debug and Trace pipeline
+     * automatic w/ user defined interface, here: GL2ES2:
+     * <pre>
+     *     gl = drawable.setGL( GLPipelineFactory.create("javax.media.opengl.Debug", GL2ES2.class, gl, null) );
+     *     gl = drawable.setGL( GLPipelineFactory.create("javax.media.opengl.Trace", GL2ES2.class, gl, new Object[] { System.err } ) );
+     * </pre>
+     * or automatic w/ automatic defined class:
+     * <pre>
+     *     gl = drawable.setGL( GLPipelineFactory.create("javax.media.opengl.Debug",         null, gl, null) );
+     *     gl = drawable.setGL( GLPipelineFactory.create("javax.media.opengl.Trace",         null, gl, new Object[] { System.err } ) );
+     * </pre>
+     * </p>
+     * 
+     * <p>
      * The upstream GL instance is determined as follows:
      * <ul>
      *   <li> Use <code>pipelineClazzBaseName</code> as the class name's full basename, incl. package name</li>
@@ -65,7 +80,8 @@ public class GLPipelineFactory {
      *        <li> If upstream class is available use it, end loop.</li>
      *      </ul>
      *   </ul>
-     * </ul><br>
+     * </ul>
+     * </p>
      *
      * @param pipelineClazzBaseName the basename of the pipline class name
      * @param reqInterface optional requested interface to be used, may be null, in which case the first matching one is used
-- 
cgit v1.2.3