Changeset 3108 in orxonox.OLD for orxonox/branches
- Timestamp:
- Dec 6, 2004, 12:13:50 AM (20 years ago)
- Location:
- orxonox/branches/images
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/images/configure
r3105 r3108 4779 4779 fi 4780 4780 4781 def_sdl_image=no;4782 4781 ;; 4783 4782 … … 5480 5479 fi 5481 5480 5482 ## check for SDL_Image 5483 if test "$def_sdl_image" = "yes"; then 5484 # checking for SDL_image-headers 5485 5486 for ac_header in SDL/SDL_image.h 5481 5482 ## checking for SDL 5483 # SDL_VERSION=1.2.7 5484 # AM_PATH_SDL($SDL_VERSION, 5485 # :, 5486 # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 5487 # ) 5488 # CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 5489 # LIBS="$LIBS $SDL_LIBS" 5490 ;; 5491 5492 ### OS X ### 5493 *darwin*) 5494 echo "OS X detected" 5495 5496 osX="yes" 5497 5498 # checking gl header 5499 5500 for ac_header in OpenGL/gl.h 5487 5501 do 5488 5502 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 5630 5644 5631 5645 else 5632 echo "sdl_image not found. falling back to other options"; def_sdl_image=no 5646 { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5 5647 echo "$as_me: error: cannot find opengl headers" >&2;} 5648 { (exit 1); exit 1; }; } 5633 5649 fi 5634 5650 5635 5651 done 5636 5652 5637 fi 5638 if test "$def_sdl_image" = "yes"; then 5639 # checking for SDL_image-lib 5640 echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5 5641 echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6 5642 if test "${ac_cv_lib_SDL_image_main+set}" = set; then 5643 echo $ECHO_N "(cached) $ECHO_C" >&6 5644 else 5645 ac_check_lib_save_LIBS=$LIBS 5646 LIBS="-lSDL_image $LIBS" 5647 cat >conftest.$ac_ext <<_ACEOF 5648 /* confdefs.h. */ 5649 _ACEOF 5650 cat confdefs.h >>conftest.$ac_ext 5651 cat >>conftest.$ac_ext <<_ACEOF 5652 /* end confdefs.h. */ 5653 5654 5655 int 5656 main () 5657 { 5658 main (); 5659 ; 5660 return 0; 5661 } 5662 _ACEOF 5663 rm -f conftest.$ac_objext conftest$ac_exeext 5664 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5665 (eval $ac_link) 2>conftest.er1 5666 ac_status=$? 5667 grep -v '^ *+' conftest.er1 >conftest.err 5668 rm -f conftest.er1 5669 cat conftest.err >&5 5670 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5671 (exit $ac_status); } && 5672 { ac_try='test -z "$ac_c_werror_flag" 5673 || test ! -s conftest.err' 5674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5675 (eval $ac_try) 2>&5 5676 ac_status=$? 5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5678 (exit $ac_status); }; } && 5679 { ac_try='test -s conftest$ac_exeext' 5680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5681 (eval $ac_try) 2>&5 5682 ac_status=$? 5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5684 (exit $ac_status); }; }; then 5685 ac_cv_lib_SDL_image_main=yes 5686 else 5687 echo "$as_me: failed program was:" >&5 5688 sed 's/^/| /' conftest.$ac_ext >&5 5689 5690 ac_cv_lib_SDL_image_main=no 5691 fi 5692 rm -f conftest.err conftest.$ac_objext \ 5693 conftest$ac_exeext conftest.$ac_ext 5694 LIBS=$ac_check_lib_save_LIBS 5695 fi 5696 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_image_main" >&5 5697 echo "${ECHO_T}$ac_cv_lib_SDL_image_main" >&6 5698 if test $ac_cv_lib_SDL_image_main = yes; then 5699 FOUND_SDL_image=yes 5700 fi 5701 5702 if test "$FOUND_SDL_image" = "yes" ; then 5703 LIBS="$LIBS -lSDL_image" 5704 else 5705 echo "------------------" 5706 echo "SDL_image library not found." 5707 echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/" 5708 echo "------------------" 5709 exit -1 5710 fi 5711 fi 5712 5713 ## checking for SDL 5714 # SDL_VERSION=1.2.7 5715 # AM_PATH_SDL($SDL_VERSION, 5716 # :, 5717 # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 5718 # ) 5719 # CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 5720 # LIBS="$LIBS $SDL_LIBS" 5721 ;; 5722 5723 ### OS X ### 5724 *darwin*) 5725 echo "OS X detected" 5726 5727 osX="yes" 5728 5729 # checking gl header 5730 5731 for ac_header in OpenGL/gl.h 5653 # cheking for GLU-header 5654 5655 for ac_header in OpenGL/glu.h 5732 5656 do 5733 5657 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 5882 5806 done 5883 5807 5884 # cheking for GLU-header 5885 5886 for ac_header in OpenGL/glu.h 5808 5809 LIBS="$LIBS -framework OpenGL" 5810 5811 # checking for SDL-headers 5812 # AC_CHECK_HEADERS(SDL/SDL.h ,, 5813 # [AC_MSG_ERROR([cannot find SDL headers]) ]) 5814 5815 ## checking for SDL 5816 # SDL_VERSION=1.2.7 5817 # AM_PATH_SDL($SDL_VERSION, 5818 # :, 5819 # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 5820 # ) 5821 5822 SDL_CFLAGS=`sdl-config --cflags` 5823 SDL_LIBS=`sdl-config --libs` 5824 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 5825 LIBS="$LIBS $SDL_LIBS" 5826 5827 def_sdl_image=no; 5828 ;; 5829 5830 *) 5831 ;; 5832 esac 5833 5834 5835 5836 ## check for SDL_Image 5837 if test "$def_sdl_image" = "yes"; then 5838 # checking for SDL_image-headers 5839 5840 for ac_header in SDL/SDL_image.h 5887 5841 do 5888 5842 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 6030 5984 6031 5985 else 6032 { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5 6033 echo "$as_me: error: cannot find opengl headers" >&2;} 6034 { (exit 1); exit 1; }; } 5986 echo "sdl_image not found. falling back to other options"; def_sdl_image=no 6035 5987 fi 6036 5988 6037 5989 done 6038 5990 6039 6040 LIBS="$LIBS -framework OpenGL" 6041 6042 # checking for SDL-headers 6043 # AC_CHECK_HEADERS(SDL/SDL.h ,, 6044 # [AC_MSG_ERROR([cannot find SDL headers]) ]) 6045 6046 ## checking for SDL 6047 # SDL_VERSION=1.2.7 6048 # AM_PATH_SDL($SDL_VERSION, 6049 # :, 6050 # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 6051 # ) 6052 6053 SDL_CFLAGS=`sdl-config --cflags` 6054 SDL_LIBS=`sdl-config --libs` 6055 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 6056 LIBS="$LIBS $SDL_LIBS" 6057 6058 def_sdl_image=no; 6059 ;; 6060 6061 *) 6062 ;; 6063 esac 6064 5991 fi 5992 if test "$def_sdl_image" = "yes"; then 5993 # checking for SDL_image-lib 5994 echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5 5995 echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6 5996 if test "${ac_cv_lib_SDL_image_main+set}" = set; then 5997 echo $ECHO_N "(cached) $ECHO_C" >&6 5998 else 5999 ac_check_lib_save_LIBS=$LIBS 6000 LIBS="-lSDL_image $LIBS" 6001 cat >conftest.$ac_ext <<_ACEOF 6002 /* confdefs.h. */ 6003 _ACEOF 6004 cat confdefs.h >>conftest.$ac_ext 6005 cat >>conftest.$ac_ext <<_ACEOF 6006 /* end confdefs.h. */ 6007 6008 6009 int 6010 main () 6011 { 6012 main (); 6013 ; 6014 return 0; 6015 } 6016 _ACEOF 6017 rm -f conftest.$ac_objext conftest$ac_exeext 6018 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6019 (eval $ac_link) 2>conftest.er1 6020 ac_status=$? 6021 grep -v '^ *+' conftest.er1 >conftest.err 6022 rm -f conftest.er1 6023 cat conftest.err >&5 6024 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6025 (exit $ac_status); } && 6026 { ac_try='test -z "$ac_c_werror_flag" 6027 || test ! -s conftest.err' 6028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6029 (eval $ac_try) 2>&5 6030 ac_status=$? 6031 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6032 (exit $ac_status); }; } && 6033 { ac_try='test -s conftest$ac_exeext' 6034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6035 (eval $ac_try) 2>&5 6036 ac_status=$? 6037 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6038 (exit $ac_status); }; }; then 6039 ac_cv_lib_SDL_image_main=yes 6040 else 6041 echo "$as_me: failed program was:" >&5 6042 sed 's/^/| /' conftest.$ac_ext >&5 6043 6044 ac_cv_lib_SDL_image_main=no 6045 fi 6046 rm -f conftest.err conftest.$ac_objext \ 6047 conftest$ac_exeext conftest.$ac_ext 6048 LIBS=$ac_check_lib_save_LIBS 6049 fi 6050 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_image_main" >&5 6051 echo "${ECHO_T}$ac_cv_lib_SDL_image_main" >&6 6052 if test $ac_cv_lib_SDL_image_main = yes; then 6053 FOUND_SDL_image=yes 6054 fi 6055 6056 if test "$FOUND_SDL_image" = "yes" ; then 6057 LIBS="$LIBS -lSDL_image" 6058 else 6059 echo "------------------" 6060 echo "SDL_image library not found." 6061 echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/" 6062 echo "------------------" 6063 exit -1 6064 fi 6065 fi 6065 6066 6066 6067 -
orxonox/branches/images/configure.ac
r3106 r3108 126 126 fi 127 127 128 ## check for SDL_Image129 if test "$def_sdl_image" = "yes"; then130 # checking for SDL_image-headers131 AC_CHECK_HEADERS(SDL/SDL_image.h ,,132 [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])133 fi134 if test "$def_sdl_image" = "yes"; then135 # checking for SDL_image-lib136 AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes)137 if test "$FOUND_SDL_image" = "yes" ; then138 LIBS="$LIBS -lSDL_image"139 else140 echo "------------------"141 echo "SDL_image library not found."142 echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"143 echo "------------------"144 exit -1145 fi146 fi147 128 ;; 148 129 … … 200 181 fi 201 182 202 ## check for SDL_Image203 if test "$def_sdl_image" = "yes"; then204 # checking for SDL_image-headers205 AC_CHECK_HEADERS(SDL/SDL_image.h ,,206 [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])207 fi208 if test "$def_sdl_image" = "yes"; then209 # checking for SDL_image-lib210 AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes)211 if test "$FOUND_SDL_image" = "yes" ; then212 LIBS="$LIBS -lSDL_image"213 else214 echo "------------------"215 echo "SDL_image library not found."216 echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"217 echo "------------------"218 exit -1219 fi220 fi221 183 222 184 ## checking for SDL … … 269 231 270 232 AC_SUBST(MSBITFIELDS) 233 234 ## check for SDL_Image 235 if test "$def_sdl_image" = "yes"; then 236 # checking for SDL_image-headers 237 AC_CHECK_HEADERS(SDL/SDL_image.h ,, 238 [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ]) 239 fi 240 if test "$def_sdl_image" = "yes"; then 241 # checking for SDL_image-lib 242 AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes) 243 if test "$FOUND_SDL_image" = "yes" ; then 244 LIBS="$LIBS -lSDL_image" 245 else 246 echo "------------------" 247 echo "SDL_image library not found." 248 echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/" 249 echo "------------------" 250 exit -1 251 fi 252 fi 253 271 254 272 255 if test "$def_sdl_image" = "no"; then -
orxonox/branches/images/importer/material.cc
r3107 r3108 391 391 pImage->width = map->w; 392 392 pImage->data = (GLubyte*)map->pixels; 393 394 SDL_RWops *imgType;395 imgType=SDL_RWFromFile(imageName, "rb");396 393 if( !IMG_isPNG(SDL_RWFromFile(imageName, "rb")) && !IMG_isJPG(SDL_RWFromFile(imageName, "rb"))) 397 394 for (int i=0;i<map->h * map->w *3;i+=3)
Note: See TracChangeset
for help on using the changeset viewer.