Error code on Android device:
--
gles_state_set_error_internal:62: GLES ctx: 0xe097c008, error code:0x500
gles_state_set_error_internal:63: GLES error info:<target> is not an accepted value
The device uses GPU model as adreno 510.
HELP!
Don' t know where to start to figure out this error.
From the error only, it seems that your OpenGL implementation is returning GL_INVALID_ENUM from some operation. However, without providing any source code, it's difficult to understand what you're trying to do and what is failing.
A wild guess though : Are you trying to call glGetTexImage with an invalid value ?
Hi youngxyyx,
Considering your GPU is Adreno, and this is the Mali section of the community, you may have better luck getting a solution to your problem by asking it through Qualcomm's support channels.
Kind Regards,
Michael McGeagh
Thanks for your reply, I've debugged this problem with the MGD, and the error is returned from the call:
glBindTexture(GL_TEXTURE, 0);
And I got thousands of errors per frame.
In the project there is only one place references to the glBindTexture(GL_TEXTURE, 0) :
The opengl doc says :The value zero is reserved to represent the default texture for each texture target.
So I'm not sure what the problem is , and why this line would return an error continuously.
Thanks!
Obviously this is an error made so uncarefully by my collegues. And it costed me so much efforts to figure it out since I'm not familiar with the API.
Thanks again, myy and everybody else.
In OpenGL ES 2.0, the only values accepted as the first argument of glBindTexture are :
Any other value will generate an GL_INVALID_ENUM (0x500) error.
One way to load a texture is to :
Then, once a program linked :
When using the program, you can then bind the uniform variable of your fragment shader to the current texture unit used by calling :
glUniform1i(your_texture_uniform_value_id, 0); /* Or the number suffixed to GL_TEXTUREi in your previous glActiveTexture call */
Since I'm still learning the thing, there might be unnecessary steps in this explanation. However, this is how I currently load textures in my OpenGL ES 2.0 program.
Accurate informations on these different calls can be obtained from the official manual pages.
Minor edit : glUniform1i(your_texture_uniform_value_id, GL_TEXTUREi) was invalid. I thought that GL_TEXTURE0 would be defined as 0x0, but it is not and its use as a sampler ID in a fragment shader leads to undefined behaviour.
View all questions in Graphics and Gaming forum