View Full Version : Xlib or GTK
12-17-2001, 06:13 AM
I want to write a 3d modeling program, but unsure which approach to take. Using Xlib or GTK, how do I specify which window/drawing_area to draw to? I do not want to use GTKgl or GTKglarea for reasons of limiting the API involved to maximize portability. I cant figure out how this is done in X, and GTK is very poorly documented and limit in some sense. Any suggestions?
12-17-2001, 01:18 PM
im not sure, but i think those are the only two ways you can draw with GL in gtk. xlib is probably not a good idea for a modeler, because you there are no premade widgets like buttons, etc. you can try QT, it has GL support. xt or motif may support GL drawables as well.
12-18-2001, 01:34 AM
The Xlib is not a toolkit, forget it. It only provides Xt, which is an 'underlying skeleton' for a toolkit (Motif being the most famous one built on top of it). If you want to be portable, use Qt. It's heavily documented, used, and easy to use (and I'm a GTK+ addict, so believe me !).
well, gtk or qt seem to be the best solutions. I know you don't want to add gtkglarea or qgl but they have easy way to programm portable applications.
i think gtk is good because you can have many windows which seem independant (but they aren't) as the Giram modeler. I don't know any modeler under QT.
Indeed, xlib will be very difficult to make all what you want because it is a lib of a lower level, so more difficult to program.
i think, then, using gtk with an opengl window for the rendering.
12-18-2001, 08:24 AM
having a bunch of windows for one aplication sucks. its the one thing i cant stand about the gimp. it clutters the taskbar, and makes it imposible to have the image window fullscreen (every time you click it, all the other important windows like the toolbar, and the layers windows, etc end up underneath it, where you cant see them, or get at them). not to mention the fact that it clutters up any app you have that displays the windows you have open (taskbar type things). its the most annoying thing ive ever seen. besides, qt apps can have as many windows as they want, and they dont have to be parents of each other either, so its entirely possible to do it that way.
there are several qt based modelers. check sourceforge, or apps.kde.com (not just for kde apps). also something called flow, which is a frontend to some particle library.
personally, i like qt cause its OO, but if you dont know or like c++, i guess youll have to go with gtk, or learn c++ first.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.