Thomas added a spiffy new protocol to ctypes to allow for registering error-checking functions for a ctypes cFunction. It's a pretty simple protocol, just assign to the errcheck attribute of the cFunction a function with a signature like so:
"""Return final result or raise error"""
With that it's possible to get rid of one of the OpenGL-ctypes wrapper classes, and simplify the other one so that it assumes that the error-checking will occur at the ctypes level and catches errors as they occur to annotate them with more information about the calling context.
Anyway, just about time I head to bed. Visiting grams a day earlier than normal (just for a change).
Pingbacks are closed.