GL_INVALID_ENUM: enum argument out of range.In OpenGL ES 3.0, the available error codes are: To make matters worse, the errors returned by the OpenGL ES API are very broad and they do not always point to an obvious cause. Combined, these limitations make it difficult to determine the cause of an error, and thus it takes longer to find and fix problems. No information is available about when the error was generated. Subsequent errors are detected, but have no effect on the error state and are not reported. The OpenGL ES state only stores a single error, specified to be the first error that is generated. GLenum error = glGetError() // GL_INVALID_FRAMEBUFFER_OPERATION But repeating the first sequence now, does generate an error. GLenum error = glGetError() // GL_NO_ERROR This does not generate any errors either. GlDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, NULL) But since errors may be generated by combinations of state, combining two legal sequences of commands may result in an error whose cause is often less obvious. If errors could only occur due to invalid parameters in an API call, their cause would be relatively obvious. This has two consequences: errors can occur due to combinations of state, and only one error can be recorded. OpenGL ES maintains considerable state, and the current error is part of this state. In this post I will write about how this extension can be used to improve error reporting and make it easier to debug OpenGL ES applications. We recently added support for this extension to the OpenGL ES drivers for the Midgard architecture GPUs. It is already widely adopted for OpenGL, and we expect it will be for OpenGL ES too. The extension is available for both desktop OpenGL and OpenGL ES. This includes, but is not limited to, API errors. Khronos has developed an extension called GL_KHR_debug that provides a mechanism for the graphics driver to notify applications about interesting events. This is a limitation of the API since, in most cases, the driver will know exactly what the problem is, but there is no standard mechanism for giving this information back to the application. It is not always clear when an error is being raised and what the reason for it is. One of the reasons is that the error reporting in the API is not great. Debugging OpenGL ES applications can be challenging for many reasons.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |