Context encapsulates an OpenGL ES context.
This class is thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private final ContextAttribs | |
| private static final ThreadLocal | current_context_local
The current Context |
| private boolean | |
| private boolean | destroyed
Whether the context has been destroyed |
| private final DrawableGLES | drawable
Handle to the native GL rendering context |
| private final EGLContext | |
| private Thread | thread
The thread that has this context current, or null. |
| Access | Constructor and Description |
|---|---|
| pack-priv | ContextGLES(DrawableGLES drawable, ContextAttribs attribs, ContextGLES shared_context)
Create a context with the specified peer info and shared context |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private void | |
| private void | |
| public synchronized void | |
| public synchronized void | |
| pack-priv ContextAttribs | |
| pack-priv static ContextGLES | |
| public EGLContext | |
| public synchronized boolean | |
| public synchronized void | |
| public void | releaseCurrent()
Implements org. |
| public void | |
| public static void | |
| public static void |
| contextAttribs | back to summary |
|---|---|
| private final ContextAttribs contextAttribs | |
| current_context_local | back to summary |
|---|---|
| private static final ThreadLocal<ContextGLES> current_context_local The current Context | |
| destroy_requested | back to summary |
|---|---|
| private boolean destroy_requested | |
| destroyed | back to summary |
|---|---|
| private boolean destroyed Whether the context has been destroyed | |
| drawable | back to summary |
|---|---|
| private final DrawableGLES drawable Handle to the native GL rendering context | |
| eglContext | back to summary |
|---|---|
| private final EGLContext eglContext | |
| thread | back to summary |
|---|---|
| private Thread thread The thread that has this context current, or null. | |
| ContextGLES | back to summary |
|---|---|
| pack-priv ContextGLES(DrawableGLES drawable, ContextAttribs attribs, ContextGLES shared_context) throws LWJGLException Create a context with the specified peer info and shared context | |
| canAccess | back to summary |
|---|---|
| private boolean canAccess() | |
| checkAccess | back to summary |
|---|---|
| private void checkAccess() | |
| checkDestroy | back to summary |
|---|---|
| private void checkDestroy() | |
| destroy | back to summary |
|---|---|
| public synchronized void destroy() throws LWJGLException Request destruction of the Context. If the context is current, no context will be current after this call. The context is destroyed when no thread has it current. | |
| forceDestroy | back to summary |
|---|---|
| public synchronized void forceDestroy() throws LWJGLException Destroy the context. This method behaves the same as destroy() with the extra requirement that the context must be either current to the current thread or not current at all. | |
| getContextAttribs | back to summary |
|---|---|
| pack-priv ContextAttribs getContextAttribs() | |
| getCurrentContext | back to summary |
|---|---|
| pack-priv static ContextGLES getCurrentContext() | |
| getEGLContext | back to summary |
|---|---|
| public EGLContext getEGLContext() | |
| isCurrent | back to summary |
|---|---|
| public synchronized boolean isCurrent() throws LWJGLException Implements org. Query whether the context is current | |
| makeCurrent | back to summary |
|---|---|
| public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException Implements org. Make the context current | |
| releaseCurrent | back to summary |
|---|---|
| public void releaseCurrent() throws LWJGLException, PowerManagementEventException Implements org. Release the current context (if any). After this call, no context is current. | |
| releaseDrawable | back to summary |
|---|---|
| public void releaseDrawable() throws LWJGLException Implements org. | |
| setSwapInterval | back to summary |
|---|---|
| public static void setSwapInterval(int value) Set the buffer swap interval. This call is a best-attempt at changing the monitor swap interval, which is the minimum periodicity of color buffer swaps, measured in video frame periods, and is not guaranteed to be successful. A video frame period is the time required to display a full frame of video data. | |
| swapBuffers | back to summary |
|---|---|
| public static void swapBuffers() throws LWJGLException, PowerManagementEventException Swap the buffers on the current context. Only valid for double-buffered contexts | |