com.io7m.jcanephora.jogl

## Class JCGLImplementationJOGL

- java.lang.Object
- - com.io7m.jcanephora.jogl.JCGLImplementationJOGL

- All Implemented Interfaces:
    JCGLImplementationType, JCGLImplementationJOGLType

      public final class JCGLImplementationJOGL
      extends Object
      implements JCGLImplementationJOGLType

  A JOGL implementation of the `JCGLImplementationJOGLType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JCGLImplementationJOGLType` | `getInstance()`
    `JCGLContextType` | `newContextFrom(com.jogamp.opengl.GLContext c, String name)` Construct a new context from the given `GLContext`.
    `JCGLContextType` | `newContextFromWithSupplier(com.jogamp.opengl.GLContext c, Function<com.jogamp.opengl.GLContext,com.jogamp.opengl.GL3> gl_supplier, String name)` Construct a new context from the given `GLContext`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static JCGLImplementationJOGLType getInstance()

      Returns:
        A reference to the JOGL implementation

    - #### newContextFrom

          public JCGLContextType newContextFrom(com.jogamp.opengl.GLContext c,
                                                String name)
                                         throws JCGLException,
                                                JCGLExceptionUnsupported,
                                                JCGLExceptionNonCompliant

      Description copied from interface: `JCGLImplementationJOGLType`
      Construct a new context from the given `GLContext`.
      Specified by:
        `newContextFrom` in interface `JCGLImplementationJOGLType`
      Parameters:
        `c` - An existing context
        `name` - The name assigned to the context, for debugging purposes
      Returns:
        A new context
      Throws:
        `JCGLException` - On errors
        `JCGLExceptionUnsupported` - If the context is of a version that is not supported
        `JCGLExceptionNonCompliant` - If the context violates the OpenGL specification

    - #### newContextFromWithSupplier

          public JCGLContextType newContextFromWithSupplier(com.jogamp.opengl.GLContext c,
                                                            Function<com.jogamp.opengl.GLContext,com.jogamp.opengl.GL3> gl_supplier,
                                                            String name)
                                                     throws JCGLException,
                                                            JCGLExceptionUnsupported,
                                                            JCGLExceptionNonCompliant

      Description copied from interface: `JCGLImplementationJOGLType`
      Construct a new context from the given `GLContext`. The function `gl_supplier` will be evaluated at least once to supply a `GL3` instance to the implementation. This allows for the substitution of alternate `GL3` instances for unit testing and debugging.
      Specified by:
        `newContextFromWithSupplier` in interface `JCGLImplementationJOGLType`
      Parameters:
        `c` - An existing context
        `gl_supplier` - A function that yields a `GL3` implementation, given a `GLContext`
        `name` - The name assigned to the context, for debugging purposes
      Returns:
        A new context
      Throws:
        `JCGLException` - On errors
        `JCGLExceptionUnsupported` - If the context is of a version that is not supported
        `JCGLExceptionNonCompliant` - If the context violates the OpenGL specification

Copyright © 2016 <code@io7m.com> http://io7m.com