Generated.isSupported();

Started by darkprophet, January 26, 2007, 11:14:57

Previous topic - Next topic

darkprophet

Hi all,
Would it be possible to add a "boolean isSupported()" method to all generated classes (including GL11 to GL21) that simply calls GLContext.getCapabilities().GL_.... ?

I am doing some reflection bonanza and I only have the extension class that is needed, not the string.

DP :)

Evil-Devil

When you create an instance of gl or whatever gl class you setup first, you can query GL for all supported extensions. I see no need an isSupported() method.

darkprophet

There is no instance of GL, its all static variables. I am slightly familiar with the workings of LWJGL and I am already using GLContext.getCapabilities().GL_.... However, Generated.isSupported() just seems a nicer way of doing the same thing + gives you the opportunity to do some reflection on the capabilities.

In any case, I dont think the developers want to add any new features as they are trying to stabilise the API for the 1.0 release. Maybe for 1.1 :)

Evil-Devil

Yea they are all static, but i meant if you create a context via pbuffer or display or applet you can get the supported extensions by a simple glGetString(GL11.GL_EXTENSIONS); call.

darkprophet

I know of that GL constant, its pretty widely used. :)

If I was to use that then I have to split the string (not a big deal) and convert from GL names to class names (which is a big deal) at runtime. Reflection is a much nicer solution.

DP