I started writing some opengl stuff using QT Jambi and I went through a world of pain.
First off, on the Mac, you can't use java 1.6 and QT because 1.6 is a 64 bit JVM and QT doesn't work with the 64 bit cocoa libraries. Second off, QT + JOGL consistently hung when run from the repl. Upon initialization JOGL would start up some swing or AWT threads and then some QT event handler either got starved or got called from the wrong thread; I never figured out which. Finally, I started using swing and realized that it worked much better from the repl than QT did and I instantly stopped using QT. I just don't think that QT is ready for serious java development on the mac yet. On a different note, I just ran a little bit of my app on windows and it looks absolutely horrible which is quite upsetting. On the mac, my swing app looks pretty good. On windows, things don't show up, the font looks like shit, and the color scheme of the UI (none of which did I program) sucks. The gljpanel never initializes (do you really have to call show on everything?) and thus my render context tries (and fails) to create opengl resources every frame at 60 frames a second which makes the computer act quite weird. Using a vanillla 1.6 jvm the swing examples run very slowing if you resize the window to anything like fullscreen. I imagine this is because the jogl backend is copying the pbuffer every frame; but even JGears struggles at fullscreen which is pathetic. Also, the system resizes the pbuffer every so often which destroys the entire gl context forcing me to reload all resources every so often. Compiling glsl isn't cheap, nor is uploading images and vbo's to the card. The fonts really piss me off; I am unsure as to what to do about it. I was thinking perhaps I could switch to SWT; but swing is very easy and I am already sick of UI toolkits in java. Add all this to the myriad of problems you get with the java development system; ant was loading the wrong xml parser (which took forever to figure out), I had the usual newb classpath issues, getting emacs and slime to work together, and I would say that my overall experience with the JVM system is very mixed. /rant Chris On Jan 16, 7:05 pm, Brian Carper <briancar...@gmail.com> wrote: > On Jan 16, 5:38 pm, levand <luke.vanderh...@gmail.com> wrote: > > > > > Has anyone here had success in using Clojure with QT Jambi? > > > I'm currently experimenting with porting my app from Swing to QT, and > > although Jambi might well be the theoretically superior framework, it > > seems like Swing is a lot easier to use with Clojure. > > > The issue I'm currently running into is that you can't call any > > methods on QT gui objects unless you're in the same thread they were > > created in. But that can't be the Repl thread, because > > QApplication.exec() basically sets up an event loop and takes control > > of whatever thread you start it in. > > > So, it looks like I can't do any of that cool interactive gui > > development that I fell in love with in Rich's presentations, and have > > continued to love using myself. > > > Am I missing something? I thought I'd give QT a try, since everyone > > seems to rave about it, but so far, in most ways, Swing seems easier > > to use and more powerful. But maybe I'm just not familiar enough with > > Jambi. > > > Many thanks, > > -Luke > > I have had some success writing a little app[1] in Qt Jambi in > Clojure, for what it's worth. You can use QCoreApplication/ > invokeLater or invokeAndWait to mess with Qt objects from different > threads. > > I have managed to segfault the JVM while poking a running Qt Jambi app > from a REPL. I also had some problems with memory leaks [2] for a > time. It's not as stable and solid as Swing. It works though, and Qt > is a nice framework to work with. > > [1]:http://github.com/briancarper/bcc-clojure/tree/master > [2]: Most likely this issue: > http://www.mail-archive.com/qt-jambi-inter...@trolltech.com/msg00592.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---