I then call glCreateShader(), and it returns 0. I then call glClearColor() and glClear(), and neither of them generates a GL error. I go through the dispmanx setup code, which works fine. I would suggest a more pragmatic approach is to put them sparingly throughout your code (at the end of your functions for example), and only add extra ones to home in on the cause if any errors are detected.įWIW, I have what seems to be this same issue. So if the OP got "GL_NO_ERROR" there is no point in adding any more calls to glGetError as no errors have occurred. There has been no detectable error since the last call to glGetError, If a call to glGetError returns GL_NO_ERROR, No other errors are recorded until glGetError is called, the error code is returned,Īnd the flag is reset to GL_NO_ERROR. When an error occurs, the error flag is set to the appropriate error code value. GlGetError returns the value of the error flag.Įach detectable error is assigned a numeric code and symbolic name. The behaviour (according to the link you posted) is that the first error to occur sets the flag and subsequent errors don't. Which is why I stated glGetError should be called after every gl function call. More than likely something has failed prior to that. Code: Select all shader = glCreateShader ( type )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |