本文整理汇总了Java中org.lwjgl.opengles.GLES20类的典型用法代码示例。如果您正苦于以下问题:Java GLES20类的具体用法?Java GLES20怎么用?Java GLES20使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GLES20类属于org.lwjgl.opengles包,在下文中一共展示了GLES20类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGLVersion
import org.lwjgl.opengles.GLES20; //导入依赖的package包/类
@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;
}
示例2: destroy
import org.lwjgl.opengles.GLES20; //导入依赖的package包/类
/**
* 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);
}