I'm following these tutorials here:http://www.mbsoftworks.sk/index.php?page=tutorials&series=1
Except that I've decided to use GLFW instead of GLUT, and use the Unoffical OpenGL SDK in general.
So I've got to the tutorial on textures:
http://www.mbsoftworks.sk/index.php?page=tutorials&series=1&tutorial=9
He uses something called FreeImage, but since I already have GL Image set up as part of the SDK, I thought I'd use that instead.
Loading a texture seems simple:http://glsdk.sourceforge.net/docs/html/group__module__glimg.html
I've used that code in my application and it all compiles fine, but I'm just wondering about one thing: the tutorial mentions generating mipmaps, but I'm not sure how that works with GL Image. I've searched for documentation and found this:
http://glsdk.sourceforge.net/docs/html/group__module__glimg__texture.html
Where it mentions that when CreateTexture() returns:
The texture returned will always be texture-complete, with the proper base and max mipmap level set, and reasonable filtering parameters set on it.
But there's no other mention of the word mipmap on that page and I haven't been able to find anything else regarding mipmaps and GL Image.
I'm quite unfamiliar with how mipmaps work in OpenGL though, so maybe it should be obvious to someone who knows about this.
GL Image seems to take care of the calls to glGenTextures(), glTexImage2D() etc. with the short bit of code I linked to, but does it have its own function to generate mipmaps somehow, or should I manually bind the texture to GL_TEXTURE_2D and then call glGenerateMipmap(GL_TEXTURE_2D);?
But then what about the reference to "the proper base and mipmap level" being set by CreateTexture()? Is that just something it does to allow proper mipmap generation later on by the usual glGenerateMipmap() method?