Avogadro, OpenGL and Display Bugs

Before last summer I had never really done any OpenGL programming. Now I feel like I know a reasonable amount but certainly still have a lot to learn. I have an Acer Ferrari laptop with an ATI Radeon X700 discrete graphics card in it. I was using the proprietary driver for a while but it was so unstable it just wasn't worth using. I was hopeful after reading about AMD opening up the specs so that good 3D support can be added to the open source driver.

Avogadro showing a filled surface with incorrect colouring on ATI open source driverAvogadro showing a surface with correct colouring on ATI open source driver

I have to say on the whole the 3D support has been getting better and better for the r300 chipset. I cannot enable the desktop effects in KDE 4.1 trunk without losing my OpenGL apps though. As you can see in the above screen shots filled surfaces also do not work. For some reason the colouring of the surface is incorrect, i.e. the colour is never changed. I am running the latest git sources of xorg, the ati drivers, x11-drm, mesa etc, thanks to Donald Berkholz. Avogadro seems hit File r300_render.c function r300Fallback line 360, Software fallback:ctx->RenderMode != GL_RENDER every time too.

There is an open bug report that appears to be describing the same situation. I do wonder if it is possible that our OpenGL code could be improved to avoid this bug. I would love any tips on ensuring our OpenGL code is as compatible as possible. The surface rendering works correctly on all other platforms (Linux, Mac, Windows) and with other drivers as far as I know.

We also have an open bug report where Avogadro segfaults on Linux systems using the savage driver. This seems to be a consistent problem. I am afraid I do not have the hardware to test further, I have added further debug output to our initialisation routines - Avogadro crashes very early on. Again, any ideas on how I might fix this bug or at least exit gracefully would be great. Backtraces may help to at least see what functions are called before the crash but this might just be a driver bug.

New Webcam and Linux

As my regular readers will know I moved over to Pittsburgh, PA in the USA at the end of September last year. Before I left I got some of mine and Louise's family webcams so that we could stay in touch. Then it took ages to sell our house and the shipping nightmare began (which I will try and bring myself to talk about one of these days). Eventually I actually got my desktop computer back (a little worse for wear after the shippers "carefully packaged it").

Logitech Quickcam Pro 9000

Going back to my original point, I had been putting off buying a webcam as I wanted it to work well in Linux, and every time I looked into which webcams might be my best bet it seemed that even individual models had multiple chipsets, which may or may not be supported. On Saturday I bit the bullet as Louise had been asking about getting Skype working.

I chose the Logitech Quickcam Pro 9000 (photo above) as it seemed to be part of the new USB video class standard I had been reading about and saw there was a healthy Linux UVC project already. I still anticipated having trouble getting it working on Gentoo but thought I should be able to get it working eventually.

Imagine my surprise when I just typed emerge -av media-video/linux-uvc media-video/luvcview, modprobed the new kernel module, ran luvcview and I could see me staring at the camera! Sometimes I worry this Linux thing might be getting a little too easy ;-) Another five minutes and I had the microphone working (just usb audio) and was testing it out in Skype. On Sunday we had our first intercontinental video chat with my Mum and two nephews. Skype also integrates into my KDE 4 desktop without any trouble.

I am pretty new to the webcam thing and had resisted it for a while but it was great to be able to chat and see family and friends back home. I would rather use an open source, cross platform video conferencing application but have yet to find a viable one. Open Wengo looks like it might be that application one day but I couldn't get it to work reliably last time I tried (although I did like the look of it). I also don't seem to be able to find a nice application that will let me capture video messages easily.

I was very pleasantly surprised by my experience and am very happy with the performance of the Linux drivers for the webcam as well as the camera itself. Any Linux webcam tips would of course be gratefully received!

UPDATE: Forgot to mention this great blog post I spotted that helped me decide this webcam was probably a good bet...