GLI is a simple C++ image library based on OpenGL and GLSL convensions and used to load and store OpenGL textures.
GLI supports DDS (Direct3D9 and Direct3D10) file formats including all BC1 to BC7 formats but don't compressed image data to these formats (yet).
Creating an OpenGL texture object with GLI manually:- #include <gli/gli.hpp>
- #include <gli/gtx/loader.hpp>
-
...
-
glGenTextures(1, &TextureName);
-
glBindTexture(GL_TEXTURE_2D, TextureName);
-
gli::texture2D Texture = gli::load("texture-bc3.dds");
- for(gli::texture2D::level_type Level = 0; Level < Texture.levels(); ++Level)
-
{
-
glCompressedTexImage2D(
-
GL_TEXTURE_2D,
-
GLint(Level),
-
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
-
GLsizei(Texture[Level].dimensions().x),
-
GLsizei(Texture[Level].dimensions().y),
-
0,
-
GLsizei(Texture[Level].capacity()),
-
Texture[Level].data());
-
}
-
...
Creating an OpenGL texture object with GLI automatically:- #include <gli/gli.hpp>
- #include <gli/gtx/gl_texture2d.hpp>
-
...
-
GLuint TextureName = gli::createTexture2D("texture-bc3.dds");
-
...
Releases:
- 08/02/2011 GLI 0.3.0.3 (ZIP, 3.5 MB) (7Z, 2.1 MB)
- 08/02/2011 GLI 0.3.0.2 (ZIP, 1.5 MB) (7Z, 869 KB)
- 15/10/2010 GLI 0.3.0.1 (ZIP, 35 KB) (7Z, 17 KB)
- 01/10/2010 GLI 0.3.0.0 (ZIP, 35 KB) (7Z, 18 KB)
- 07/09/2010 GLI 0.2.2.1 (ZIP, 14 KB) (7Z, 14 KB)
- 15/02/2010 GLI 0.2.1.0 (ZIP, 17 KB) (7Z, 10 KB)
- 10/01/2010 GLI 0.2.0.0 (ZIP, 17 KB) (7Z, 10 KB)
- 18/09/2009 GLI 0.1.1.0 (ZIP) (7Z)
- 28/03/2009 GLI 0.1.0.0 (ZIP) (7Z)