com.io7m.jcanephora.lwjgl3

## Class JCGLImplementationLWJGL3

- java.lang.Object
- - com.io7m.jcanephora.lwjgl3.JCGLImplementationLWJGL3

- All Implemented Interfaces:
    JCGLImplementationType, JCGLImplementationLWJGL3Type

      public final class JCGLImplementationLWJGL3
      extends Object
      implements JCGLImplementationLWJGL3Type

  A LWJGL3 implementation of the `JCGLImplementationLWJGL3Type` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JCGLImplementationLWJGL3Type` | `getInstance()`
    `com.io7m.jfunctional.Pair<JCGLContextType,JCGLContextType>` | `newSharedContextsFrom(long master_context, String master_name, long slave_context, String slave_name)` Construct a new context from the given context.
    `JCGLContextType` | `newUnsharedContextFrom(long context, String name)` Construct a new context from the given context.

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

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

- - ### Method Detail

    - #### getInstance

          public static JCGLImplementationLWJGL3Type getInstance()

      Returns:
        A reference to the LWJGL3 implementation

    - #### newUnsharedContextFrom

          public JCGLContextType newUnsharedContextFrom(long context,
                                                        String name)
                                                 throws JCGLException,
                                                        JCGLExceptionUnsupported,
                                                        JCGLExceptionNonCompliant

      Description copied from interface: `JCGLImplementationLWJGL3Type`

      Construct a new context from the given context. The `long` value is a context value returned from `GLFW.glfwCreateWindow(int, int, CharSequence, long, long)`.

      The context is assumed not to be shared with any other context. The implementation trusts that this is the case and has no way to verify otherwise.

      Specified by:
        `newUnsharedContextFrom` in interface `JCGLImplementationLWJGL3Type`
      Parameters:
        `context` - 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

    - #### newSharedContextsFrom

          public com.io7m.jfunctional.Pair<JCGLContextType,JCGLContextType> newSharedContextsFrom(long master_context,
                                                                                                  String master_name,
                                                                                                  long slave_context,
                                                                                                  String slave_name)
                                                                                           throws JCGLException,
                                                                                                  JCGLExceptionUnsupported,
                                                                                                  JCGLExceptionNonCompliant

      Description copied from interface: `JCGLImplementationLWJGL3Type`

      Construct a new context from the given context. The `long` values are context values returned from `GLFW.glfwCreateWindow(int, int, CharSequence, long, long)`.

      The pair of contexts are assumed to be shared with each other. The implementation trusts that this is the case and has no way to verify otherwise.

      On successfully returning, the `master_context` context will be current on the current thread.

      Specified by:
        `newSharedContextsFrom` in interface `JCGLImplementationLWJGL3Type`
      Parameters:
        `master_context` - An existing context
        `master_name` - The name assigned to the master context, for debugging purposes
        `slave_context` - An existing slave context
        `slave_name` - The name assigned to the slave 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