Java 类org.lwjgl.opengles.GLContext 实例源码

项目:Wolf_game    文件:ContextGLES.java   
/**
 * 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.
 */
public synchronized void destroy() throws LWJGLException {
    if ( destroyed )
        return;
    destroy_requested = true;
    boolean was_current = isCurrent();
    int error = GLES20.GL_NO_ERROR;
    if ( was_current ) {
        if ( org.lwjgl.opengles.GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGLES20 )
            error = GLES20.glGetError();

        try {
            releaseCurrent();
        } catch (PowerManagementEventException e) {
            // Ignore
        }
    }
    checkDestroy();
    if ( was_current && error != GLES20.GL_NO_ERROR )
        throw new OpenGLException(error);
}
项目:GPVM    文件:ContextGLES.java   
/**
 * 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.
 */
public synchronized void destroy() throws LWJGLException {
    if ( destroyed )
        return;
    destroy_requested = true;
    boolean was_current = isCurrent();
    int error = GLES20.GL_NO_ERROR;
    if ( was_current ) {
        if ( org.lwjgl.opengles.GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGLES20 )
            error = GLES20.glGetError();

        try {
            releaseCurrent();
        } catch (PowerManagementEventException e) {
            // Ignore
        }
    }
    checkDestroy();
    if ( was_current && error != GLES20.GL_NO_ERROR )
        throw new OpenGLException(error);
}
项目:GPVM    文件:ContextGLES.java   
/**
 * 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.
 */
public synchronized void destroy() throws LWJGLException {
    if ( destroyed )
        return;
    destroy_requested = true;
    boolean was_current = isCurrent();
    int error = GLES20.GL_NO_ERROR;
    if ( was_current ) {
        if ( org.lwjgl.opengles.GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGLES20 )
            error = GLES20.glGetError();

        try {
            releaseCurrent();
        } catch (PowerManagementEventException e) {
            // Ignore
        }
    }
    checkDestroy();
    if ( was_current && error != GLES20.GL_NO_ERROR )
        throw new OpenGLException(error);
}
项目:SpaceStationAlpha    文件:ContextGLES.java   
/**
 * 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.
 */
public synchronized void destroy() throws LWJGLException {
    if ( destroyed )
        return;
    destroy_requested = true;
    boolean was_current = isCurrent();
    int error = GLES20.GL_NO_ERROR;
    if ( was_current ) {
        if ( org.lwjgl.opengles.GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGLES20 )
            error = GLES20.glGetError();

        try {
            releaseCurrent();
        } catch (PowerManagementEventException e) {
            // Ignore
        }
    }
    checkDestroy();
    if ( was_current && error != GLES20.GL_NO_ERROR )
        throw new OpenGLException(error);
}
项目:TeacherSmash    文件:ContextGLES.java   
/**
 * 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.
 */
public synchronized void destroy() throws LWJGLException {
    if ( destroyed )
        return;
    destroy_requested = true;
    boolean was_current = isCurrent();
    int error = GLES20.GL_NO_ERROR;
    if ( was_current ) {
        if ( org.lwjgl.opengles.GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGLES20 )
            error = GLES20.glGetError();

        try {
            releaseCurrent();
        } catch (PowerManagementEventException e) {
            // Ignore
        }
    }
    checkDestroy();
    if ( was_current && error != GLES20.GL_NO_ERROR )
        throw new OpenGLException(error);
}
项目:3d-Demo    文件:ContextGLES.java   
/**
 * 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.
 */
