Re: GL.BufferObjects patch request (1-liner)
Neal Alexander <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.hopengl |
|---|---|
| Message-ID | <[email protected]> |
Sven Panne wrote: > OK, this would really be easy and I have no objections. But I would really > like to understand why withMappedBuffer is not sufficient. Could you please > post some code snippets plus an explanation? Leaving a buffer mapped without a > matching unmapping sounds a bit strange at first, but I am really willing to > learn and improve the buffer API. > If you use a single thread for OpenGL, but want to offload resource loading to a worker thread, you can mapBuffer in the GL thread then send the pointer to a worker thread (no GL context), then queue the unmapBuffer in the GL thread. withMappedBuffer locks everything into the calling thread. > I am thinking about a new version of my OpenGL binding, which supports only > OpenGL 3.x features, without any deprecated API entries/constants. This would > be much smaller and probably a bit nicer, but at the price of losing backwards > compatibility. Nice. It would probably work fine to have a separate package for OGL3 stuff and let people use the old one if they need compatibility.