Re: Embedding OpenGL into GTK apps
On Wed, 2011-11-30 at 23:27 +0100, Bernhard Schuster wrote: 2011/11/30 Almási Dénes denes.alm...@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 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can I develop gtk app in Mac OS X ?
2011/11/30 xiaobo kfih...@gmail.com: 在 2011-11-30 下午5:56 時, Gabriele Greco 寫到: On Wed, Nov 30, 2011 at 2:35 AM, xiaobo kfih...@gmail.com wrote: I work between gnome and os x, sometime I will write my gnome app in Debian and , when I change to OS X , can I continue to write my gnome app in OS X ? Yes you can, Thx , Gabry. Here is a starting point to install GTK on OSX: http://live.gnome.org/GTK%2B/OSX/ And It can running separately from X in OSX? Not yet. If you are used to console development (with pkg-config and similar) you will not notice any difference developing on OSX or Linux, if you use an IDE like Anjuta or XCode you'll have to sort out include dirs / flags / link libraries by yourself (but the output of pkg-config gtk+-2.0 --cflags --libs can help you :) ) Maybe soneone-not-me could write FindeGTK.cmake files, to work with the cmake build system, it's really nice not to have to include those files by hand. ;) Do not use the prebuilt binaries on gtk.org, they are outdated and bugged. -- Bye, Gabry ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Displaying domain objects with GtkTreeView
On Thu, Nov 24, 2011 at 04:30:25PM +0100, Rafał Krupiński wrote: How do I display list of custom objects in GtkTreeView? GtkTreeView takes GtkListStore as a model, but it doesn't allow custom objects, only list of gobjects. On the other hand, when I want to read list's selection all I get is the GtkListStore model - list of gobjets and I have to figure out the actual domain object the data comes from. I thought of adding a hidden column with some id, but maybe there is a better solution? What are you talking about? You can pass any GObject-derived type as the column type (not that it matters much, the net result is the same as passing G_TYPE_OBJECT). You get back the objects that you stored there. If you store objects of different classes to the same column and want to know the precise type use RTTI: type macros such as MY_IS_FOO(), G_TYPE_FROM_INSTANCE(), g_type_is_a(), etc. Yeti ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list