2011/11/18 Levente Uzonyi <leves@elte.hu>:
On Fri, 18 Nov 2011, Igor Stasenko wrote:
2011/11/18 Levente Uzonyi <leves@elte.hu>:
On Thu, 17 Nov 2011, Javier Pimás wrote:
We are advancing on making OpenGL work with NativeBoost right now. If you have to write an app that uses OpenGL now, I would strongly recommend you to use NBOpenGL. It's
I see the hype about NBOpenGL, but I don't see how is it better than the FFI based OpenGL implementation. Can someone shed some light on it?
The marshalling code is faster. It also deals nice with per-context
Why is it faster? Can you give me some pointers?
it is faster because marshalling code generated for each concrete call. if your function expects int agrument, then it will generate code for converting smalltalk object to int. FFI plugin, however first have to read the function signature(s) and only then pick appropriate conversion.
feature availability (depending on context you created, some functions may be availabale, some not). And it contains a lot of extensions (over 3000 OpenGL functions), up to version 3.1 , because all functions are automatically generated from specs taken from official source. A future versions of OpenGL is easy to use: you just regenerate sources from specs.
I also plan to integrate it with JIT, so when you invoking a method with native code, it will just run this code without extra checks and popping out of 'jit' mode.
It seems to me that besides the marshalling part, everything can/could be done with FFI too. Am I right?
maybe. with even more expense. Imagine that you have two instances of OpenGLApi, where one should fail on some functions and don't try to call them (because it could lead to crash), while other not.
Levente
-- Best regards, Igor Stasenko.