@UIEffect private String getGLVersion(boolean es) { String fullVersion; String renderer; if (es) { GLES.createCapabilities(); fullVersion = GLES20.glGetString(GLES20.GL_VERSION); renderer = GLES20.glGetString(GLES20.GL_RENDERER); } else { GL.createCapabilities(); fullVersion = GL11.glGetString(GL11.GL_VERSION); renderer = GL11.glGetString(GL11.GL_RENDERER); } log.info("{}", fullVersion); log.info("{}", renderer); String version = fullVersion.split(" ", 2)[0]; return version; }
/** * 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); }