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 helps
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users