-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glErrors #45
Comments
Cheers Arjan, I'll investigate. |
Not sure if it is related, but I always get these two errors: 05-31 10:36:11.595: E/Adreno200-ES20(3132): <process_gl_state_enables:456>: GL_INVALID_ENUM The former always comes before 05-31 10:36:32.665: D/Rajawali(3132): Creating OpenGL ES 2.0 context |
I found at least some source of these errors. In OpenGL ES 2.0 it is no longer required to glEnable(GL_TEXTURE2D) In fact is is no longer allowed and will throw a GL_INVALID_ENUM error (as described in 2.0 spec: http://www.khronos.org/opengles/sdk/docs/man/) The problem i found was in AMaterial;.bindTextures(). I did not search further, but i assume similar openGL ES 1.x style calls may be presesent in your code. If you would be so kind to fix them it would be greatly appreciated as i enjoy using your framework. |
In relation to my last comment: In fact the bind and unbind functions in AMaterial can be completely removed, as well as a call to enable/disable a cubemap texture (search for glEnable to locate it). After removing these calls i also noticed a lot of errors when pausing/resuming the app. In BaseObject3D.render() there is a call to mMaterial.useProgram(); which results in an INVALID_VALUE error. I think there might be something wrong when an app is resumed such that the program is not re-created. |
Awesome, thanks for investigating :-) I'll try to make the changes today. |
Great! Btw, for faster bug hunting i added the following class public class Test {
public static void checkError(StackTraceElement stackTraceElement) {
int error;
while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
Log.v(stackTraceElement.getClassName()+"."+stackTraceElement.getMethodName()+":"+ stackTraceElement.getLineNumber(), "glError: " + GLU.gluErrorString(error));
}
}
} And added lots of these calls to the code: Test.checkError(Thread.currentThread().getStackTrace()[2]); It makes it easier to quickly locate the source of errors. Good luck finding the bugs. |
I'm working on this, but I'm running out of time. Will continue working on this after the weekend. |
I am trying to use your framework. When using it i noticed getting a lot of glErrors.
You don't check for glErrors in your code every frame, but if you add a check in your rendering loop as such:
You will notice the errors. (I tried this in your model loading example)
I unfortunately did not yet have time to pinpoint the cause of these messages, but wanted to make you aware of them.
The text was updated successfully, but these errors were encountered: