OpenGL Globe Screensaver (Update)

I’ve been running this OpenGL Globe screensaver I wrote for several years now on various machines without any issues. Until the other night when I installed it on my new laptop. So I did a little digging and figured out what was going on. After I installed the screensaver and tried to activate it I got the following error:

LoadLibrary failed with error 1114: A dynamic link library (DLL) initialization routine failed.

Googling for information brought me to this site. Further down in the discussion they start talking about switchable graphics with the AMD drivers (which I have) and the Catalyst control center. It seems that by default screensavers are run in “Power Saving” mode with hardware acceleration disabled. Well, since this is an OpenGL screensaver that just will not do! I open up the Catalyst control center and it’s not listed in the recent applications. I guess since it hadn’t run yet it wouldn’t show up. Of course, the Browse… button on the Other Applications box below won’t allow you to select a .scr file. So I try right clicking the .scr file to try to test it that way:

Explorer context menu | Test

Hey, it starts! So I jump back into the Control Center and there it is!

Catalyst Control Center

I set it to “High Performance” and go back to the screensaver control panel and it starts right up! Interesting. I’m not sure if or how I could update the installer to detect and adjust these settings automatically. I’ve been running this screensaver (or previous builds of it) on various computers for several years now and this is the first time I’ve encountered an issue with it. I’m not sure if I can even consider it an issue with the screensaver or not though I’d argue either the screensaver or the installer need to be updated since I can’t really expect end users to have to jump through hoops to get my software to work. I’m probably not going to do it any time soon however. If you have an idea for fixing this problem in an automated fashion I’d be interested in hearing it. If you’d like to play around with the installer code let me know and I’ll give it to you. In the mean time, if you see this issue, let me know if this fixes it.

Update 3/12/2013

So, I’ve been playing around with the drivers and mucked things up enough that I had to revert. However, when I installed the original version and encountered the same problem with the screensaver described above, the above fix did not work this time! Grrr… To get around it I had to go in and manually add it in the registry. One of the existing screensavers that actually ran without issues was listed in the Switchable Graphics dialog as shown above. I picked ribbons.scr. I opened regedit32.exe and searched for “ribbons.scr”.

Registry Editor

I edited this string value and changed the path to specify “ssglobe.scr” instead of “ribbons.scr”. When I reopened the Switchable Graphics dialog it was listed though it was marked as “Not Assigned”. I’m sure there are other registry settings that can be updated to add it and give it the proper settings all in one shot. However, getting it to show up in the dialog is sufficient for now as the settings can then be changed from there. I set it back to “High Performance” and all is again working.

OpenGL Globe Screensaver

I like to dabble in different things, 3D graphics being one. Here is a free screensaver I created a while back using OpenGL to display a rotating 3D globe. It’s pretty simplistic but I think it’s cool. Here’s a screenshot taken from my laptop.

OpenGL Globe Screensaver

The globe is created by mapping a flat image of the earth onto a 3D sphere. The image was obtained from NASA’s Visible Earth website out of the Blue Marble collection. This version supports multiple monitor setups and provides high and low resolution textures for the globe (though I haven’t really tested to see if the different resolution textures really make a difference). The screensaver does not change your monitor resolution and will run at whatever the current resolution is set at. Obviously an OpenGL capable graphics card is required. I also created a msi installer for it. I just wanted an excuse to play with the WiX toolkit for creating install packages. The screensaver can be downloaded from here. If there is interest I have some ideas for enhancements like city lights on the night side, real-time sun tracking, perhaps cloud cover or any other suggestions. Let me know what you think.

Update 12/3/2012

Ok, after having run this screensaver on several different computers over several years without ever having any problems, I just tried to install this on my new laptop and it failed with a DLL error.

LoadLibrary failed with error 1114: A dynamic link library (DLL) initialization routine failed.

Not sure what the issue is at the moment but I’ve previously installed this screensaver on Windows XP 32-bit and Windows 7 Professional (which I also have on this laptop) without problems. It’s late now so I’ll look tomorrow to see what’s going on and post an update.

Update 2 12/5/2012

So I found a fix for the issue and posted a new article about it. Let me know if you run into the same issue or if you find any other problems.

3D Stereo on Linux with nVidia QuadroFX

So, a while back I had set up a Linux machine with an older QuadroFX video card to do some 3D stereo programming. The nVidia Linux drivers installed without a problem and everything seemed to be working. Except for the stereo part. Trying some test applications this is what I found:

With glxgears I’d get:

$ glxgears -stereo Error: couldn’t get an RGB, Double-buffered, Stereo visual With https://astronomy.swin.edu.au/~pbourke/opengl/stereogl/pulsar.c:

$ ./pulsar -s
ERROR: Internal error <Visual with necessary capabilities not found> in function fgOpenWindow

Poking around the internet turned up little about this problem. However, from /usr/share/doc/NVIDIA_GLX-1.0/README.txt I found this little tid-bit: Workstation overlays, stereo visuals, and the unified back buffer (UBB) are incompatible with Composite. These features will be automatically disabled when Composite is detected. Simply running: “nvidia-xconfig --no-composite” fixed it. Looks like it added the following to xorg.conf:

Section "Extensions"
    Option         "Composite" "Disable"
EndSection

Hopefully this helps anyone else with this problem… ]]>