On Sunday, 24 April 2016 at 11:03:11 UTC, Lass Safin wrote:
So the question is: Will the GC scan ptr? As you can see, it is a write-only pointer, so reading from it will cause undefined behavior (such as return data which looks like a pointer to data..), and can potentially be reallly slow.
The GC will see that ptr doesn't point to memory managed by the GC and move on.
Do I have to mark it with NO_SCAN each time I call glMapNamedBufferRange?
No, calling setAttr on memory not managed by the GC will do nothing.