@Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        String methodName = method.getName();
        printMethodName(methodName);
        
        if (methodName.startsWith("gl")) {
            try {
                // Try to evaluate result first, so we can see output values.
                Object result = method.invoke(obj, args);
                printArgs(methodName, args, method.getParameterTypes());
                printResult(methodName, result, method.getReturnType());
                printNewLine();
                return result;
            } catch (Throwable ex) {
                // Execution failed, print args anyway
                // but output values will be incorrect.
                printArgs(methodName, args, method.getParameterTypes());
                printNewLine();
                System.out.println("\tException occurred!");
                System.out.println(ex.toString());
                throw ex;
            }
        } else {
            printNewLine();
            return method.invoke(obj, args);
        }
    }
Creates a tracer implementation that wraps OpenGL 2+.

@param glInterface OGL object to wrap
@param glInterfaceClasses The interface(s) to implement
@return A tracer that implements the given interface
jme3-core/src/main/java/com/jme3/renderer/opengl/GLTracer.java