Re: GTK + Clutter next step(s)



On 30 October 2011 08:38, Kristian Rietveld <kris loopnest org> wrote:

>> Yes, I definitely think that nobody should use OpenGL in the GTK world
>> unless he specifically tries to marry OpenGL based things with GTK
>> widgetry. I would be very scared of anybody having a glBegin() in
>> their widget's draw handler.

I can see where this comes from. It is difficult to arrange for this
to work properly.

Possibly to the point that you could not use glBegin() but would need
a GTK specific calls that arranges for you to be able to call
glBegin().

It's simple to say it's not supported.

But consider this: if I tried to marry OpenGL and GTK widgetry does it
not make sense to put on my widgets the very OpenGL objects they
manipulate in my scene?

Sure, I could probably render the objects to a bo, convert to pixmap,
and put that on the widget.

But is that really the path you want to take?

>> But I'm running into projects on a weekly basis that have GL
>> requirements and have no clue how they can achieve what they want with
>> GTK 3. And I certainly want to make that possible. I definitely don't
>> want to make it easy.
>
> I find this a rather weird statement.  To me, GL support is an important requirement for a windowing toolkit.  There are very valid reasons to use GL in GTK+ applications, such as CAD and scientific visualization, as Peter Clifton has also pointed out in this thread.
>
> Even though Cairo is clearly preferred for 2D drawing, I don't see a reason to "force" people who already have portable 2D drawing code (for e.g. visualization) to Cairo or to make it harder to use such existing code.  For 3D, Cairo is not an option at all.
>
> I don't believe that people would use OpenGL instead of Cairo without sufficient reason for newly written code or for writing widgets, so I don't agree with your reasoning attached to the quote of Larry Wall.

The question is: why should they not use OpenGL instead of Cairo?

OpenGL is a defined api (although poorly in some respects) just as Cairo is.

I don't see why there should not be the option to use the one that is
better suited for your application, be it for compatibility with
existing GL code or compatibility with other frontends/backends that
don't provide Cairo but do provide GL.

At some point I would like to see at the very least a theming engine
that makes your buttons really stand out in 3D so that when the window
is shown on some rotating cube the GUI elements are clearly visible as
3D objects. And you could use GL lights to shade the borders then, and
have some control panel that allows you to add and move the lights.

Making the application fully defined 3D shapes would be even more awesome.

Thanks

Michal


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]