How to use extensions?

Hi all,
I’m new to using extensions with OpenGL.
Can anyone explain to me how to use an existing extension?
Perhaps you could use the GL_EXT_texture_compression_s3tc extension as en example since I need to use it.
Note: The device I’m developing for supports this extension


This is explained in the Wiki, Getting Started

If it’s not clear, ask questions then.



Library to make life easier:


from there:

You have access to all OpenGL functions and extensions in the linking part of your program. You only need to call glewInit() after creating the OpenGL context, and before use extensions call you need to check :

if (GLEW_ARB_vertex_program)
  /* It is safe to use the ARB_vertex_program extension here. */


if (glewIsSupported("GL_VERSION_1_4  GL_ARB_point_sprite"))
  /* Great, we have OpenGL 1.4 + point sprites. */

You can mix it and is better than other APIs like Windows GL or SDL. Here is an example with FBOs:

Is an EclipseProject, you need SDL libs for run it, but you can check the source code. I don’t make use of glewIsExtensionAvailable() beacuse I already know my card supports it, but you should add inside the method ‘initializeGL()’