
- #CONVERT IMAGE FORMAT FOR OPENGL MAC OS#
- #CONVERT IMAGE FORMAT FOR OPENGL CODE#
- #CONVERT IMAGE FORMAT FOR OPENGL LICENSE#
- #CONVERT IMAGE FORMAT FOR OPENGL ZIP#
Because we can insert a lot of detail in a single image, we can give the illusion the object is extremely detailed without having to specify extra vertices. A texture is a 2D image (even 1D and 3D textures exist) used to add detail to an object think of a texture as a piece of paper with a nice brick image (for example) on it neatly folded over your 3D house so it looks like your house has a stone exterior. What artists and programmers generally prefer is to use a texture. This takes up a considerable amount of extra overhead, since each model needs a lot more vertices and for each vertex a color attribute as well. However, to get a fair bit of realism we'd have to have many vertices so we could specify a lot of colors. (If you use the static library, no other header files are needed besides SOIL.We learned that to add more detail to our objects we can use colors for each vertex to create some interesting images. The file SOIL.h contains simple doxygen style documentation. Simply include SOIL.h in your C or C++ file, link in the static library, and then use any of SOIL's functions. (The heaviest testing has been on the Windows platform, so feel free to email me if you find any issues with other platforms.)
#CONVERT IMAGE FORMAT FOR OPENGL CODE#
The code is cross-platform and has been tested on Windows, Linux, and Mac.
#CONVERT IMAGE FORMAT FOR OPENGL ZIP#
You can use the static library file included in the zip (libSOIL.a works for MinGW and Microsoft compilers.feel free to rename it to SOIL.lib if that makes you happy), or compile the library yourself. SOIL is meant to be used as a static library (as it's tiny and in the public domain).
#CONVERT IMAGE FORMAT FOR OPENGL MAC OS#
Cross platform (Windows, *nix, Mac OS X).Can take a single image file where width = 6*height (or vice versa), split it into an OpenGL cube map texture.Can take six image files directly into an OpenGL cube map texture.Can load cube maps directly into an OpenGL texture (same features as regular 2D textures, above).via PhysicsFS or similar) into an OpenGL texture (same features as regular 2D textures, above) Can load rectangluar textures for GUI elements or splash screens (requires GL_ARB/EXT/NV_texture_rectangle).Note: directly uploading the compressed DDS image will disable the other options (no flipping, no pre-multiplying alpha, no rescaling, no creation of MIPmaps, no auto-downsizing) Can directly upload DDS files (DXT1/3/5/uncompressed/cubemap, with or without MIPmaps).Will automatically downsize a texture if it is larger than GL_MAX_TEXTURE_SIZE.Can convert the RGB to YCoCg color space (useful with DXT5 compression: see this link from NVIDIA).Can compress and upload any image as DXT1 or DXT5 (if EXT_texture_compression_s3tc is available), using an internal (very fast!) compressor.Can multiply alpha on load (for more correct blending / compositing).Can scale (not simply clamp) the RGB values into the "safe range" for NTSC displays (16 to 235, as recommended here).Can automatically rescale the image to the next largest power-of-two size.Can generate a new texture handle, or reuse one specified.

Can load an image file directly into a 2D OpenGL texture, optionally performing the following functions:.TGA - Greyscale or RGB or RGBA, uncompressed.HDR - converted to LDR, unless loaded with HDR functions (RGBE or RGBdivA or RGBdivA2).DDS - DXT1/2/3/4/5, uncompressed, cubemaps (can't read 3D DDS files yet).TGA - greyscale or RGB or RGBA or indexed, uncompressed or RLE.JPG - JPEG baseline (from stb_image documentation).PNG - non-interlaced (from stb_image documentation).

#CONVERT IMAGE FORMAT FOR OPENGL LICENSE#
I wanted to work with the code and seeing it was MIT license and the original svn repo is offline, I figured it was acceptable to post it here.

This is a clone of Simple OpenGL Image Library from which hasn't changed since July 7, 2008.
