Reputation: 4501
right at the begin of my _tWinMain function i call twice glGetError()
both return 1282 (invalid operation)
the manual says that the function generates invalid operation error if it's called within Begin/End, but this is not the case here.
Is it only legal to call glGetError after some steps were performed (like initializing context or something like that) ?
Upvotes: 1
Views: 2698
Reputation: 162327
glGetError returns the error state of the currently bound OpenGL render context. If there is no context bound, the result of calling glGetError are undefined, i.e. it's a invalid operation at that point.
Upvotes: 2