Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crude sketch of auto error checking - please help improve #50

Merged
merged 4 commits into from Apr 8, 2017

Conversation

wchristian
Copy link
Collaborator

This implements the features from #44. That one could probably be closed and further discussion/work done here?

  • glpCheckErrors(): XS-accelerated glGetErrors which automatically loops, warns individual error ids, and croaks if any occurred
  • glpSetAutoCheckErrors(1|0): enables running of glpCheckErrors before and after every GL call, in XS

Problems so far:

  • gluGetErrorString is missing, so the individual warns just dump the number
  • i couldn't figure out how to wrap the glpCheckErrors code into a C function that could be called from all the gl calls, so right now it copies the block twice for every call, probably not great
  • probably missed a bunch of potential problems

Observation from running it in Microidium:

  • no noticable performance impact difference between OpenGL::Modern master and this branch
  • no noticable performance impact difference from having the auto-checking on, which is a little strange, but it works

@devel-chm devel-chm merged commit 9257866 into master Apr 8, 2017
@devel-chm devel-chm deleted the glGetError_auto branch April 8, 2017 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants