Replies: 4 comments 4 replies
-
If |
Beta Was this translation helpful? Give feedback.
-
Any interest in discussing this further? |
Beta Was this translation helpful? Give feedback.
-
Error handling design discussion zig-gamedev/zopengl#15 |
Beta Was this translation helpful? Give feedback.
-
Some breaking API changes happened (it was me, let me know if you disagree with any decisions here): |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Pasteing discussion from Discord to start the discussion here...
The wrapper "forwards" types defined by the bindings. A wrapper user shouldn't need to access any definitions from bindings.zig directly.
Ideally functions should only take enums sets where all the members are valid for that function. Note that for some functions enum types are defined inline. And there are probably some mistakes present currently. From the opposite angle wrapper.meta.mergeEnums can be used to merge enum sets.
Slices should be preferred to pointer+len unless that prevents some functionality. For example glBufferData can be passed a size and a nullptr to allocate memory of size but not write to it.
The current convention is that gen* procs return by reference and create* procs return by value. For get* procs I'm not sure what is best, there is an argument for both.
Beta Was this translation helpful? Give feedback.
All reactions