I'm home again after a little trip south to visit some friends and family. During that time I've tried to do some work but to no avail. I've gotten a lot of reading done, but very little code has been made. I've got an OpenGL interop example in the working, I'll wrap that up and push it to my repo after the weekend. Finally I have to do some refactoring. After that I'm gonna work on some multicore code. Currently I've got plans for some basic thread safe data structures and a thread pool. Stuff anyone could create really, but useful to have. This project is kind of aimed towards my game engine after all.
My code so far only encapsulates a little of what the Khronos C++ wrapper API already does. But I'm okey with that. When I first started I didn't know so much about it and the more I've looked into it I realize that the wrapper API is kind of what I wanted to do. So far I've done some code to make it easier to use, that's all. "Easier" - not "Simpler". If you havn't seen Rich Hickeys talk on differentiating simple from easy, I suggest you go look at it right now, it's really good. Go ahead, this post will still be here when you're done.
I argue that you can't really make the OpenCL API any simpler, only easier to get started with. To make that happen I've been following a few simple points:
-
Explicit is better than implicit.
-
Provide sensible defaults.
-
Official API interoperability. The first point means I don't overload operators to do magic behind the scenes. This makes it easy to know when data is transferred. The second point means that the process of creating a context is several lines of official api code, but only one line with Ocius. This is because most computers are the same. (I want to do more work on this in the future however). The last point means I only wrap the most basic stuff, like reading and writing entire Buffers. If you want SubBuffers you'll have to do it yourself, but I do provide the access necessary to do it.
So yeah, that's what's on my mind right now. I'm a little disappointed in what I've been able to do so far, really I'm not impressed by my 500 lines of wrapper code. I hope that'll change during the course of this month.