Qt Designer and OpenGL
June 16, 2006 on 9:35 pm | In Computer, General, Graphics, Linux | No CommentsI designed a GUI for an OpenGL application using Qt Designer, and encountered some glitches. First, you have to subclass QGLWidget class, say MyGLWidget, and put OpenGL stuff there. Then open Qt Designer and place a some container widget in a window as a place folder for MyGLWidget. You should use QWidget because QGLWidget inherits directly from it. However, QWidget is not available in Qt Designer. So you are forced to use QFrame as a place folder and promote it to a custom widget class and specify MyGLWidget. Now save the GUI layout to a .ui file, and hand edit it and delete the lines which declares some of QFrame properties. You also need to rename QFrame in the custom widget section to QWidget. Now you should be able to compile your code.
Actually I found a ML thread about this and a Trolltech engineer said that they would add QWidget in Qt Designer. Apparently it’s not fixed yet. I really want the fix!
VTK and Qt license
June 14, 2006 on 1:35 pm | In Computer, Graphics | No CommentsI had to check if VTK license is compatible with GPL. The archive of a debian ML shows that it is compatible. Now I’m sure I can use Qt as a GUI for VTK based programs.
May 8, 2006 on 6:51 am | In Computer | No Comments
SGI filed for Chapter 11 Bankruptcy. I think it was doomed since nvidia had released GeForce.
New Kernel Feature
May 4, 2006 on 1:54 pm | In Computer, Linux | No CommentsI stumbled on the KernelNewbies Wiki about a new feature in kernel 2.6.16:
Add /proc/sys/vm/drop_caches. Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free. This is mainly useful for benchmarking, for getting consistent results between filesystem benchmarks without rebooting. To free pagecache: “echo 1 > /proc/sys/vm/drop_caches”, to free dentries and inodes: “echo 2 > /proc/sys/vm/drop_caches”, to free pagecache, dentries and inodes: “echo 3 > /proc/sys/vm/drop_caches”. As this is a non-destructive operation and dirty objects are not freeable, the user should run `sync’ first.
It’s sweet.
Hard Drive Crash
May 2, 2006 on 4:18 pm | In Computer, Linux | No CommentsLast week, my dual core Athlon 64 box crashed. I was converting a movie to mpeg2 to burn a DVD video on Windows when it happened. Then the weird things happened and eventually I had to repartition the hard drives. The only good side was that I managed to recover the partition table from the corrupted one. However, almost all data on / and /home went to the lost+found directory when I did xfs_repair. I recovered most of important data since I had one-week old backup of /home, but it was the worst nightmare. I don’t know what causes the problem.
Resurrection
April 4, 2006 on 7:46 pm | In Computer, Mac | No CommentsMy iBook’s battery has started to work again today. I’m not exactly sure what brought the battery back to alive, but probably a complete discharge of the battery did it. It’s getting old and the processor speed is relatively slow (G3 800MHz), but I can write code and dissertation as well as browsing websites and reading email. The three years old battery still lasts in more than three hours. I’m quite satisfied with it.
iBook Battery
March 31, 2006 on 4:37 pm | In Computer, Mac | No CommentsSuddenly my iBook’s battery died. The battery indicator on the menubar shows that there is no battery installed. I’ve used it for more than three years, so I may just have to admit that the battery lasted very long. Nonetheless, it’s very inconvenient to connect my iBook to the power adapter anyway.

OpenGL on Windows Vista
March 21, 2006 on 12:48 pm | In Computer, Graphics | No CommentsMicrosoft has planned to drop full OpenGL support *again* on Windows Vista with their compositing desktop engine like Quartz 3D in Mac OS X. When the desktop composition is enabled, OpenGL commands are translated to Direct X equivalent ones at run time, dropping OpenGL based applications performance to ~50%. If you disable the desktop composition, OpenGL applications run in full speed using the OpenGL ICD, but who wants to disable the desktop composition? This decision is so Microsoft, and it is the second time they do this kind of stuff. Obviously it led to the huge uproar in the OpenGL community.
Yesterday, I noticed the blog entry that OpenGL will be fully supported even with the desktop composition enabled. It seems that finally Microsoft listened to users, but we should be wary until they really release it and the performance is as good as Direct X.
3Dlabs
February 28, 2006 on 2:59 am | In Computer, Graphics | No Comments3Dlabs announced that it will de-emphesize the professional graphics buisiness and focus on the portable handheld device market. I knew that their products are not very impressive, but they have driven the evolution of the OpenGL API. They pushed the OpenGL ARB very hard to make GLSL part of OpenGL 2.0. I didn’t even know that 3Dlabs is a subsidiary of Creative Technology. It’s a sad news.
Topcoder coding competition
February 9, 2006 on 12:45 pm | In Computer, School | 1 CommentLast night we had a coding competition at school sponsored by topcoder.com. I was able to solve the first problem in 15 minutes, but it took me so long to solve the second problem. The second problem is to find the largest triangle from a set of colored points in 3D space. The triangle must be formed by vertices with the same color or with different colors. The algorithm to find the triangle is very simple because you just need to have three nested for loop in x, y, and z components. To me the problem was finding a formula to find the area of a triangle. I tried using Heron’s formula, but the one I remembered was wrong. I didn’t know I can look up websites during the competition, so I didn’t. Unfortunately the formula was wrong and that was the only flaw in my program. I ended up being the fourth place in the competition. The first place gets an iPod, the second one gets an mp3 player, and the third one gets $50 credit to the university’s account. I was pissed off so much. If I had gotten the formula right, I would have been able to be the third place at least.
In this morning, I got an email from the student who is a liaison for the competition. He said that the person got the second place is not eligible because he is an alum. So I became the third place. I’m still not staisfied with my score, but at least I get a prize.
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^