From: MikkelFJ Date: 2003-02-07T11:35:34+09:00 Subject: Re: locana, SVG, cross-platform GUI meanderings... "Tom Sawyer" wrote in message news:200302061800.52047.transami@transami.net... > > > so i'm polling here. i am working on a Ruby GUI, and it is in the very early > stages. right now i am planning to use the GGI api for graphics rendering. > what are the merits of SVG compared to something like GGI? what would be the > draw in using one over the other? can SVG reasonably accomadate a GUI > toolkit? could both SVG and GGI be used together seemlessly? by the way, GGI > dosn't do font rendering and i was looking at using FreeType2 for that. I just took a second look at FLTK - I'm not through looking at it so this is preliminary. Up to this point I have considered Fox the best crossplatform choice, but I have been wondering a lot about developing GUI natively in OpenGL. All the toolkits I have looked at have not really been any serious option, except perhaps GLGooy, but it is intended for Game development and spends all the CPU on creating frames. GLGooey apparently uses the best FreeType (FTGL)and OpenGL helper frameworks available (GLFW) - so with respect to FreeType it may be worth a look. An OpenGL GUI can be be rendered like any normal 2D API without redrawing the entire frame over and over (but this is not the GLGooy way, unfortunately). FTGL http://homepages.paradise.net.nz/henryj/code/ GLFW http://hem.passagen.se/opengl/glfw/ GLGooy http://nwaldren.bei.t-online.de/glgooey.htm Then I became aware the FLTK preferably renders to OpenGL. I no longer remember my objections againts FLTK and I need more research - but there is new FLTK 2.0 in the pipeline with multiple theme support (or potential for it). Apparently IME (asian input) and UTF-8 is supported or at least in the planning. NVDIA drives OpenGL development and releases drivers to Linux and FreeBSD. OpenGL should be as good as any 2D drawing API with 3D as a bonus to the extend the CPU and GPU are fast enough. Therefore it makes sense to develop GUI in OpenGL rather than stuffing OpenGL into the GUI as a special case. With the future 3D graphics adapters even on the average laptop, OpenGL is indeed interesting. Of course Direct-X is also relevant, but not exactly cross-platform. When developing GUI applications you often end up needing a userinterface that looks like other known GUI's: a tree control, tool bars, dockable windows. And inevitable these are not natively available so you either need to purchase extremely buggy third party tools doing something similar, or implement it youself, which is faster because you don't need to fight the bugs you didn't write. And whatever is considered native OS widgets are outdated anyway. Just look at how many different drawing styles Windows provides in Microsoft products. Only starting with .Net do you actually get access to a fairly updated GUI toolkit. In consequence, you might as well use a powerful graphics API for drawing the controls you need to draw anyway. The major problem with OpenGL is that it does not come with an event model or font support. Font can be handled using FTGL but the event model can be more tricky. Perhaps FLTK adds a layer on OpenGL that handle events and allows you to extend with you own widgets without bogging down the CPU and without crappy updates - or perhaps not - but then I'd rather draw manually. SVG is nice and has improved a lot lately - but it's still to sluggish to be real GUI platform, although for client server alternative SVG or Flash are interesting. I have a vision of a thin OpenGL client with a socket to the server application. Basically like HTML, but with a permanent socket connection and none of the HTML DOM ambiguities. I guess not unlike how Flash works, except using OpenGL. Given all the crap time spend and making hopeless GUI's in browsers, one might as well spend the time writing a client server GUI architecture that actually works and which compiles and all platforms supporting OpenGL. So purely based on FLTK rendering OpenGL I think I'll give it a second look. That said, I have nothing against Fox if it just fixes minor drawing problems and solves the internationalization issue - it just doesn't allow me to extend widgets in OpenGL. And face it - we can either go native 3D GUI now or wait until Microsoft and Apple does it and the do it. I'm not saying everything should be 3D, but I wouldn't mind reading my mails like starwars intro when logging into the system ;-) What I'm saying is that staying with 2D API's has limited life expectancy. Mikkel