cginternals / globjects

C++ library strictly wrapping OpenGL objects.
https://globjects.org
MIT License
538 stars 59 forks source link

Bound Objects Cache #235

Closed scheibel closed 5 years ago

scheibel commented 10 years ago

Supported by https://github.com/hpicgs/glbinding/issues/26.

scheibel commented 10 years ago

Further instructions: Add a registry that provides informations whether a given object is currently bound to a target (if the current type of object can be bound to a target) and an optional index - without bothering to ask the driver. This registry should use the per-function-callbacks of glbinding (tbd) to detect when a binding changes. It should be assumed, that all changes to bindings can be captured using the callback-mechanism from glbinding.

In addition, provide an interface to disable the callbacks and the caching, so (hopefully) that the application can run with no performance impact if this registry isn't used.

cgcostume commented 5 years ago

i would instead prefer some kind of static analysis as a post compile step for this. Same for webgl-operate, we probably should not track binding states.