本文整理匯總了Java中android.opengl.GLU.gluErrorString方法的典型用法代碼示例。如果您正苦於以下問題:Java GLU.gluErrorString方法的具體用法?Java GLU.gluErrorString怎麽用?Java GLU.gluErrorString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.opengl.GLU
的用法示例。
在下文中一共展示了GLU.gluErrorString方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: checkError
import android.opengl.GLU; //導入方法依賴的package包/類
public static void checkError(GL10 gl) {
if (AphidLog.ENABLE_DEBUG) {
int error = gl.glGetError();
if (error != 0) {
throw new RuntimeException(GLU.gluErrorString(error));
}
}
}
示例2: checkGLError
import android.opengl.GLU; //導入方法依賴的package包/類
public void checkGLError(String ex) {
int error = GLES20.glGetError();
if (error != GLES20.GL_NO_ERROR)
{
String description = GLU.gluErrorString(error);
RajLog.e(ex + "[" + error + "]: " + description);
throw new RuntimeException(ex + "[" + error + "]: " + description);
}
}
示例3: getErrorString
import android.opengl.GLU; //導入方法依賴的package包/類
private static String getErrorString(final int pError) {
String errorString = GLU.gluErrorString(pError);
if (errorString == null) {
errorString = "Unknown error '0x" + Integer.toHexString(pError) + "'.";
}
return errorString;
}
示例4: getErrorString
import android.opengl.GLU; //導入方法依賴的package包/類
private static String getErrorString(final int pError) {
String errorString = GLU.gluErrorString(pError);
if(errorString == null) {
errorString = "Unknown error '0x" + Integer.toHexString(pError) + "'.";
}
return errorString;
}
示例5: checkGLError
import android.opengl.GLU; //導入方法依賴的package包/類
public void checkGLError(String ex) {
int error = GLES20.glGetError();
if (error != GLES20.GL_NO_ERROR)
{
String description = GLU.gluErrorString(error);
throw new RuntimeException(ex + ": " + description);
}
}
示例6: getErrorString
import android.opengl.GLU; //導入方法依賴的package包/類
private static String getErrorString(int paramInt)
{
String str = GLU.gluErrorString(paramInt);
if (str == null)
str = "Unknown error 0x" + Integer.toHexString(paramInt);
return str;
}
示例7: checkGlError
import android.opengl.GLU; //導入方法依賴的package包/類
/**
* Checks if any of the GL calls since the last time this method was called set an error
* condition. Call this method immediately after calling a GL method. Pass the name of the GL
* operation. For example:
*
* <pre>
* mColorHandle = GLES20.glGetUniformLocation(mProgram, "uColor");
* MyGLRenderer.checkGlError("glGetUniformLocation");</pre>
*
* If the operation is not successful, the check throws an exception.
*
* <p><em>Note</em> This is quite slow so it's best to use it sparingly in production builds.
*
* @param glOperation name of the OpenGL call to check
*/
private static void checkGlError(String glOperation) {
int error = GLES20.glGetError();
if (error != GLES20.GL_NO_ERROR) {
String errorString = GLU.gluErrorString(error);
if (errorString == null) {
errorString = GLUtils.getEGLErrorString(error);
}
String message = glOperation + " caused GL error 0x" + Integer.toHexString(error) +
": " + errorString;
Log.e(TAG, message);
throw new RuntimeException(message);
}
}