public synchronized void destroy() throws LWJGLException {
    if ( destroyed )
        return;
    destroy_requested = true;
    boolean was_current = isCurrent();
    int error = GLES20.GL_NO_ERROR;
    if ( was_current ) {
        if ( org.lwjgl.opengles.GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGLES20 )
            error = GLES20.glGetError();

        try {
            releaseCurrent();
        } catch (PowerManagementEventException e) {
            // Ignore
        }
    }
    checkDestroy();
    if ( was_current && error != GLES20.GL_NO_ERROR )
        throw new OpenGLException(error);
}
项目:Wolf_game    文件:ContextGLES.java   
/** Release the current context (if any). After this call, no context is current. */
public void releaseCurrent() throws LWJGLException, PowerManagementEventException {
    eglReleaseCurrent(drawable.getEGLDisplay());
    org.lwjgl.opengles.GLContext.useContext(null);
    current_context_local.set(null);

    synchronized ( this ) {
        thread = null;
        checkDestroy();
    }
}
项目:Wolf_game    文件:ContextGLES.java   
/** Make the context current */
public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException {
    checkAccess();
    if ( destroyed )
        throw new IllegalStateException("Context is destroyed");
    thread = Thread.currentThread();
    current_context_local.set(this);
    eglContext.makeCurrent(drawable.getEGLSurface());
    org.lwjgl.opengles.GLContext.useContext(this);
}
项目:GPVM    文件:ContextGLES.java   
/** Release the current context (if any). After this call, no context is current. */
public void releaseCurrent() throws LWJGLException, PowerManagementEventException {
    eglReleaseCurrent(drawable.getEGLDisplay());
    org.lwjgl.opengles.GLContext.useContext(null);
    current_context_local.set(null);

    synchronized ( this ) {
        thread = null;
        checkDestroy();
    }
}
项目:GPVM    文件:ContextGLES.java   
/** Make the context current */
public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException {
    checkAccess();
    if ( destroyed )
        throw new IllegalStateException("Context is destroyed");
    thread = Thread.currentThread();
    current_context_local.set(this);
    eglContext.makeCurrent(drawable.getEGLSurface());
    org.lwjgl.opengles.GLContext.useContext(this);
}
项目:GPVM    文件:ContextGLES.java   
/** Release the current context (if any). After this call, no context is current. */
public void releaseCurrent() throws LWJGLException, PowerManagementEventException {
    eglReleaseCurrent(drawable.getEGLDisplay());
    org.lwjgl.opengles.GLContext.useContext(null);
    current_context_local.set(null);

    synchronized ( this ) {
        thread = null;
        checkDestroy();
    }
}
项目:GPVM    文件:ContextGLES.java   
/** Make the context current */
public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException {
    checkAccess();
    if ( destroyed )
        throw new IllegalStateException("Context is destroyed");
    thread = Thread.currentThread();
    current_context_local.set(this);
    eglContext.makeCurrent(drawable.getEGLSurface());
    org.lwjgl.opengles.GLContext.useContext(this);
}
项目:SpaceStationAlpha    文件:ContextGLES.java   
/** Release the current context (if any). After this call, no context is current. */
public void releaseCurrent() throws LWJGLException, PowerManagementEventException {
    eglReleaseCurrent(drawable.getEGLDisplay());
    org.lwjgl.opengles.GLContext.useContext(null);
    current_context_local.set(null);

    synchronized ( this ) {
        thread = null;
        checkDestroy();
    }
}
项目:SpaceStationAlpha    文件:ContextGLES.java   
/** Make the context current */
public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException {
    checkAccess();
    if ( destroyed )
        throw new IllegalStateException("Context is destroyed");
    thread = Thread.currentThread();
    current_context_local.set(this);
    eglContext.makeCurrent(drawable.getEGLSurface());
    org.lwjgl.opengles.GLContext.useContext(this);
}
项目:TeacherSmash    文件:ContextGLES.java   
/** Release the current context (if any). After this call, no context is current. */
public void releaseCurrent() throws LWJGLException, PowerManagementEventException {
    eglReleaseCurrent(drawable.getEGLDisplay());
    org.lwjgl.opengles.GLContext.useContext(null);
    current_context_local.set(null);

    synchronized ( this ) {
        thread = null;
        checkDestroy();
    }
}
项目:TeacherSmash    文件:ContextGLES.java   
/** Make the context current */
public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException {
    checkAccess();
    if ( destroyed )
        throw new IllegalStateException("Context is destroyed");
    thread = Thread.currentThread();
    current_context_local.set(this);
    eglContext.makeCurrent(drawable.getEGLSurface());
    org.lwjgl.opengles.GLContext.useContext(this);
}
项目:3d-Demo    文件:ContextGLES.java   
/** Release the current context (if any). After this call, no context is current. */
public void releaseCurrent() throws LWJGLException, PowerManagementEventException {
    eglReleaseCurrent(drawable.getEGLDisplay());
    org.lwjgl.opengles.GLContext.useContext(null);
    current_context_local.set(null);

    synchronized ( this ) {
        thread = null;
        checkDestroy();
    }
}
项目:3d-Demo    文件:ContextGLES.java   
/** Make the context current */
public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException {
    checkAccess();
    if ( destroyed )
        throw new IllegalStateException("Context is destroyed");
    thread = Thread.currentThread();
    current_context_local.set(this);
    eglContext.makeCurrent(drawable.getEGLSurface());
    org.lwjgl.opengles.GLContext.useContext(this);
}