Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm currently learning OpenGL (in class) and we're using freeglut 2.8.2, which works just fine (using Visual Studio 2012). As an additional learning resource I'm reading the "OpenGL Superbible, 5h Edition". However, I've noticed that there are some functions that aren't available using the freeglut library.

For example, gluGenerateMipmap or setting anisotropic filtering doesn't work:

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, fLargest);
void glGenerateMipmap(GLenum target);

It simply does not know these functions (glTexParameterf is known, GL_TEXTURE_MAX_ANISOTROPY_EXT is not). I've googled a bit but didn't really find anything. And since glGenerateMipmap seems to belong to the standard openGL Library (and not glu/glut), it should be available (I hope).

Is there anything I'm missing?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

glGenerateMipmap is an extension, unless you are using OpenGL 3 or above (I think). You probably want to use a library like GLEW to load it.

See OpenGL Extensions for more information about extensions in OpenGL. Many things that were extensions in 2.x were promoted to the core API in versions 3 and 4, but unless you upgrade to those versions, you'll have to use an extension loading library (or do it yourself, which is not really that fun or worthwhile).

share|improve this answer
    
Thanks, this answers pretty much anything! :) –  mreinfurt May 3 '13 at 19:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.