Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork177
-
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. |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 4 comments 4 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
If |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
|
BetaWas this translation helpful?Give feedback.
All reactions
-
OpenGL has too many quirks unfortunately. I would let the consumer of the bindings decide how and if they want to wrap it somehow to make it more tolerable. But let's see what the other frogs have to say. |
BetaWas this translation helpful?Give feedback.
All reactions
-
You may be right. Are there any specific quirks you think are going to be particularly problematic? |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
While I wholeheartedly agree and have used the same argument in the past, I believe in the value of fluency that the wrapper layer offers. It's what drew me to The goal should be a paper thin wrapper, not a comprehensive abstraction. And I'm certain that some compromises would have to be made to allow leeway for the 'quirks' of the API. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Any interest in discussing this further? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Error handling design discussionzig-gamedev/zopengl#15 |
BetaWas this translation helpful?Give feedback.
All reactions
-
Some breaking API changes happened (it was me, let me know if you disagree with any decisions here): |
BetaWas this translation helpful?Give feedback.