Quote:Original post by lonesock
Quote:Original post by shotgunnutter
I've got SOIL compiling under OS X on gcc 4.2. I'm going to test the different file format loaders, and will probably use calls to these functions in my resource loader library.
Great, thanks! I have 0 access to any Mac machines, so thanks for verifying it at least compiles [8^)
Quote:Original post by shotgunnutter
Many thanks for an excellent library.
You're welcome! Feel free to hit me with any suggestions or requests for making it better.
Your library is so easy to use that I would like to rate you up again, if only I hadn't done so twice already.
Ok, initial tests on my MBP running OS X 10.4.10, and gcc 4.0.2 are successful. I can load .tga files, and .bmp files. I haven't yet tested screen shots, I'll do that next.
Here is an OS generated screen shot from my quake 3 clone:
OK, I cheated. Here is what I actually managed to do:
I'm writing my own renderer; My code at the moment is the result of a year of reading tutorials and copy / pasting code from examples on the web. The class which handles the MD2 character also renders him. Thanks to your library, I can now design a better system far more quickly.
I did have to make a change to the compiler macros in soil.c, to ensure platform cross- compatibility:
in soil.c, where you have
#ifdef _MSC_VER #define WIN32_LEAN_AND_MEAN #include <windows.h>#endif#include "SOIL.h"#include "stb_image.h"#include "image_helper.h"#include <stdlib.h>#include <string.h>#include <GL/gl.h>// for using DXT compression#define SOIL_RGB_S3TC_DXT1_EXT 0x83F0#define SOIL_RGBA_S3TC_DXT1_EXT 0x83F1#define SOIL_RGBA_S3TC_DXT3_EXT 0x83F2#define SOIL_RGBA_S3TC_DXT5_EXT 0x83F3
i changed this to
#ifdef _MSC_VER #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <GL/gl.h>#else #include <OpenGL/gl.h> #include <OpenGL/glu.h>#endif#include "SOIL.h"#include "stb_image.h"#include "image_helper.h"#include <stdlib.h>#include <string.h>// for using DXT compression#define SOIL_RGB_S3TC_DXT1_EXT 0x83F0#define SOIL_RGBA_S3TC_DXT1_EXT 0x83F1#define SOIL_RGBA_S3TC_DXT3_EXT 0x83F2#define SOIL_RGBA_S3TC_DXT5_EXT 0x83F3
This will allow the code to compile on gcc 4.0.2 and on MSC. I haven't tested it on a Linux system but the headers are the same as for OS X.
[update: png files work. Alpha transparency on .tga and .png also works]
[Edited by - shotgunnutter on September 5, 2007 11:31:27 PM]
I just wanted to see if he would actually do it. Also, this test will rule out any problems with system services.