Anisotropic (GL_EXT_texture_filter_anisotropic) and other extensions

Started by 8Bit_Jedi, May 14, 2013, 15:55:29

Previous topic - Next topic

8Bit_Jedi

Hi All,

Newbie question time.

Want to make use of Anisotropic filtering, read in OpenGL wiki that its not part of OpenGL core but well implemented for like the last 8+ years, so is OK to use.

Question is: How do I load OpenGL extensions into LWJGL in general, must I wait for LWJGL team to create the class as in anisotropic's case EXTTextureFilterAnisotropic, or is there a manual way?
(I have only read what's on this page: [http://www.opengl.org/wiki/Load_OpenGL_Functions] regarding loading extensions.)

Also in a double wammy, how do I check extension availability, I know of GLU.gluCheckExtension(), or should I use GLContext.getCapabilities() which I am not sure how to use completely.

Thanks all, if need more clarification just ask.

Evil-Devil

Hi there,

you may use the GLContext.getCapabilities() to test that the underlying system supports the extension.

For your initial question. The LWJGL is pretty fast in adding new opengl features. So normally you will find most extension within LWJGL.
The questioned EXTTextureFilterAnisotropic is available. As of LWJGLs static nature you can access it like any other static Java Element.

8Bit_Jedi

Holy smokes you guys reply quick, thanks.  ;D

I used GL11.glTexParameterf(GL11.GL_TEXTURE_2D, EXTTextureFilterAnisotropic.GL_TEXTURE_MAX_ANISOTROPY_EXT, 16.0f); to set my anisotropic level together with a GL_LINEAR_MIPMAP_LINEAR​ minification filter as OpenGL suggests, results are very nice, but I used GLU.gluCheckExtension("EXT_texture_filter_anisotropic", "GL_EXT_texture_filter_anisotropic") to check availability, is GLU.gluCheckExtension() the proper way to do it, if so then there is almost no point in using GLU when using OpenGL 3.2+, or for that matter org.lwjgl.util, or am I wrong.

Evil-Devil

Yea, GLU is kind of obsolete. You may use it but its better to leave it away the way it is. In LWJGL the easiest way really is to use the getCapabilites() method. You may even use some pre display test for checking the system and kindly tell the user his system sucks ;)