tags 309441 + patch
thanks

Here's a function gl_available() that tests whether a system can load libGL and get a non-NULL return value out of glXChooseVisual().

It loads libGL at runtime using dlopen() so it can be run even on systems where libGL isn't available. Thus it should be possible to include this function with non-GL builds of XScreensaver.

Build instructions are in a comment at the top of the program.

I've attempted to follow the indentation and bracing style from XScreensaver's source code. I've placed it in the public domain, so use it how you like, if you like.

It returns false on my system. I haven't tested it on a GL enabled system. I have verified however that the call to glXChooseVisual() goes fine, it's just that it returns NULL over here.

 Regards //Johan

-----Original Message-----
From: Jamie Zawinski <[EMAIL PROTECTED]>
To: Johan Walles <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tue, 17 May 2005 12:11:55 -0700
Subject: Re: Bug#309441: xscreensaver: Better handling of failing hacks

Johan Walles wrote:

Look at the print_extension_info() function.  Walking through the
extensions list looking for "GLX" should do the trick.

Not all systems require the GLX extension in order to function,
so it's incorrect to assume "no GLX extension in the server"
means "OpenGL does not work."

--
Jamie Zawinski      [EMAIL PROTECTED]                  http://www.jwz.org/
                   [EMAIL PROTECTED]      http://www.dnalounge.com/
                                        http://jwz.livejournal.com/


----------------------------------------------
Mailblocks - A Better Way to Do Email
http://about.mailblocks.com/info

Attachment: testglx.c
Description: Binary data

Reply via email to