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:

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?

From a cursory glance it seems like you can load DDS files into an image set and load that into a texture. DDS files support pre baked mipmap levels, that are stored alongside the full resolution image. By the looks of it, the createTexture method just reacts to the presence (or absence) of mipmap levels in the image set.

Well one thing is that it mentions different loaders for DDS as for JPG, BMP, GIF etc.

glimg::loaders::dds being for DDS, and glimg::loaders::stb for the others.

Those are used to load the texture into the image set... so that's before CreateTexture() and the mipmapping that was mentioned... makes sense I guess that it would work like you say, considering the single mention of mipmapping with no further explanation.

So then presumably... using CreateTexture() with an ImageSet that was loaded using the stb loader would ignore mipmaps by default.

Do you think then it's most likely that the following code is how mipmapping is meant to be done with ordinary JPGs?:

Is there any reason that might seem odd to someone who understands OpenGL textures, or like it wouldn't work as desired?

This then working off the assumption that I'm essentially doing the same thing as he's doing in the tutorial, because I'm assuming that CreateTexture() goes exactly as far as generating the texture, binding it to the context, and copying over the texture data, as well as probably unbinding it when it's done. At that rate, I assume it makes sense to bind the texture, call glGenerateMipmap() and continue as in the tutorial.

I'll see if it works once I have the rest of the tutorial working, just thought I'd see if I could get a clearer idea beforehand so I'm not stuck then...