Dirk Reiners wrote:
> Hi Patrick,
>
> On Mon, 2005-05-23 at 15:05 -0500, Patrick Hartling wrote:
>
>>Is there any way to detect the availability of an OpenGL extension through
>>OpenSG without using an OSG::WindowPtr? I have a case where I want to
>>determine at run time whether to use GLSL depending on the availability of
>>GLSL, but the code in question does not have access to an OSG::WindowPtr
>>object to be able to call OSG::Window::hasExtension(). I do have the
>>OSG::SHLChunkPtr object that contains the vertex and fragment programs, but
>>I don't see anything obvious in OSG::SHLChunk that would let me query the
>>availability of GLSL. I have an idea or two for how to do what I need
>>without going through OpenSG, but it seems like asking OpenSG would be the
>>cleanest approach. Thanks.
>
>
> given that extensions can be different between different Windows in a
> multi-window setup there is not really a way to access extensions
> independently of Windows.
>
> Having said that, the system keeps track of extensions that are common
> to all opened Windows, so if you already have an open Window you can use
> Window::hasCommonExtension(Window::getExtensionId
> ("GL_ARB_shading_language_100")) to check for its availability in all
> Windows. Note that this currently is not cluster-compatible yet, though.
>
> Hope it helpsThat gives me some food for thought. Thanks for the quick response, Dirk. -Patrick -- Patrick L. Hartling | VP Engineering, Infiscape Corp. PGP: http://tinyurl.com/2msw3 | http://www.infiscape.com/
signature.asc
Description: OpenPGP digital signature
