Re: Embedding OpenGL into GTK apps



On Wed, Nov 30, 2011 at 11:27 PM, Bernhard Schuster <
schuster bernhard googlemail com> wrote:

2011/11/30 Almási Dénes <denes almasi gmail com>:
Hi,

I would need some clarification on embedding an opengl canvas into a GTK
3.0 application. Is it possible? And if so, how? This is a necessary
component for my thesis at university.

GtkGlExt (surprisingly - quite out of support) does not seem to work. I
even tried to link against it with gtk 2.0, but it doesn't work either.

----
Nasty things like this are written to stdout:
(process:9338): Gdk-CRITICAL **: IA__gdk_x11_display_get_xdisplay:
assertion `GDK_IS_DISPLAY (display)' failed

(process:9338): GdkGLExt-WARNING **: Window system doesn't support
OpenGL.
----

I am using Arch linux with GNOME 3, [base], [community] and [extra]
repos enabled only, latest nvidia graphics card with proprietary
drivers. I am using gtkmm in C++11, but I couldn't achieve anything even
in plain gtk, and if a solution exists in gtk, I think it would be
portable to gtkmm.

Thanks,
Dennis

P.S.: An equally good solution would be to draw gtk inside an opengl
canvas, that way my whole application would be drawn in opengl. Is that
possible?

I asked this question a while ago at stackoverflow (at that time I
were not aware of this mailinglist):

http://stackoverflow.com/questions/3815806/gtk-and-opengl-bindings

Regards


Bernhard


Hi,

Thank you, I will give GtkGlArea a try as soon as I have some time.
Unfortunately Cairo is not an option for me as I have to be really fast.

I'll report back later!

Dennis



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