com.io7m.jcanephora.fake

## Class FakeContext

- java.lang.Object
- - com.io7m.jcanephora.fake.FakeContext

- All Implemented Interfaces:
    JCGLContextType, JCGLContextUsableType, JCGLResourceUsableType

      public final class FakeContext
      extends Object
      implements JCGLContextType

  The type of fake contexts.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FakeContext(JCGLImplementationFake i, String in_name, FakeShaderListenerType in_listener)` Construct a context.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `contextDestroy()` Destroy this context.
    `JCGLInterfaceGL33Type` | `contextGetGL33()`
    `JCGLImplementationType` | `contextGetImplementation()`
    `String` | `contextGetName()`
    `List<JCGLContextUsableType>` | `contextGetShares()`
    `boolean` | `contextIsCurrent()`
    `boolean` | `contextIsSharedWith(JCGLContextUsableType c)`
    `void` | `contextMakeCurrent()` Make this context current on the current thread.
    `void` | `contextReleaseCurrent()` Release this context on the current thread.
    `boolean` | `isDeleted()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### FakeContext

          public FakeContext(JCGLImplementationFake i,
                             String in_name,
                             FakeShaderListenerType in_listener)
                      throws JCGLExceptionNonCompliant

      Construct a context.
      Parameters:
        `i` - The implementation
        `in_name` - The name
        `in_listener` - The shader listener
      Throws:
        `JCGLExceptionNonCompliant` - On non-compliant OpenGL implementations

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### contextGetName

          public String contextGetName()

      Specified by:
        `contextGetName` in interface `JCGLContextUsableType`
      Returns:
        The context name, for debugging purposes

    - #### contextGetShares

          public List<JCGLContextUsableType> contextGetShares()

      Specified by:
        `contextGetShares` in interface `JCGLContextUsableType`
      Returns:
        The list of contexts with which this context is shared

    - #### contextIsSharedWith

          public boolean contextIsSharedWith(JCGLContextUsableType c)

      Specified by:
        `contextIsSharedWith` in interface `JCGLContextUsableType`
      Parameters:
        `c` - The context
      Returns:
        `true` iff `c` is shared with this context

    - #### contextIsCurrent

          public boolean contextIsCurrent()

      Specified by:
        `contextIsCurrent` in interface `JCGLContextUsableType`
      Returns:
        `true` iff the current context is current
      See Also:
        `JCGLContextUsableType.contextMakeCurrent()`

    - #### contextMakeCurrent

          public void contextMakeCurrent()

      Description copied from interface: `JCGLContextUsableType`
      Make this context current on the current thread.
      Specified by:
        `contextMakeCurrent` in interface `JCGLContextUsableType`

    - #### contextReleaseCurrent

          public void contextReleaseCurrent()

      Description copied from interface: `JCGLContextUsableType`
      Release this context on the current thread.
      Specified by:
        `contextReleaseCurrent` in interface `JCGLContextUsableType`

    - #### contextGetGL33

          public JCGLInterfaceGL33Type contextGetGL33()

      Specified by:
        `contextGetGL33` in interface `JCGLContextUsableType`
      Returns:
        The OpenGL 3.3 interface for the context

    - #### contextGetImplementation

          public JCGLImplementationType contextGetImplementation()

      Specified by:
        `contextGetImplementation` in interface `JCGLContextUsableType`
      Returns:
        The implementation that owns the context

    - #### contextDestroy

          public void contextDestroy()
                              throws JCGLExceptionDeleted

      Description copied from interface: `JCGLContextType`
      Destroy this context.
      Specified by:
        `contextDestroy` in interface `JCGLContextType`
      Throws:
        `JCGLExceptionDeleted` - If the context is already destroyed

    - #### isDeleted

          public boolean isDeleted()

      Specified by:
        `isDeleted` in interface `JCGLResourceUsableType`
      Returns:
        `true` iff the given resource has been deleted.

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