本文整理匯總了Java中javax.microedition.khronos.opengles.GL10.glFinish方法的典型用法代碼示例。如果您正苦於以下問題:Java GL10.glFinish方法的具體用法?Java GL10.glFinish怎麽用?Java GL10.glFinish使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.microedition.khronos.opengles.GL10
的用法示例。
在下文中一共展示了GL10.glFinish方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: LoadTextures
import javax.microedition.khronos.opengles.GL10; //導入方法依賴的package包/類
/**
* Load all the textures
*
* @param gl
*/
public void LoadTextures(GL10 gl) {
int sampleSize = 1;
boolean success = false;
boolean changed = false;
do {
try {
for (Texture texture : textures) {
if (texture != null) {
if (texture.shouldLoad()) {
texture.loadGLTexture(gl);
changed = true;
} else if (texture.shouldUnload()) {
unloadGraphic(gl, texture);
changed = true;
} else if (texture.shouldRemove()) {
unloadGraphic(gl, texture);
textures.remove(texture);
numGFX--;
changed = true;
}
}
}
success = true;
} catch (OutOfMemoryError e) {
sampleSize++;
Log.e("BobEngine", "Not enough memory. Retrying in sample size " + Integer.toString(sampleSize));
success = false;
}
} while (!success); // Try again
if (changed) gl.glFinish();
}