GEL
2
GEL is a library for Geometry and Linear Algebra
|
00001 00040 #ifndef HEADER_SIMPLE_OPENGL_IMAGE_LIBRARY 00041 #define HEADER_SIMPLE_OPENGL_IMAGE_LIBRARY 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00055 enum 00056 { 00057 SOIL_LOAD_AUTO = 0, 00058 SOIL_LOAD_L = 1, 00059 SOIL_LOAD_LA = 2, 00060 SOIL_LOAD_RGB = 3, 00061 SOIL_LOAD_RGBA = 4 00062 }; 00063 00071 enum 00072 { 00073 SOIL_CREATE_NEW_ID = 0 00074 }; 00075 00095 enum 00096 { 00097 SOIL_FLAG_POWER_OF_TWO = 1, 00098 SOIL_FLAG_MIPMAPS = 2, 00099 SOIL_FLAG_TEXTURE_REPEATS = 4, 00100 SOIL_FLAG_MULTIPLY_ALPHA = 8, 00101 SOIL_FLAG_INVERT_Y = 16, 00102 SOIL_FLAG_COMPRESS_TO_DXT = 32, 00103 SOIL_FLAG_DDS_LOAD_DIRECT = 64, 00104 SOIL_FLAG_NTSC_SAFE_RGB = 128, 00105 SOIL_FLAG_CoCg_Y = 256, 00106 SOIL_FLAG_TEXTURE_RECTANGLE = 512 00107 }; 00108 00115 enum 00116 { 00117 SOIL_SAVE_TYPE_TGA = 0, 00118 SOIL_SAVE_TYPE_BMP = 1, 00119 SOIL_SAVE_TYPE_DDS = 2 00120 }; 00121 00128 #define SOIL_DDS_CUBEMAP_FACE_ORDER "EWUDNS" 00129 00137 enum 00138 { 00139 SOIL_HDR_RGBE = 0, 00140 SOIL_HDR_RGBdivA = 1, 00141 SOIL_HDR_RGBdivA2 = 2 00142 }; 00143 00152 unsigned int 00153 SOIL_load_OGL_texture 00154 ( 00155 const char *filename, 00156 int force_channels, 00157 unsigned int reuse_texture_ID, 00158 unsigned int flags 00159 ); 00160 00174 unsigned int 00175 SOIL_load_OGL_cubemap 00176 ( 00177 const char *x_pos_file, 00178 const char *x_neg_file, 00179 const char *y_pos_file, 00180 const char *y_neg_file, 00181 const char *z_pos_file, 00182 const char *z_neg_file, 00183 int force_channels, 00184 unsigned int reuse_texture_ID, 00185 unsigned int flags 00186 ); 00187 00197 unsigned int 00198 SOIL_load_OGL_single_cubemap 00199 ( 00200 const char *filename, 00201 const char face_order[6], 00202 int force_channels, 00203 unsigned int reuse_texture_ID, 00204 unsigned int flags 00205 ); 00206 00215 unsigned int 00216 SOIL_load_OGL_HDR_texture 00217 ( 00218 const char *filename, 00219 int fake_HDR_format, 00220 int rescale_to_max, 00221 unsigned int reuse_texture_ID, 00222 unsigned int flags 00223 ); 00224 00234 unsigned int 00235 SOIL_load_OGL_texture_from_memory 00236 ( 00237 const unsigned char *const buffer, 00238 int buffer_length, 00239 int force_channels, 00240 unsigned int reuse_texture_ID, 00241 unsigned int flags 00242 ); 00243 00263 unsigned int 00264 SOIL_load_OGL_cubemap_from_memory 00265 ( 00266 const unsigned char *const x_pos_buffer, 00267 int x_pos_buffer_length, 00268 const unsigned char *const x_neg_buffer, 00269 int x_neg_buffer_length, 00270 const unsigned char *const y_pos_buffer, 00271 int y_pos_buffer_length, 00272 const unsigned char *const y_neg_buffer, 00273 int y_neg_buffer_length, 00274 const unsigned char *const z_pos_buffer, 00275 int z_pos_buffer_length, 00276 const unsigned char *const z_neg_buffer, 00277 int z_neg_buffer_length, 00278 int force_channels, 00279 unsigned int reuse_texture_ID, 00280 unsigned int flags 00281 ); 00282 00293 unsigned int 00294 SOIL_load_OGL_single_cubemap_from_memory 00295 ( 00296 const unsigned char *const buffer, 00297 int buffer_length, 00298 const char face_order[6], 00299 int force_channels, 00300 unsigned int reuse_texture_ID, 00301 unsigned int flags 00302 ); 00303 00315 unsigned int 00316 SOIL_create_OGL_texture 00317 ( 00318 const unsigned char *const data, 00319 int width, int height, int channels, 00320 unsigned int reuse_texture_ID, 00321 unsigned int flags 00322 ); 00323 00335 unsigned int 00336 SOIL_create_OGL_single_cubemap 00337 ( 00338 const unsigned char *const data, 00339 int width, int height, int channels, 00340 const char face_order[6], 00341 unsigned int reuse_texture_ID, 00342 unsigned int flags 00343 ); 00344 00349 int 00350 SOIL_save_screenshot 00351 ( 00352 const char *filename, 00353 int image_type, 00354 int x, int y, 00355 int width, int height 00356 ); 00357 00367 unsigned char* 00368 SOIL_load_image 00369 ( 00370 const char *filename, 00371 int *width, int *height, int *channels, 00372 int force_channels 00373 ); 00374 00384 unsigned char* 00385 SOIL_load_HDR_image 00386 ( 00387 const char *filename, 00388 int *width, int *height, int *channels, 00389 int force_channels 00390 ); 00391 00401 unsigned char* 00402 SOIL_load_image_from_memory 00403 ( 00404 const unsigned char *const buffer, 00405 int buffer_length, 00406 int *width, int *height, int *channels, 00407 int force_channels 00408 ); 00409 00414 int 00415 SOIL_save_image 00416 ( 00417 const char *filename, 00418 int image_type, 00419 int width, int height, int channels, 00420 const unsigned char *const data 00421 ); 00422 00428 void 00429 SOIL_free_image_data 00430 ( 00431 unsigned char *img_data 00432 ); 00433 00439 const char* 00440 SOIL_last_result 00441 ( 00442 void 00443 ); 00444 00445 00446 #ifdef __cplusplus 00447 } 00448 #endif 00449 00450 #endif /* HEADER_SIMPLE_OPENGL_IMAGE_LIBRARY */