On 1 April 2016 at 13:23, Thibault Raffaillac <thibault.raffail...@inria.fr>
wrote:

> There's (hopefully!) no question of throwing it away already. That
> represents too much work, and pretty good design choices IMO. Yet I'm still
> pretty new to Pharo/Smalltalk so simply need time. At the moment I am only
> practicing on a GLFW binding.
> Now, I do believe in OpenGL and hardware rendering in general (vs software
> & framebuffer stuff), but these APIs are constantly evolving (with
> hardware, market needs, ...), with driver manufacturers having little care
> about backward compatibility. This means in that sea of innovations we have
> to spot the few key technologies which are going to last long enough to be
> still in use by the time they reach Pharo users (think of tesselation, or
> geometry shaders, hardly heard of nowadays). OpenGL ES 2 is such a key
> tech, I think, for its wide adoption in Android, iOS, RasPi. Still, there
> is no doubt it is going to be ditched too in a decade or so (command
> buffers are already being reintroduced in Vulkan...), and then in Pharo.
> With that in mind, my point is to make it as few and small classes as
> possible, to make it easier (and faster!) to ditch them later when a new
> key tech arises.
> That said, I'm looking for least effort solution, so will still strive to
> replace NB with UFFI in generator.
>
>
Hi, Thibault.. don't get me wrong: i am fully supporting any effort to
bring cool and fast and fancy graphics tech to Pharo.
So, nice to hear from you!

There's not much effort in generating calls to numerous GL function - it
just a matter of parsing opengl spec and producing appropriate smalltalk
code out of it..
The main hurdle, i guess, you may find is service code and GL context
wrappers i made to handle extension(s) and dealing with the fact that
different extensions may or may not be available depending what kind of
context you created. I did it by instantiating a table of function pointers
and making a specialized custom ffi callout mechanism, that instead of
standard way - looking up for a function pointer once and for the rest of
session, doing it individually on a per-context basis. That ensures that
you can use different contexts safely without risk of calling a function
that is not supported in current context while it was supported in another
context, one that you used just before.
I don't know how you could preserve such kind of functionality in UFFI..
the only thing i know is that you are much more limited in choice. Sure it
could be done.. but would it be as efficient as before (just one extra
pointer lookup in table of pointers before making a call)?
So, that's what i worry about.


Cheers,
> Thibault
>
> > Why cutting things down to a subset?
> > You have all specs on Opengl.org .. all you have to do today is to import
> > xml file and generate proper ffi calls. You can, of course, add support
> of
> > OpenGL ES.. but why throwing away rest of spec? It just a spec.. you
> don't
> > have to use it if you don't need it. Instead, if that feels too big -
> you
> > can do it smarter way:
> > - make package/subpackage/classes for ES edition and for full edition.
> > It shouldn't cause much trouble if you do it right.
> > Because throwing away is easiest part - but making something that will
> > serve for years .. harder, because tomorrow someone else can come and
> throw
> > your stuff away :)
> > OpenGL is around for years now.. and i don't think ES edition will
> replace
> > standard.. I would prefer to be able to access to full OpenGL
> > functionality, at a day i will need it.. why cutting things down?
> >
> > There's many ways to do things in smart way so, nothing will be lost.
> > If you don't want/can't maintain or support full OpenGL support - that's
> > another story. Then just don't call your project OpenGL - it will cause
> > confusion to those who expecting things to work out of the box, and
> finding
> > out it just OpenGL ES..
> >
> >
> > > My advise is don't worry about backward compatibility , make it easy,
> make
> > > it simple. Don't be afraid to code some of it in C if you have to.
> > > Sometimes it's far easier to use C than Pharo. Pharo is no magic wand.
> > >
> > >
> > Yep, make it work. That's all what matters.
>
>


-- 
Best regards,
Igor Stasenko.

Reply via email to