SpartanJ / SOIL2

SOIL2 is a tiny C library used primarily for uploading textures into OpenGL.
MIT No Attribution
370 stars 75 forks source link

Building for android #4

Closed SpartanJ closed 9 years ago

SpartanJ commented 9 years ago

Original report by Tobias Dæ (Bitbucket: r-or, GitHub: r-or).


There's an issue with the platform symbols used in SOIL2.c, tested with gcc 4.9 arm: When building for android, both ANDROID and linux are defined.

So we could replace line 24 in SOIL2.c:

#!c

#if defined ( linux ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined( __DragonFly__ ) || defined( __SVR4 )
#define SOIL_X11_PLATFORM
#endif

with something like this:

#!c

#if ( defined ( linux ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined( __DragonFly__ ) || defined( __SVR4 )) && ! defined( __ANDROID__ )
#define SOIL_X11_PLATFORM
#endif

this way it builds just fine.

SpartanJ commented 9 years ago

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


Fixed issue #4. GLES2 is assumed if no default GLES version is defined.

SpartanJ commented 9 years ago

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


You're right, thanks for reporting it. Let me know if you find something else!

Regards