You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When learning OpenGL, one of the most common sources of bugs you'll encounter is from performing OpenGL API calls with invalid arguments, performing them in the wrong order, or performing calls that assume some OpenGL state that differs from the actual state.
With most well-written C# APIs, you'd get an exception thrown the moment you do something you shouldn't. By default, this doesn't happen with OpenGL, but there are still ways to tell if there are errors:
The easy (but tedious) way
The common way to check for errors is to use GL.GetError() to check for errors, often with a helper method such as the following: