// JOGL 2 - Composeable Pipline
JOGL provides a feature called 'composeable pipeline' which can be quite useful in some situations. It enables you to put additional delegating layers between your java application and the OpenGL driver.
A few usecases could be:
- performance metrics
- logging, debugging or diagnostics
- to ignore specific function calls
public void init(GLAutoDrawable drawable) {
// wrap composeable pipeline in a Debug utility, all OpenGL error codes are automatically
// converted to GLExceptions as soon as they appear
drawable.setGL(new DebugGL3(drawable.getGL().getGL3()));
//..
}
Another predefined layer is TraceGL which intercepts all OpenGL calls and prints them to an output stream.
drawable.setGL(new TraceGL3(drawable.getGL().getGL3(), System.out));
see also GL Profiles