Timeline for OpenGL 4.5 Core Buffer wrapper
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 23, 2018 at 0:35 | comment | added | Nicol Bolas | @demiralp: "but does not feel natural either" "natural" is in the eye of the beholder. In a post-C++11 world, to me, providing a copy constructor implies "copying me is cheap." That is emphatically not the case for buffer objects or texture objects. Accidentally provoking such an expensive operation is too great a risk. This is a big part of why we have move-only types: for types where movement is not a reasonable option. | |
Apr 22, 2018 at 23:59 | comment | added | demiralp | - I kept the copy constructor as it is because it pairs the C++ semantic and the OpenGL semantic together. Deleting the copy constructor as you said and providing something like clone() is an option, but I feel it is not as natural to use. - Fixing the non-explicit from uints now. - Managed construction: I think "you allocate it - you free it" is a sensible idea. Although it is convenient for the library to provide both managed and unmanaged options. I am creating an issue for this. Thank you again. | |
Apr 21, 2018 at 17:15 | comment | added | Nicol Bolas |
@demiralp: I see no evidence that "most of" what I said was addressed. You still have a copy constructor that does a hugely expensive operation. You still have non-explicit construction from unsigned integers. You didn't provide managed construction from an existing object. The only things you addressed were the moves being broken and having the buffer binding type as a template parameter.
|
|
Apr 21, 2018 at 16:48 | comment | added | demiralp | Hello, thank you for all the criticism. I believe I addressed most of them here: github.com/acdemiralp/gl . It might still be imperfect, and any further improvements are welcome as issues :) | |
Apr 21, 2018 at 16:41 | vote | accept | demiralp | ||
Nov 2, 2017 at 2:47 | history | answered | Nicol Bolas | CC BY-SA 3.0 |