dwmkerr / sharpgl

Use OpenGL in .NET applications. SharpGL wraps all modern OpenGL features and offers a powerful scene graph to aid development.
MIT License
768 stars 300 forks source link

Modifies error checking code in OpenGL.cs to accommodate multiple err… #214

Closed ftlPhysicsGuy closed 1 year ago

ftlPhysicsGuy commented 1 year ago

…ors. Also, if a PreGLCall is made before calling a closing PostGLCall, that could leave unreported errors that this new modification will now report.

This modification accounts for the fact that OpenGL calls can set multiple error flags. It follows instructions given in OpenGL documentation: "Thus, glGetError should always be called in a loop, until it returns GL_NO_ERROR, if all error flags are to be reset."

This is one of several modifications I make to the SharpGL source code any time I download the latest version for use in my projects. I intent to put out individual pull requests for each of them, hoping to improve the project for all. Thank you for your consideration.

codecov[bot] commented 1 year ago

Codecov Report

Merging #214 (2565dd2) into master (a37721c) will not change coverage. The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #214   +/-   ##
======================================
  Coverage    3.16%   3.16%           
======================================
  Files          90      90           
  Lines        3697    3697           
  Branches      657     657           
======================================
  Hits          117     117           
  Misses       3575    3575           
  Partials        5       5           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more