public final class JCGLImplementationLWJGL3 extends Object implements JCGLImplementationLWJGL3Type
JCGLImplementationLWJGL3Type
interface.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.
|
public static JCGLImplementationLWJGL3Type getInstance()
public JCGLContextType newUnsharedContextFrom(long context, String name) throws JCGLException, JCGLExceptionUnsupported, JCGLExceptionNonCompliant
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.
newUnsharedContextFrom
in interface JCGLImplementationLWJGL3Type
context
- An existing contextname
- The name assigned to the context, for debugging purposesJCGLException
- On errorsJCGLExceptionUnsupported
- If the context is of a version that is
not supportedJCGLExceptionNonCompliant
- If the context violates the OpenGL
specificationpublic com.io7m.jfunctional.Pair<JCGLContextType,JCGLContextType> newSharedContextsFrom(long master_context, String master_name, long slave_context, String slave_name) throws JCGLException, JCGLExceptionUnsupported, JCGLExceptionNonCompliant
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.
newSharedContextsFrom
in interface JCGLImplementationLWJGL3Type
master_context
- An existing contextmaster_name
- The name assigned to the master context, for
debugging purposesslave_context
- An existing slave contextslave_name
- The name assigned to the slave context, for debugging
purposesJCGLException
- On errorsJCGLExceptionUnsupported
- If the context is of a version that is
not supportedJCGLExceptionNonCompliant
- If the context violates the OpenGL
specificationCopyright © 2017 <code@io7m.com> http://io7m.com