Top Description Fields Constructors Methods
org.lwjgl.opengl

pack-priv final Class ContextGLES

extends Object
implements Context
Class Inheritance
All Implemented Interfaces
org.lwjgl.opengl.Context
Imports
org.lwjgl.LWJGLException, .LWJGLUtil, .Sys, org.lwjgl.opengles.EGLContext, .GLContext, .GLES20, .PowerManagementEventException

Context encapsulates an OpenGL ES context.

This class is thread-safe.

Author
elias_naur
Version
$Revision: 3332 $ $Id: Context.java 3332 2010-04-20 18:21:05Z spasi $

Field Summary

Modifier and TypeField and Description
private final ContextAttribs
private static final ThreadLocal<ContextGLES>
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.

Constructor Summary

AccessConstructor and Description
pack-priv
ContextGLES(DrawableGLES drawable, ContextAttribs attribs, ContextGLES shared_context)

Create a context with the specified peer info and shared context

Method Summary

Modifier and TypeMethod and Description
private boolean
private void
private void
public synchronized void
destroy()

Request destruction of the Context.

public synchronized void
forceDestroy()

Destroy the context.

pack-priv ContextAttribs
pack-priv static ContextGLES
public EGLContext
public synchronized boolean
isCurrent()

Implements org.lwjgl.opengl.Context.isCurrent.

Query whether the context is current
public synchronized void
makeCurrent()

Implements org.lwjgl.opengl.Context.makeCurrent.

Make the context current
public void
releaseCurrent()

Implements org.lwjgl.opengl.Context.releaseCurrent.

Release the current context (if any).
public void
public static void
setSwapInterval(int value)

Set the buffer swap interval.

public static void
swapBuffers()

Swap the buffers on the current context.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextAttribsback to summary
private final ContextAttribs contextAttribs
current_context_localback to summary
private static final ThreadLocal<ContextGLES> current_context_local

The current Context

destroy_requestedback to summary
private boolean destroy_requested
destroyedback to summary
private boolean destroyed

Whether the context has been destroyed

drawableback to summary
private final DrawableGLES drawable

Handle to the native GL rendering context

eglContextback to summary
private final EGLContext eglContext
threadback to summary
private Thread thread

The thread that has this context current, or null.

Constructor Detail

ContextGLESback 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

Method Detail

canAccessback to summary
private boolean canAccess()
checkAccessback to summary
private void checkAccess()
checkDestroyback to summary
private void checkDestroy()
destroyback 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.

forceDestroyback 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.

getContextAttribsback to summary
pack-priv ContextAttribs getContextAttribs()
getCurrentContextback to summary
pack-priv static ContextGLES getCurrentContext()
getEGLContextback to summary
public EGLContext getEGLContext()
isCurrentback to summary
public synchronized boolean isCurrent() throws LWJGLException

Implements org.lwjgl.opengl.Context.isCurrent.

Query whether the context is current

makeCurrentback to summary
public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException

Implements org.lwjgl.opengl.Context.makeCurrent.

Make the context current

releaseCurrentback to summary
public void releaseCurrent() throws LWJGLException, PowerManagementEventException

Implements org.lwjgl.opengl.Context.releaseCurrent.

Release the current context (if any). After this call, no context is current.

releaseDrawableback to summary
public void releaseDrawable() throws LWJGLException

Implements org.lwjgl.opengl.Context.releaseDrawable.

setSwapIntervalback 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.

swapBuffersback to summary
public static void swapBuffers() throws LWJGLException, PowerManagementEventException

Swap the buffers on the current context. Only valid for double-buffered contexts