GL_CLAMP_TO_EDGE extension

The OpenGL call: gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)
has got as 3rd parameter an extension. 3dlabs’ Ogl-manpage names it GL_CLAMP_TO_EDGE_EXT

However, JOGL for example just names it GL.GL_CLAMP_TO_EDGE .

The official Ogl extension registry says the extension which provides this parameter is: GL_SGIS_texture_edge_clamp

So, as usual with extensions, I guess I’ve to ask the Ogl context if this extension is available at runtime:
gl.isExtensionAvailable(“GL_SGIS_texture_edge_clamp”);
In case it is, I use the GL_CLAMP_TO_EDGE parameter, otherwise I fall back to normal GL_CLAMP ?

Two questions:

  1. Is this the correct approach to the parameter? Or is it safe to always use it without asking?

  2. In case asking is neccessary: how many 3d cards actually support it? I am asking because it’s no ARB_ or EXT_ extension but some SGIS_ …
    Still, my ATI 3d card supports this extension, so I guess Nvidia does it, too?

If I remember right, CLAMP_TO_EDGE was introduced into the core in version 1.2. So as long as you check the version string to be 1.2 or later it should be supported.

Realistically I don’t think you’ll find any systems out there that don’t support it.

[quote]If I remember right, CLAMP_TO_EDGE was introduced into the core in version 1.2.
[/quote]
Thanks for the pointer. Now you mention it I checked the OpenGL spec PDF and indeed: the extension moved to the core with v1.2 which is nice.

[quote]So as long as you check the version string to be 1.2 or later it should be supported.

Realistically I don’t think you’ll find any systems out there that don’t support it.
[/quote]
Great.

gl.glGetString(GL_VERSION)) prints for my ATI:
1.5.4650 Win2000 Release

… is it safe to assume that with any implementation the version string actually starts with some “1.” chars?

[quote]The GL_VERSION string begins with a version number. The version number uses one of these forms:
major_number.minor_number

major_number.minor_number.release_number

Vendor-specific information may follow the version number. Its format depends on the implementation, but a space always separates the version number and the vendor-specific information.
[/quote]
So yeah, its safe to assume the number is always first.