Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2977 in orxonox.OLD for orxonox/branches/osX


Ignore:
Timestamp:
Nov 24, 2004, 12:50:55 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/importer: merged back from the trunk again: command: svn merge trunk/ branches/osX -r 2887:HEAD

Location:
orxonox/branches/osX
Files:
12 edited
3 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/osX/configure

    r2879 r2977  
    37413741fi
    37423742
    3743 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
     3743
     3744### CHECKING FOR SYSTEM ###
     3745
     3746echo "$as_me:$LINENO: checking for System" >&5
     3747echo $ECHO_N "checking for System... $ECHO_C" >&6
     3748case `uname` in
     3749### WINDOWS ###
     3750  *MINGW*)
     3751echo "mingw-WINDOWS detected"
     3752
     3753    mingw="yes"
     3754    MSBITFIELDS="-mms-bitfields"
     3755    MWINDOWS="-mwindows"
     3756
     3757# checking gl header
     3758        #done before loop
     3759
     3760# checking gl header
     3761   # On IRIX 5.3, sys/types and inttypes.h are conflicting.
    37443762
    37453763
     
    38133831
    38143832
    3815 for ac_header in
     3833
     3834for ac_header in GL/gl.h
    38163835do
    38173836as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    39583977_ACEOF
    39593978
     3979else
     3980  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
     3981echo "$as_me: error: cannot find opengl headers" >&2;}
     3982   { (exit 1); exit 1; }; }
    39603983fi
    39613984
    39623985done
    39633986
    3964 
    3965 
    3966 
    3967 ### CHECKING FOR SYSTEM ###
    3968 
    3969 echo "$as_me:$LINENO: checking for System" >&5
    3970 echo $ECHO_N "checking for System... $ECHO_C" >&6
    3971 case `uname` in
    3972 ### WINDOWS ###
    3973   *MINGW*)
    3974 echo "mingw-WINDOWS detected"
    3975 
    3976     mingw="yes"
    3977     MSBITFIELDS="-mms-bitfields"
    3978     MWINDOWS="-mwindows"
    3979 
    3980 # checking gl header
    3981         #done before loop
    3982 
    3983 # checking gl header (has to be here because of a Linux error)
    3984 
    3985 for ac_header in GL/gl.h
     3987#   checking for Windows openGl library
     3988    echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
     3989echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6
     3990if test "${ac_cv_lib_opengl32_main+set}" = set; then
     3991  echo $ECHO_N "(cached) $ECHO_C" >&6
     3992else
     3993  ac_check_lib_save_LIBS=$LIBS
     3994LIBS="-lopengl32  $LIBS"
     3995cat >conftest.$ac_ext <<_ACEOF
     3996/* confdefs.h.  */
     3997_ACEOF
     3998cat confdefs.h >>conftest.$ac_ext
     3999cat >>conftest.$ac_ext <<_ACEOF
     4000/* end confdefs.h.  */
     4001
     4002
     4003int
     4004main ()
     4005{
     4006main ();
     4007  ;
     4008  return 0;
     4009}
     4010_ACEOF
     4011rm -f conftest.$ac_objext conftest$ac_exeext
     4012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4013  (eval $ac_link) 2>conftest.er1
     4014  ac_status=$?
     4015  grep -v '^ *+' conftest.er1 >conftest.err
     4016  rm -f conftest.er1
     4017  cat conftest.err >&5
     4018  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4019  (exit $ac_status); } &&
     4020         { ac_try='test -z "$ac_c_werror_flag"
     4021                         || test ! -s conftest.err'
     4022  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4023  (eval $ac_try) 2>&5
     4024  ac_status=$?
     4025  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4026  (exit $ac_status); }; } &&
     4027         { ac_try='test -s conftest$ac_exeext'
     4028  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4029  (eval $ac_try) 2>&5
     4030  ac_status=$?
     4031  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4032  (exit $ac_status); }; }; then
     4033  ac_cv_lib_opengl32_main=yes
     4034else
     4035  echo "$as_me: failed program was:" >&5
     4036sed 's/^/| /' conftest.$ac_ext >&5
     4037
     4038ac_cv_lib_opengl32_main=no
     4039fi
     4040rm -f conftest.err conftest.$ac_objext \
     4041      conftest$ac_exeext conftest.$ac_ext
     4042LIBS=$ac_check_lib_save_LIBS
     4043fi
     4044echo "$as_me:$LINENO: result: $ac_cv_lib_opengl32_main" >&5
     4045echo "${ECHO_T}$ac_cv_lib_opengl32_main" >&6
     4046if test $ac_cv_lib_opengl32_main = yes; then
     4047  FOUND_opengl32=yes
     4048else
     4049  "gl/gl.h"
     4050fi
     4051
     4052    if test "$FOUND_opengl32" = "yes" ; then
     4053        LIBS="$LIBS -lopengl32"
     4054    else
     4055         echo "------------------"
     4056         echo "opengl not found."
     4057         echo "please install the opengl package which can be found at http://www.opengl.org"
     4058         echo "------------------"
     4059         exit -1
     4060    fi
     4061
     4062# cheking for GLU-header
     4063
     4064for ac_header in GL/glu.h
    39864065do
    39874066as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    41364215done
    41374216
    4138 #   checking for Windows openGl library
    4139     echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
    4140 echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6
    4141 if test "${ac_cv_lib_opengl32_main+set}" = set; then
     4217
     4218# checking for libGLU
     4219    echo "$as_me:$LINENO: checking for main in -lglu32" >&5
     4220echo $ECHO_N "checking for main in -lglu32... $ECHO_C" >&6
     4221if test "${ac_cv_lib_glu32_main+set}" = set; then
    41424222  echo $ECHO_N "(cached) $ECHO_C" >&6
    41434223else
    41444224  ac_check_lib_save_LIBS=$LIBS
    4145 LIBS="-lopengl32  $LIBS"
     4225LIBS="-lglu32  $LIBS"
    41464226cat >conftest.$ac_ext <<_ACEOF
    41474227/* confdefs.h.  */
     
    41824262  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    41834263  (exit $ac_status); }; }; then
    4184   ac_cv_lib_opengl32_main=yes
     4264  ac_cv_lib_glu32_main=yes
    41854265else
    41864266  echo "$as_me: failed program was:" >&5
    41874267sed 's/^/| /' conftest.$ac_ext >&5
    41884268
    4189 ac_cv_lib_opengl32_main=no
     4269ac_cv_lib_glu32_main=no
    41904270fi
    41914271rm -f conftest.err conftest.$ac_objext \
     
    41934273LIBS=$ac_check_lib_save_LIBS
    41944274fi
    4195 echo "$as_me:$LINENO: result: $ac_cv_lib_opengl32_main" >&5
    4196 echo "${ECHO_T}$ac_cv_lib_opengl32_main" >&6
    4197 if test $ac_cv_lib_opengl32_main = yes; then
    4198   FOUND_opengl32=yes
    4199 else
    4200   "gl/gl.h"
    4201 fi
    4202 
    4203     if test "$FOUND_opengl32" = "yes" ; then
    4204         LIBS="$LIBS -lopengl32"
     4275echo "$as_me:$LINENO: result: $ac_cv_lib_glu32_main" >&5
     4276echo "${ECHO_T}$ac_cv_lib_glu32_main" >&6
     4277if test $ac_cv_lib_glu32_main = yes; then
     4278  FOUND_glu32=yes
     4279fi
     4280
     4281    if test "$FOUND_glu32" = "yes" ; then
     4282        LIBS="$LIBS -lGLU32"
    42054283    else
    42064284         echo "------------------"
    4207          echo "opengl not found."
    4208          echo "please install the opengl package which can be found at http://www.opengl.org"
     4285         echo "GLU library not found."
     4286         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
    42094287         echo "------------------"
    42104288         exit -1
    42114289    fi
    42124290
    4213 # cheking for GLU-header
    4214 
    4215 for ac_header in GL/glu.h
     4291
     4292# checking for mingw32
     4293    echo "$as_me:$LINENO: checking for main in -lmingw32" >&5
     4294echo $ECHO_N "checking for main in -lmingw32... $ECHO_C" >&6
     4295if test "${ac_cv_lib_mingw32_main+set}" = set; then
     4296  echo $ECHO_N "(cached) $ECHO_C" >&6
     4297else
     4298  ac_check_lib_save_LIBS=$LIBS
     4299LIBS="-lmingw32  $LIBS"
     4300cat >conftest.$ac_ext <<_ACEOF
     4301/* confdefs.h.  */
     4302_ACEOF
     4303cat confdefs.h >>conftest.$ac_ext
     4304cat >>conftest.$ac_ext <<_ACEOF
     4305/* end confdefs.h.  */
     4306
     4307
     4308int
     4309main ()
     4310{
     4311main ();
     4312  ;
     4313  return 0;
     4314}
     4315_ACEOF
     4316rm -f conftest.$ac_objext conftest$ac_exeext
     4317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4318  (eval $ac_link) 2>conftest.er1
     4319  ac_status=$?
     4320  grep -v '^ *+' conftest.er1 >conftest.err
     4321  rm -f conftest.er1
     4322  cat conftest.err >&5
     4323  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4324  (exit $ac_status); } &&
     4325         { ac_try='test -z "$ac_c_werror_flag"
     4326                         || test ! -s conftest.err'
     4327  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4328  (eval $ac_try) 2>&5
     4329  ac_status=$?
     4330  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4331  (exit $ac_status); }; } &&
     4332         { ac_try='test -s conftest$ac_exeext'
     4333  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4334  (eval $ac_try) 2>&5
     4335  ac_status=$?
     4336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4337  (exit $ac_status); }; }; then
     4338  ac_cv_lib_mingw32_main=yes
     4339else
     4340  echo "$as_me: failed program was:" >&5
     4341sed 's/^/| /' conftest.$ac_ext >&5
     4342
     4343ac_cv_lib_mingw32_main=no
     4344fi
     4345rm -f conftest.err conftest.$ac_objext \
     4346      conftest$ac_exeext conftest.$ac_ext
     4347LIBS=$ac_check_lib_save_LIBS
     4348fi
     4349echo "$as_me:$LINENO: result: $ac_cv_lib_mingw32_main" >&5
     4350echo "${ECHO_T}$ac_cv_lib_mingw32_main" >&6
     4351if test $ac_cv_lib_mingw32_main = yes; then
     4352  FOUND_mingw32=yes
     4353fi
     4354
     4355    if test $FOUND_mingw32 = "yes"; then
     4356        LIBS="$LIBS -lmingw32"
     4357    fi
     4358# checking for SDL-headers
     4359
     4360for ac_header in SDL/SDL.h
    42164361do
    42174362as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    43594504
    43604505else
    4361   { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
    4362 echo "$as_me: error: cannot find opengl headers" >&2;}
     4506  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
     4507echo "$as_me: error: cannot find SDL headers" >&2;}
    43634508   { (exit 1); exit 1; }; }
    43644509fi
     
    43674512
    43684513
    4369 # checking for libGLU
    4370     echo "$as_me:$LINENO: checking for main in -lglu32" >&5
    4371 echo $ECHO_N "checking for main in -lglu32... $ECHO_C" >&6
    4372 if test "${ac_cv_lib_glu32_main+set}" = set; then
     4514#checking for libSDL
     4515    echo "$as_me:$LINENO: checking for main in -lsdlmain" >&5
     4516echo $ECHO_N "checking for main in -lsdlmain... $ECHO_C" >&6
     4517if test "${ac_cv_lib_sdlmain_main+set}" = set; then
    43734518  echo $ECHO_N "(cached) $ECHO_C" >&6
    43744519else
    43754520  ac_check_lib_save_LIBS=$LIBS
    4376 LIBS="-lglu32  $LIBS"
     4521LIBS="-lsdlmain  $LIBS"
    43774522cat >conftest.$ac_ext <<_ACEOF
    43784523/* confdefs.h.  */
     
    44134558  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    44144559  (exit $ac_status); }; }; then
    4415   ac_cv_lib_glu32_main=yes
     4560  ac_cv_lib_sdlmain_main=yes
    44164561else
    44174562  echo "$as_me: failed program was:" >&5
    44184563sed 's/^/| /' conftest.$ac_ext >&5
    44194564
    4420 ac_cv_lib_glu32_main=no
     4565ac_cv_lib_sdlmain_main=no
    44214566fi
    44224567rm -f conftest.err conftest.$ac_objext \
     
    44244569LIBS=$ac_check_lib_save_LIBS
    44254570fi
    4426 echo "$as_me:$LINENO: result: $ac_cv_lib_glu32_main" >&5
    4427 echo "${ECHO_T}$ac_cv_lib_glu32_main" >&6
    4428 if test $ac_cv_lib_glu32_main = yes; then
    4429   FOUND_glu32=yes
    4430 fi
    4431 
    4432     if test "$FOUND_glu32" = "yes" ; then
    4433         LIBS="$LIBS -lGLU32"
     4571echo "$as_me:$LINENO: result: $ac_cv_lib_sdlmain_main" >&5
     4572echo "${ECHO_T}$ac_cv_lib_sdlmain_main" >&6
     4573if test $ac_cv_lib_sdlmain_main = yes; then
     4574  FOUND_sdlmain=yes
     4575fi
     4576
     4577    if test "$FOUND_sdlmain" = "yes" ; then
     4578        LIBS="$LIBS -lsdlmain"
    44344579    else
    44354580         echo "------------------"
    4436          echo "GLU library not found."
    4437          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
     4581         echo "SDL library not found."
     4582         echo "please install the SDL library, which can be found at http://www.libsdl.org"
    44384583         echo "------------------"
    4439          exit -1
     4584         exit 1
    44404585    fi
    4441 
    4442 
    4443 # checking for mingw32
    4444     echo "$as_me:$LINENO: checking for main in -lmingw32" >&5
    4445 echo $ECHO_N "checking for main in -lmingw32... $ECHO_C" >&6
    4446 if test "${ac_cv_lib_mingw32_main+set}" = set; then
     4586    echo "$as_me:$LINENO: checking for main in -lsdl" >&5
     4587echo $ECHO_N "checking for main in -lsdl... $ECHO_C" >&6
     4588if test "${ac_cv_lib_sdl_main+set}" = set; then
    44474589  echo $ECHO_N "(cached) $ECHO_C" >&6
    44484590else
    44494591  ac_check_lib_save_LIBS=$LIBS
    4450 LIBS="-lmingw32  $LIBS"
     4592LIBS="-lsdl  $LIBS"
    44514593cat >conftest.$ac_ext <<_ACEOF
    44524594/* confdefs.h.  */
     
    44874629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    44884630  (exit $ac_status); }; }; then
    4489   ac_cv_lib_mingw32_main=yes
     4631  ac_cv_lib_sdl_main=yes
    44904632else
    44914633  echo "$as_me: failed program was:" >&5
    44924634sed 's/^/| /' conftest.$ac_ext >&5
    44934635
    4494 ac_cv_lib_mingw32_main=no
     4636ac_cv_lib_sdl_main=no
    44954637fi
    44964638rm -f conftest.err conftest.$ac_objext \
     
    44984640LIBS=$ac_check_lib_save_LIBS
    44994641fi
    4500 echo "$as_me:$LINENO: result: $ac_cv_lib_mingw32_main" >&5
    4501 echo "${ECHO_T}$ac_cv_lib_mingw32_main" >&6
    4502 if test $ac_cv_lib_mingw32_main = yes; then
    4503   FOUND_mingw32=yes
    4504 fi
    4505 
    4506     if test $FOUND_mingw32 = "yes"; then
    4507         LIBS="$LIBS -lmingw32"
     4642echo "$as_me:$LINENO: result: $ac_cv_lib_sdl_main" >&5
     4643echo "${ECHO_T}$ac_cv_lib_sdl_main" >&6
     4644if test $ac_cv_lib_sdl_main = yes; then
     4645  FOUND_sdl=yes
     4646fi
     4647
     4648    if test "$FOUND_sdl" = "yes" ; then
     4649        LIBS="$LIBS -lsdl"
     4650    else
     4651         echo "------------------"
     4652         echo "SDL library not found."
     4653         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     4654         echo "------------------"
     4655         exit -1
    45084656    fi
    4509 # checking for SDL-headers
    4510 
    4511 for ac_header in SDL/SDL.h
     4657
     4658    ;;
     4659
     4660### LINUX ###
     4661 *Linux*)
     4662echo "Linux detected"
     4663
     4664 Linux="yes"
     4665
     4666# checking gl header
     4667
     4668for ac_header in GL/gl.h
    45124669do
    45134670as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    46554812
    46564813else
    4657   { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
    4658 echo "$as_me: error: cannot find SDL headers" >&2;}
     4814  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
     4815echo "$as_me: error: cannot find opengl headers" >&2;}
    46594816   { (exit 1); exit 1; }; }
    46604817fi
     
    46634820
    46644821
    4665 #checking for libSDL
    4666     echo "$as_me:$LINENO: checking for main in -lsdlmain" >&5
    4667 echo $ECHO_N "checking for main in -lsdlmain... $ECHO_C" >&6
    4668 if test "${ac_cv_lib_sdlmain_main+set}" = set; then
     4822#  checking for Unix GL
     4823   echo "$as_me:$LINENO: checking for main in -lGL" >&5
     4824echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
     4825if test "${ac_cv_lib_GL_main+set}" = set; then
    46694826  echo $ECHO_N "(cached) $ECHO_C" >&6
    46704827else
    46714828  ac_check_lib_save_LIBS=$LIBS
    4672 LIBS="-lsdlmain  $LIBS"
     4829LIBS="-lGL  $LIBS"
    46734830cat >conftest.$ac_ext <<_ACEOF
    46744831/* confdefs.h.  */
     
    47094866  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    47104867  (exit $ac_status); }; }; then
    4711   ac_cv_lib_sdlmain_main=yes
     4868  ac_cv_lib_GL_main=yes
    47124869else
    47134870  echo "$as_me: failed program was:" >&5
    47144871sed 's/^/| /' conftest.$ac_ext >&5
    47154872
    4716 ac_cv_lib_sdlmain_main=no
     4873ac_cv_lib_GL_main=no
    47174874fi
    47184875rm -f conftest.err conftest.$ac_objext \
     
    47204877LIBS=$ac_check_lib_save_LIBS
    47214878fi
    4722 echo "$as_me:$LINENO: result: $ac_cv_lib_sdlmain_main" >&5
    4723 echo "${ECHO_T}$ac_cv_lib_sdlmain_main" >&6
    4724 if test $ac_cv_lib_sdlmain_main = yes; then
    4725   FOUND_sdlmain=yes
    4726 fi
    4727 
    4728     if test "$FOUND_sdlmain" = "yes" ; then
    4729         LIBS="$LIBS -lsdlmain"
    4730     else
     4879echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
     4880echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
     4881if test $ac_cv_lib_GL_main = yes; then
     4882  FOUND_GL=yes
     4883fi
     4884
     4885   if test "$FOUND_GL" = "yes" ; then
     4886     LIBS="$LIBS -lGL"
     4887   else
    47314888         echo "------------------"
    4732          echo "SDL library not found."
    4733          echo "please install the SDL library, which can be found at http://www.libsdl.org"
    4734          echo "------------------"
    4735          exit 1
    4736     fi
    4737     echo "$as_me:$LINENO: checking for main in -lsdl" >&5
    4738 echo $ECHO_N "checking for main in -lsdl... $ECHO_C" >&6
    4739 if test "${ac_cv_lib_sdl_main+set}" = set; then
    4740   echo $ECHO_N "(cached) $ECHO_C" >&6
    4741 else
    4742   ac_check_lib_save_LIBS=$LIBS
    4743 LIBS="-lsdl  $LIBS"
    4744 cat >conftest.$ac_ext <<_ACEOF
    4745 /* confdefs.h.  */
    4746 _ACEOF
    4747 cat confdefs.h >>conftest.$ac_ext
    4748 cat >>conftest.$ac_ext <<_ACEOF
    4749 /* end confdefs.h.  */
    4750 
    4751 
    4752 int
    4753 main ()
    4754 {
    4755 main ();
    4756   ;
    4757   return 0;
    4758 }
    4759 _ACEOF
    4760 rm -f conftest.$ac_objext conftest$ac_exeext
    4761 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    4762   (eval $ac_link) 2>conftest.er1
    4763   ac_status=$?
    4764   grep -v '^ *+' conftest.er1 >conftest.err
    4765   rm -f conftest.er1
    4766   cat conftest.err >&5
    4767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4768   (exit $ac_status); } &&
    4769          { ac_try='test -z "$ac_c_werror_flag"
    4770                          || test ! -s conftest.err'
    4771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4772   (eval $ac_try) 2>&5
    4773   ac_status=$?
    4774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4775   (exit $ac_status); }; } &&
    4776          { ac_try='test -s conftest$ac_exeext'
    4777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4778   (eval $ac_try) 2>&5
    4779   ac_status=$?
    4780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4781   (exit $ac_status); }; }; then
    4782   ac_cv_lib_sdl_main=yes
    4783 else
    4784   echo "$as_me: failed program was:" >&5
    4785 sed 's/^/| /' conftest.$ac_ext >&5
    4786 
    4787 ac_cv_lib_sdl_main=no
    4788 fi
    4789 rm -f conftest.err conftest.$ac_objext \
    4790       conftest$ac_exeext conftest.$ac_ext
    4791 LIBS=$ac_check_lib_save_LIBS
    4792 fi
    4793 echo "$as_me:$LINENO: result: $ac_cv_lib_sdl_main" >&5
    4794 echo "${ECHO_T}$ac_cv_lib_sdl_main" >&6
    4795 if test $ac_cv_lib_sdl_main = yes; then
    4796   FOUND_sdl=yes
    4797 fi
    4798 
    4799     if test "$FOUND_sdl" = "yes" ; then
    4800         LIBS="$LIBS -lsdl"
    4801     else
    4802          echo "------------------"
    4803          echo "SDL library not found."
    4804          echo "please install the SDL library, which can be found at http://www.libsdl.org"
     4889         echo "opengl not found."
     4890         echo "please install the opengl package which can be found at http://www.opengl.org"
    48054891         echo "------------------"
    48064892         exit -1
    4807     fi
    4808 
    4809     ;;
    4810 
    4811 ### LINUX ###
    4812  *Linux*)
    4813 echo "Linux detected"
    4814 
    4815  Linux="yes"
    4816 
    4817 # checking gl header (has to be here because of a Linux error)
    4818 
    4819 for ac_header in GL/gl.h
     4893   fi
     4894
     4895# cheking for GLU-header
     4896
     4897for ac_header in GL/glu.h
    48204898do
    48214899as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    49715049
    49725050
    4973 #  checking for Unix GL
    4974    echo "$as_me:$LINENO: checking for main in -lGL" >&5
    4975 echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
    4976 if test "${ac_cv_lib_GL_main+set}" = set; then
     5051    echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
     5052echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
     5053if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
    49775054  echo $ECHO_N "(cached) $ECHO_C" >&6
    49785055else
    49795056  ac_check_lib_save_LIBS=$LIBS
    4980 LIBS="-lGL  $LIBS"
     5057LIBS="-lGLU  $LIBS"
    49815058cat >conftest.$ac_ext <<_ACEOF
    49825059/* confdefs.h.  */
     
    49865063/* end confdefs.h.  */
    49875064
    4988 
     5065/* Override any gcc2 internal prototype to avoid an error.  */
     5066#ifdef __cplusplus
     5067extern "C"
     5068#endif
     5069/* We use char because int might match the return type of a gcc2
     5070   builtin and then its argument prototype would still apply.  */
     5071char gluProject ();
    49895072int
    49905073main ()
    49915074{
    4992 main ();
     5075gluProject ();
    49935076  ;
    49945077  return 0;
     
    50175100  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    50185101  (exit $ac_status); }; }; then
    5019   ac_cv_lib_GL_main=yes
     5102  ac_cv_lib_GLU_gluProject=yes
    50205103else
    50215104  echo "$as_me: failed program was:" >&5
    50225105sed 's/^/| /' conftest.$ac_ext >&5
    50235106
    5024 ac_cv_lib_GL_main=no
     5107ac_cv_lib_GLU_gluProject=no
    50255108fi
    50265109rm -f conftest.err conftest.$ac_objext \
     
    50285111LIBS=$ac_check_lib_save_LIBS
    50295112fi
    5030 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
    5031 echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
    5032 if test $ac_cv_lib_GL_main = yes; then
    5033   FOUND_GL=yes
    5034 fi
    5035 
    5036    if test "$FOUND_GL" = "yes" ; then
    5037      LIBS="$LIBS -lGL"
    5038    else
     5113echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5
     5114echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
     5115if test $ac_cv_lib_GLU_gluProject = yes; then
     5116  FOUND_GLU=yes
     5117fi
     5118
     5119    if test "$FOUND_GLU" = "yes" ; then
     5120      LIBS="$LIBS -lGLU"
     5121    else
    50395122         echo "------------------"
    5040          echo "opengl not found."
    5041          echo "please install the opengl package which can be found at http://www.opengl.org"
     5123         echo "GLU library not found."
     5124         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
    50425125         echo "------------------"
    50435126         exit -1
    5044    fi
    5045 
    5046 # cheking for GLU-header
    5047 
    5048 for ac_header in GL/glu.h
     5127    fi
     5128
     5129# checking for SDL-headers
     5130
     5131for ac_header in SDL/SDL.h
    50495132do
    50505133as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    51925275
    51935276else
    5194   { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
    5195 echo "$as_me: error: cannot find opengl headers" >&2;}
    5196    { (exit 1); exit 1; }; }
    5197 fi
    5198 
    5199 done
    5200 
    5201 
    5202     echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
    5203 echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
    5204 if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
    5205   echo $ECHO_N "(cached) $ECHO_C" >&6
    5206 else
    5207   ac_check_lib_save_LIBS=$LIBS
    5208 LIBS="-lGLU  $LIBS"
    5209 cat >conftest.$ac_ext <<_ACEOF
    5210 /* confdefs.h.  */
    5211 _ACEOF
    5212 cat confdefs.h >>conftest.$ac_ext
    5213 cat >>conftest.$ac_ext <<_ACEOF
    5214 /* end confdefs.h.  */
    5215 
    5216 /* Override any gcc2 internal prototype to avoid an error.  */
    5217 #ifdef __cplusplus
    5218 extern "C"
    5219 #endif
    5220 /* We use char because int might match the return type of a gcc2
    5221    builtin and then its argument prototype would still apply.  */
    5222 char gluProject ();
    5223 int
    5224 main ()
    5225 {
    5226 gluProject ();
    5227   ;
    5228   return 0;
    5229 }
    5230 _ACEOF
    5231 rm -f conftest.$ac_objext conftest$ac_exeext
    5232 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5233   (eval $ac_link) 2>conftest.er1
    5234   ac_status=$?
    5235   grep -v '^ *+' conftest.er1 >conftest.err
    5236   rm -f conftest.er1
    5237   cat conftest.err >&5
    5238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5239   (exit $ac_status); } &&
    5240          { ac_try='test -z "$ac_c_werror_flag"
    5241                          || test ! -s conftest.err'
    5242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5243   (eval $ac_try) 2>&5
    5244   ac_status=$?
    5245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5246   (exit $ac_status); }; } &&
    5247          { ac_try='test -s conftest$ac_exeext'
    5248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5249   (eval $ac_try) 2>&5
    5250   ac_status=$?
    5251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5252   (exit $ac_status); }; }; then
    5253   ac_cv_lib_GLU_gluProject=yes
    5254 else
    5255   echo "$as_me: failed program was:" >&5
    5256 sed 's/^/| /' conftest.$ac_ext >&5
    5257 
    5258 ac_cv_lib_GLU_gluProject=no
    5259 fi
    5260 rm -f conftest.err conftest.$ac_objext \
    5261       conftest$ac_exeext conftest.$ac_ext
    5262 LIBS=$ac_check_lib_save_LIBS
    5263 fi
    5264 echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5
    5265 echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
    5266 if test $ac_cv_lib_GLU_gluProject = yes; then
    5267   FOUND_GLU=yes
    5268 fi
    5269 
    5270     if test "$FOUND_GLU" = "yes" ; then
    5271       LIBS="$LIBS -lGLU"
    5272     else
    5273          echo "------------------"
    5274          echo "GLU library not found."
    5275          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
    5276          echo "------------------"
    5277          exit -1
    5278     fi
    5279 
    5280 # checking for SDL-headers
    5281 
    5282 for ac_header in SDL/SDL.h
    5283 do
    5284 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    5285 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    5286   echo "$as_me:$LINENO: checking for $ac_header" >&5
    5287 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    5288 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    5289   echo $ECHO_N "(cached) $ECHO_C" >&6
    5290 fi
    5291 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    5292 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    5293 else
    5294   # Is the header compilable?
    5295 echo "$as_me:$LINENO: checking $ac_header usability" >&5
    5296 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
    5297 cat >conftest.$ac_ext <<_ACEOF
    5298 /* confdefs.h.  */
    5299 _ACEOF
    5300 cat confdefs.h >>conftest.$ac_ext
    5301 cat >>conftest.$ac_ext <<_ACEOF
    5302 /* end confdefs.h.  */
    5303 $ac_includes_default
    5304 #include <$ac_header>
    5305 _ACEOF
    5306 rm -f conftest.$ac_objext
    5307 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    5308   (eval $ac_compile) 2>conftest.er1
    5309   ac_status=$?
    5310   grep -v '^ *+' conftest.er1 >conftest.err
    5311   rm -f conftest.er1
    5312   cat conftest.err >&5
    5313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5314   (exit $ac_status); } &&
    5315          { ac_try='test -z "$ac_c_werror_flag"
    5316                          || test ! -s conftest.err'
    5317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5318   (eval $ac_try) 2>&5
    5319   ac_status=$?
    5320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5321   (exit $ac_status); }; } &&
    5322          { ac_try='test -s conftest.$ac_objext'
    5323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5324   (eval $ac_try) 2>&5
    5325   ac_status=$?
    5326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5327   (exit $ac_status); }; }; then
    5328   ac_header_compiler=yes
    5329 else
    5330   echo "$as_me: failed program was:" >&5
    5331 sed 's/^/| /' conftest.$ac_ext >&5
    5332 
    5333 ac_header_compiler=no
    5334 fi
    5335 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    5336 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    5337 echo "${ECHO_T}$ac_header_compiler" >&6
    5338 
    5339 # Is the header present?
    5340 echo "$as_me:$LINENO: checking $ac_header presence" >&5
    5341 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
    5342 cat >conftest.$ac_ext <<_ACEOF
    5343 /* confdefs.h.  */
    5344 _ACEOF
    5345 cat confdefs.h >>conftest.$ac_ext
    5346 cat >>conftest.$ac_ext <<_ACEOF
    5347 /* end confdefs.h.  */
    5348 #include <$ac_header>
    5349 _ACEOF
    5350 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    5351   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    5352   ac_status=$?
    5353   grep -v '^ *+' conftest.er1 >conftest.err
    5354   rm -f conftest.er1
    5355   cat conftest.err >&5
    5356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5357   (exit $ac_status); } >/dev/null; then
    5358   if test -s conftest.err; then
    5359     ac_cpp_err=$ac_c_preproc_warn_flag
    5360     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
    5361   else
    5362     ac_cpp_err=
    5363   fi
    5364 else
    5365   ac_cpp_err=yes
    5366 fi
    5367 if test -z "$ac_cpp_err"; then
    5368   ac_header_preproc=yes
    5369 else
    5370   echo "$as_me: failed program was:" >&5
    5371 sed 's/^/| /' conftest.$ac_ext >&5
    5372 
    5373   ac_header_preproc=no
    5374 fi
    5375 rm -f conftest.err conftest.$ac_ext
    5376 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    5377 echo "${ECHO_T}$ac_header_preproc" >&6
    5378 
    5379 # So?  What about this header?
    5380 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
    5381   yes:no: )
    5382     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
    5383 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    5384     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
    5385 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    5386     ac_header_preproc=yes
    5387     ;;
    5388   no:yes:* )
    5389     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
    5390 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    5391     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
    5392 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    5393     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
    5394 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    5395     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
    5396 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    5397     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
    5398 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    5399     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    5400 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    5401     (
    5402       cat <<\_ASBOX
    5403 ## ------------------------------------------- ##
    5404 ## Report this to orxonox-dev@mail.datacore.ch ##
    5405 ## ------------------------------------------- ##
    5406 _ASBOX
    5407     ) |
    5408       sed "s/^/$as_me: WARNING:     /" >&2
    5409     ;;
    5410 esac
    5411 echo "$as_me:$LINENO: checking for $ac_header" >&5
    5412 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    5413 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    5414   echo $ECHO_N "(cached) $ECHO_C" >&6
    5415 else
    5416   eval "$as_ac_Header=\$ac_header_preproc"
    5417 fi
    5418 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    5419 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    5420 
    5421 fi
    5422 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    5423   cat >>confdefs.h <<_ACEOF
    5424 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    5425 _ACEOF
    5426 
    5427 else
    54285277  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
    54295278echo "$as_me: error: cannot find SDL headers" >&2;}
     
    55065355     fi
    55075356
    5508     ;;
    5509   *)
    5510     mingw="no"
    5511     ;;
    5512 esac
    5513 echo "$as_me:$LINENO: result: $mingw" >&5
    5514 echo "${ECHO_T}$mingw" >&6
    5515 
    5516 
    5517 #### Checking for LIBraries.
    5518 
    5519 # FIXME: Replace `main' with a function in `-lOSMesa':
     5357     # FIXME: Replace `main' with a function in `-lOSMesa':
    55205358
    55215359echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5
     
    55865424fi
    55875425
    5588 # FIXME: Replace `main' with a function in `-lX11':
     5426     # FIXME: Replace `main' with a function in `-lX11':
    55895427
    55905428echo "$as_me:$LINENO: checking for main in -lX11" >&5
     
    56555493fi
    56565494
    5657 # FIXME: Replace `main' with a function in `-lXt':
     5495     # FIXME: Replace `main' with a function in `-lXt':
    56585496
    56595497echo "$as_me:$LINENO: checking for main in -lXt" >&5
     
    57245562fi
    57255563
     5564    ;;
     5565  *)
     5566    mingw="no"
     5567    ;;
     5568esac
     5569
     5570
     5571
    57265572
    57275573
    57285574#checking for pthread libs
    5729 echo "$as_me:$LINENO: checking for main in -lpthread" >&5
     5575 echo "$as_me:$LINENO: checking for main in -lpthread" >&5
    57305576echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
    57315577if test "${ac_cv_lib_pthread_main+set}" = set; then
     
    57895635fi
    57905636
    5791 if test "$FOUND_pthread" = "yes" ; then
     5637 if test "$FOUND_pthread" = "yes" ; then
    57925638    LIBS="$LIBS -lpthread"
    5793 fi
     5639 fi
    57945640
    57955641
  • orxonox/branches/osX/configure.ac

    r2879 r2977  
    1616
    1717
    18 AC_CHECK_HEADERS(,,,)
    19 
    20 
     18AC_HEADER_STDC
    2119
    2220### CHECKING FOR SYSTEM ###
     
    3533        #done before loop
    3634
    37 # checking gl header (has to be here because of a Linux error)
     35# checking gl header
    3836   AC_CHECK_HEADERS(GL/gl.h ,,
    3937      [AC_MSG_ERROR([cannot find opengl headers]) ])
     
    106104 Linux="yes"
    107105
    108 # checking gl header (has to be here because of a Linux error)
     106# checking gl header
    109107   AC_CHECK_HEADERS(GL/gl.h ,,
    110108      [AC_MSG_ERROR([cannot find opengl headers]) ])
     
    152150     fi   
    153151       
     152     # FIXME: Replace `main' with a function in `-lOSMesa':
     153      AC_CHECK_LIB([OSMesa], [main])
     154     # FIXME: Replace `main' with a function in `-lX11':
     155      AC_CHECK_LIB([X11], [main])
     156     # FIXME: Replace `main' with a function in `-lXt':
     157      AC_CHECK_LIB([Xt], [main])
    154158    ;;
    155159  *)
     
    157161    ;;
    158162esac
    159 AC_MSG_RESULT([$mingw])
     163
    160164AC_SUBST(MSBITFIELDS)
    161165
    162 #### Checking for LIBraries.
    163 
    164 # FIXME: Replace `main' with a function in `-lOSMesa':
    165 AC_CHECK_LIB([OSMesa], [main])
    166 # FIXME: Replace `main' with a function in `-lX11':
    167 AC_CHECK_LIB([X11], [main])
    168 # FIXME: Replace `main' with a function in `-lXt':
    169 AC_CHECK_LIB([Xt], [main])
    170166
    171167
    172168#checking for pthread libs
    173 AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
    174 if test "$FOUND_pthread" = "yes" ; then
     169 AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
     170 if test "$FOUND_pthread" = "yes" ; then
    175171    LIBS="$LIBS -lpthread"
    176 fi
     172 fi
    177173
    178174
     
    180176
    181177# FIXME: Replace `main' with a function in `-lm':
    182 AC_CHECK_LIB([m], [main])
     178 AC_CHECK_LIB([m], [main])
    183179
    184180LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
  • orxonox/branches/osX/importer/Makefile.am

    r2776 r2977  
    66
    77bin_PROGRAMS=importer
    8 importer_SOURCES=framework.cc windowHandler.cc object.cc array.cc material.cc
     8importer_SOURCES=framework.cc windowHandler.cc vector.cc object.cc array.cc material.cc
    99
    10 noinst_HEADERS=windowHandler.h object.h array.h material.h
     10noinst_HEADERS=framework.h windowHandler.h  vector.h object.h array.h material.h
    1111
    1212
  • orxonox/branches/osX/importer/Makefile.in

    r2776 r2977  
    5353PROGRAMS = $(bin_PROGRAMS)
    5454am_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \
    55         object.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT)
     55        vector.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \
     56        material.$(OBJEXT)
    5657importer_OBJECTS = $(am_importer_OBJECTS)
    5758importer_LDADD = $(LDADD)
     
    6162@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/framework.Po \
    6263@AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/object.Po \
    63 @AMDEP_TRUE@    ./$(DEPDIR)/windowHandler.Po
     64@AMDEP_TRUE@    ./$(DEPDIR)/vector.Po ./$(DEPDIR)/windowHandler.Po
    6465CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    6566        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    151152AM_CXXFLAGS = "-I/usr/X11R6/include"
    152153AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
    153 importer_SOURCES = framework.cc windowHandler.cc object.cc array.cc material.cc
    154 noinst_HEADERS = windowHandler.h object.h array.h material.h
     154importer_SOURCES = framework.cc windowHandler.cc vector.cc object.cc array.cc material.cc
     155noinst_HEADERS = framework.h windowHandler.h  vector.h object.h array.h material.h
    155156all: all-am
    156157
     
    223224@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
    224225@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@
     226@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
    225227@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windowHandler.Po@am__quote@
    226228
  • orxonox/branches/osX/importer/framework.cc

    r2863 r2977  
    1 #include "windowHandler.h" // Include the Whandler Basecode
    2 #include "object.h"
     1#include "framework.h"
    32
    43int verbose = 1;
    5 WindowHandler wHandler;  // Create an instance of the whandler basecode class
    6 Object* obj;
    7 float rotator = 0.0;
    8   GLfloat whiteLight[] = {1.0, 1.0, 0.0,1.0};
    94
    105void DrawGLScene()
    116{
    12   rotator +=.001;
    13  
     7  currFrame = SDL_GetTicks();
     8  dt = currFrame - lastFrame;
     9  if (dt == 0)
     10    dist += (zoomTo-dist)/500;
     11  else
     12    dist += (zoomTo-dist)/500 *(float)dt;
     13
     14  rotatorP += rotatorV *(float)dt;
     15 
     16
    1417  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
    1518  glLoadIdentity(); // Reset the view
     
    1720  glMatrixMode(GL_PROJECTION);
    1821  glLoadIdentity();     
    19   gluPerspective(45.0f,500/375,0.1f,100.0f);
    20   gluLookAt (5*sin(rotator),7.5,5*cos(rotator), 0,0,0, 0,1,0);
    21   whiteLight[1] = .5+.5*sin(rotator*10);
    22   whiteLight[2] = .5+.5*sin(rotator*10);
    23 
    24   GLfloat lightPosition[] = {10.0*sin(rotator*10), 10, 19.0, 0.0};
    25   glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
    26 
    27   glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
     22  gluPerspective(45.0f,500/375,0.1f,dist * 5.0f);
     23    gluLookAt (0, dist , dist, 0,0,0, up.x,up.y,up.z);
     24
     25  glMatrixMode(GL_MODELVIEW);
     26  glPushMatrix();
     27  //  glRotatef (180, dir.x, dir.y, dir.z);
     28  glMultMatrixf (*matQ);
    2829  obj->draw();
    2930
     31  glPopMatrix();
     32
    3033  SDL_GL_SwapBuffers(); // Swap the buffers
     34  lastFrame = currFrame;
    3135}
    3236
     
    4650    return 0;
    4751  }
     52 
     53  printf ("%i, %i\n", wHandler.screen->w, wHandler.screen->h);
    4854  if (argc>=3)
    4955    obj = new Object (argv[1], atof(argv[2]));
     
    5359    obj = new Object();
    5460 
     61  M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0);
     62  rotAxis = Vector (0.0,1.0,0.0);
     63  rotAngle = 0;
     64
     65  matQ[0][0] = matQ[1][1] = matQ[2][2] = matQ[3][3] = 1;
     66  rotQ = Quaternion (rotAngle, rotAxis);
     67  rotQlast = rotQ;
     68  dir = Vector (0.0, 0.0, 1.0);
     69  up = Vector (0.0, 1.0, 0.0);
     70
     71  glEnable(GL_LIGHTING);
     72  glEnable(GL_DEPTH_TEST);
     73
     74  GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0};
     75  GLfloat light0Position[] = {10.0, 10.0, 10.0, 0.0};
     76  GLfloat light1Position[] = {-10.0, -7.0, -6.0, 0.0};
    5577  GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
     78
     79  glEnable(GL_LIGHT0);
     80  glLightfv(GL_LIGHT0, GL_POSITION, light0Position);
    5681  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
    5782  glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
    58   glEnable(GL_LIGHTING);
    59   glEnable(GL_LIGHT0);
    60   glEnable(GL_DEPTH_TEST);
    61 
     83 
     84  glEnable(GL_LIGHT1);
     85  glLightfv(GL_LIGHT1, GL_POSITION, light1Position);
     86  glLightfv(GL_LIGHT1, GL_DIFFUSE, whiteLight);
     87  glLightfv(GL_LIGHT1, GL_SPECULAR, whiteLight);
     88 
     89  rotatorP = .0;
     90  rotatorV = .0;
     91  dist = 5.0;
     92  zoomTo = dist;
    6293  // Build the font from a TGA image font.tga in the data directory
    6394  // Hide the mouse cursor
    64   SDL_ShowCursor(0);
     95    SDL_ShowCursor(2);
     96    mouse1Down = false;
    6597
    6698  // This is the main loop for the entire program and it will run until done==TRUE
     
    73105    while ( SDL_PollEvent(&event) ) {
    74106      switch (event.type) {
     107      case SDL_MOUSEMOTION:
     108        if (verbose >=3)
     109          printf("Mouse motion about %d,%d Pixels to (%d,%d).\n",
     110                 event.motion.xrel, event.motion.yrel,
     111                 event.motion.x, event.motion.y);
     112        // TRACKBALL
     113        if (mouse1Down)
     114          {
     115            int mX = event.button.x;
     116            int mY = event.button.y;
     117            int wH = wHandler.screen->h;
     118            int wW = wHandler.screen->w;
     119            Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) ));
     120            //      printf ("tmpV: %f, %f, %f\n", tmpV.x, tmpV.y, tmpV.z);
     121            p2 = tmpV-M;
     122            p2.y = -p2.y;
     123            rotAxis = p1.cross(p2);
     124            //  printf ("rotAxis: %f, %f, %f\n", rotAxis.x, rotAxis.y, rotAxis.z);
     125
     126            // in case that there is no rotation-axis defined
     127            if (rotAxis.x != 0 || rotAxis.y != 0 || rotAxis.z != 0)
     128              {
     129                rotAxis.normalize();
     130                //              printf ("rotAxis: %f, %f, %f\n", rotAxis.x, rotAxis.y, rotAxis.z, rotAngle);
     131                               
     132                rotAngle = angle_rad (p1, p2);
     133                rotQ = Quaternion (rotAngle, rotAxis);
     134                rotQ = rotQ * rotQlast;
     135                rotQ.matrix (matQ);
     136                //      dir = rotQ.apply(dir);
     137                //      dir.normalize();
     138                //      printf ("rotAxis: %f, %f, %f, %f\n", dir.x, dir.y, dir.z, rotAngle);
     139              }
     140            rotQlast = rotQ;
     141            p1 = p2;
     142
     143          }
     144        break;
     145      case SDL_MOUSEBUTTONDOWN:
     146        if (event.button.button == 4)
     147          {
     148            printf("MouseWheel up\n");
     149            zoomTo *= .5;
     150          }
     151        else if (event.button.button == 5)
     152          {
     153            printf("MouseWheel down\n");
     154            zoomTo *= 2.0;
     155          }
     156        else if (event.button.button == 1)
     157          {
     158            mouse1Down = true;
     159            int mX = event.button.x;
     160            int mY = event.button.y;
     161            int wH = wHandler.screen->h;
     162            int wW = wHandler.screen->w;
     163            Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) ));
     164            p1 = tmpV-M;
     165            p1.y = -p1.y;
     166
     167          }
     168        else
     169          {
     170            printf("MouseButton %d pressed at (%d,%d).\n",
     171                   event.button.button, event.button.x, event.button.y);
     172            rotatorV = ( (float)wHandler.screen->w/2 -event.button.x) / (float)wHandler.screen->w / 100.0;
     173          }
     174           
     175        break;
     176      case SDL_MOUSEBUTTONUP:
     177        if (event.button.button == 4);
     178        else if (event.button.button == 5);
     179        else if (event.button.button == 1)
     180          mouse1Down =false;
     181        else
     182            {
     183        printf("MouseButton %d released at (%d,%d).\n",
     184               event.button.button, event.button.x, event.button.y);
     185            }
     186        break;
     187           
    75188        // If a quit event was recieved
    76189      case SDL_QUIT:
     
    81194          break;
    82195      }
     196
     197
    83198    }
    84199
  • orxonox/branches/osX/importer/object.cc

    r2863 r2977  
    4848   \param scaling The factor that the object will be scaled with.
    4949*/
    50 
    5150Object::Object(char* fileName, float scaling)
    5251{
     
    9089  groupCount = 0;
    9190 
    92   initGroup (currentGroup);
     91  initGroup (firstGroup);
    9392  mtlFileName = "";
    9493  scaleFactor = 1;
    9594  material = new Material();
    9695
    97   glEnableClientState (GL_VERTEX_ARRAY);
     96  //  glEnableClientState (GL_VERTEX_ARRAY);
    9897  //  glEnableClientState (GL_NORMAL_ARRAY);
    9998  //  glEnableClientState (GL_TEXTURE_COORD_ARRAY);
     
    226225  group->name = "";
    227226  group->faceMode = -1;
    228   group->faceCount =0; 
     227  group->faceCount = 0; 
    229228  if ((group->listNumber = glGenLists(1)) == 0 )
    230229    {
     
    237236      group->firstVertex = 0;
    238237      group->firstNormal = 0;
    239       group->firstNormal = 0;
     238      group->firstVertexTexture = 0;
    240239    }
    241240  else
     
    265264  glEndList();
    266265}
     266
    267267/**
    268268   \brief deletes the Arrays of the Group to save space.
     
    295295    }
    296296  objFileName = fileName;
    297   char Buffer[500];
     297  char Buffer[10000];
    298298  while(!OBJ_FILE->eof())
    299299    {
    300       OBJ_FILE->getline(Buffer, 500);
     300      OBJ_FILE->getline(Buffer, 10000);
    301301      if (verbose >=4)
    302302        printf ("Read input line: %s\n",Buffer);
     
    377377    {
    378378      currentGroup->vertices->finalizeArray();
    379       glVertexPointer(3, GL_FLOAT, 0, currentGroup->vertices->getArray());
     379      //      glVertexPointer(3, GL_FLOAT, 0, currentGroup->vertices->getArray());
    380380      currentGroup->normals->finalizeArray();
    381       glNormalPointer(GL_FLOAT, 0, currentGroup->normals->getArray());
     381      //      glNormalPointer(GL_FLOAT, 0, currentGroup->normals->getArray());
    382382      currentGroup->vTexture->finalizeArray();
    383383    }
     
    385385  readingVertices = false;
    386386  currentGroup->faceCount++;
    387   char subbuffer1[20];
    388   char subbuffer2[20];
    389   char subbuffer3[20];
    390   char subbuffer4[20] ="";
    391   sscanf (faceString, "%s %s %s %s", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
    392   if (!strcmp(subbuffer4, ""))
     387
     388  int elemCount = 0;
     389 
     390  FaceElement* firstElem = new FaceElement;
     391  FaceElement* tmpElem = firstElem;
     392
     393 
     394  while(strcmp (faceString, "\0"))
     395    {
     396      if (elemCount>0)
     397          tmpElem = tmpElem->next = new FaceElement;
     398      tmpElem->next = NULL;
     399
     400
     401      sscanf (faceString, "%s", tmpElem->value);
     402      faceString += strlen(tmpElem->value);
     403      if (strcmp (faceString, "\0"))
     404        faceString++;
     405      elemCount++;
     406
     407
     408    }
     409 
     410 
     411  if (elemCount == 3)
    393412    {
    394413      if (currentGroup->faceMode != 3)
     
    401420      currentGroup->faceMode = 3;
    402421      if (verbose >=3)
    403         printf ("found triag: %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3);
    404       addGLElement(subbuffer1);
    405       addGLElement(subbuffer2);
    406       addGLElement(subbuffer3);
    407       return true;
    408     }
    409   else
     422        printf ("found triag.\n");
     423    }
     424 
     425  else if (elemCount == 4)
    410426    {
    411427      if (currentGroup->faceMode != 4)
     
    417433      currentGroup->faceMode = 4;
    418434      if (verbose >=3 )
    419         printf ("found quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
    420       addGLElement(subbuffer1);
    421       addGLElement(subbuffer2);
    422       addGLElement(subbuffer3);
    423       addGLElement(subbuffer4);
    424       return true;
    425     }
     435        printf ("found quad.\n");
     436    }
     437 
     438  else if (elemCount > 4)
     439    {
     440      if (currentGroup->faceMode != -1)
     441        glEnd();
     442      glBegin(GL_POLYGON);
     443      if (verbose >=3)
     444        printf ("Polygon with %i faces found.", elemCount);
     445      currentGroup->faceMode = elemCount;
     446    }
     447
     448  tmpElem = firstElem;
     449  FaceElement* delElem;
     450  while (tmpElem != NULL)
     451    {
     452      //      printf ("%s\n", tmpElem->value);
     453      addGLElement(tmpElem->value);
     454      delElem = tmpElem;
     455      tmpElem = tmpElem->next;
     456      delete delElem;
     457    }
     458
    426459}
    427460
     
    442475
    443476  char* texture;
    444   texture = strstr (vertex, "/");
    445   texture[0] = '\0';
    446   texture ++;
    447   if (verbose>=3)
    448     printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*3, currentGroup->vTexture->getCount());
    449   glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
    450 
    451   char* normal;
    452   if ((normal = strstr (texture, "/")) !=NULL)
    453     {
    454       normal[0] = '\0';
    455       normal ++;
    456       //glArrayElement(atoi(vertex)-1);
    457       glNormal3fv(currentGroup->normals->getArray() +(atoi(normal)-1 - currentGroup->firstNormal)*3);
     477  if ((texture = strstr (vertex, "/")) != NULL)
     478    {
     479      texture[0] = '\0';
     480      texture ++;
     481      if (verbose>=3)
     482        printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*2, currentGroup->vTexture->getCount());
     483      glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
     484
     485      char* normal;
     486      if ((normal = strstr (texture, "/")) !=NULL)
     487        {
     488          normal[0] = '\0';
     489          normal ++;
     490          //glArrayElement(atoi(vertex)-1);
     491          glNormal3fv(currentGroup->normals->getArray() +(atoi(normal)-1 - currentGroup->firstNormal)*3);
     492        }
    458493    }
    459494  if (verbose>=3)
     
    603638   \param matString the Material that will be set.
    604639*/
    605 
    606640bool Object::readUseMtl (char* matString)
    607641{
     
    635669  readVertex ("-0.500000 -0.500000 -0.500000");
    636670  readVertex ("0.500000 -0.500000 -0.500000");
     671
    637672  readVertexTexture ("0.000000 0.000000");
    638673  readVertexTexture ("1.000000 0.000000");
  • orxonox/branches/osX/importer/object.h

    r2863 r2977  
    1818extern int verbose; //!< fill be removed and added again as a verbose-class
    1919
     20
     21struct FaceElement
     22{
     23  char value[20];
     24  FaceElement* next;
     25};
    2026
    2127//! Class that handles 3D-Objects. it can also read them in and display them.
  • orxonox/branches/osX/importer/windowHandler.cc

    r2759 r2977  
    33#include "windowHandler.h"
    44#include <stdio.h>
    5 void WindowHandler::ReSizeGLScene(GLsizei width, GLsizei height)                // Resize And Initialize The GL Window
     5void WindowHandler::ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window
    66{
    7         if (height==0)                                                                          // Prevent A Divide By Zero By
     7        if (height==0)  // Prevent A Divide By Zero By
    88        {
    9                 height=1;                                                                               // Making Height Equal One
     9                height=1;// Making Height Equal One
    1010        }
    1111
    12         glViewport(0,0,width,height);                                           // Reset The Current Viewport
     12        glViewport(0,0,width,height); // Reset The Current Viewport
    1313
    14 
    15         glMatrixMode(GL_PROJECTION);                                            // Select The Projection Matrix
     14       
     15        glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
    1616        glLoadIdentity();       
    1717
     
    2121        gluLookAt (0,0,15, 0,0,0, 0,1,0);
    2222
    23         glMatrixMode(GL_MODELVIEW);                                                     // Select The Modelview Matrix
    24         glLoadIdentity();                                                                       // Reset The Modelview Matrix
     23        glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
     24        glLoadIdentity(); // Reset The Modelview Matrix
    2525
    2626}
     
    2929int WindowHandler::InitGL(GLvoid)                                                                               // All Setup For OpenGL Goes Here
    3030{
    31         glEnable(GL_TEXTURE_2D);                                                        // Enable Texture Mapping
    32         glShadeModel(GL_SMOOTH);                                                        // Enable Smooth Shading
    33         glClearColor(0.00f, 0.00f, 0.00f, 0.0f);                        // Black Background
    34         glClearDepth(1.0f);                                                                     // Depth Buffer Setup
    35         glEnable(GL_DEPTH_TEST);                                                        // Enables Depth Testing
    36         glDepthFunc(GL_LEQUAL);                                                         // The Type Of Depth Testing To Do
    37         glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);      // Really Nice Perspective Calculations
     31        glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
     32        glShadeModel(GL_SMOOTH); // Enable Smooth Shading
     33        glClearColor(0.00f, 0.00f, 0.00f, 0.0f); // Black Background
     34        glClearDepth(1.0f);  // Depth Buffer Setup
     35        glEnable(GL_DEPTH_TEST); // Enables Depth Testing
     36        glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do
     37        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);  // Really Nice Perspective Calculations
    3838
    3939    return TRUE;
     
    4141
    4242
    43 GLvoid WindowHandler::KillGLWindow(GLvoid)                                                              // Properly Kill The Window
     43GLvoid WindowHandler::KillGLWindow(GLvoid) // Properly Kill The Window
    4444{
    4545        SDL_Quit();
     
    6363        }
    6464        SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 1 );
    65         if ( SDL_SetVideoMode(width, height, 0, flags) == NULL ) {
     65        if ( (screen = SDL_SetVideoMode(width, height, 0, flags)) == NULL ) {
    6666                return FALSE;
    6767        }
    6868        SDL_GL_GetAttribute( SDL_GL_STENCIL_SIZE, &size);
    6969
    70         ReSizeGLScene(width, height);                                           // Set Up Our Perspective GL Screen
     70        ReSizeGLScene(width, height); // Set Up Our Perspective GL Screen
    7171
    72         if (!InitGL())                                                                          // Initialize Our Newly Created GL Window
     72        if (!InitGL()) // Initialize Our Newly Created GL Window
    7373        {
    74                 KillGLWindow();                                                                 // Reset The Display
    75                 return FALSE;                                                                   // Return FALSE
     74          KillGLWindow();  // Reset The Display
     75          return FALSE;
    7676        }
    7777
    78         return TRUE;                                                                            // Success
     78        return TRUE;
    7979}
    8080
  • orxonox/branches/osX/importer/windowHandler.h

    r2804 r2977  
    1414#include <math.h>
    1515
     16#ifdef __WIN32__
     17#include <windows.h>
     18#endif /* __WIN32__ */
    1619
    1720#define TRUE 1
     
    2629    GLvoid KillGLWindow(GLvoid);
    2730    BOOL CreateGLWindow(char* title, int width, int height, int bits, BOOL fullscreenflag);
     31    SDL_Surface* screen;
    2832  private:
    2933    int InitGL(GLvoid);
  • orxonox/branches/osX/src/object.cc

    r2866 r2977  
    297297    }
    298298  objFileName = fileName;
    299   char Buffer[500];
     299  char Buffer[10000];
    300300  while(!OBJ_FILE->eof())
    301301    {
    302       OBJ_FILE->getline(Buffer, 500);
     302      OBJ_FILE->getline(Buffer, 10000);
    303303      if (verbose >=4)
    304304        printf ("Read input line: %s\n",Buffer);
     
    379379    {
    380380      currentGroup->vertices->finalizeArray();
    381       glVertexPointer(3, GL_FLOAT, 0, currentGroup->vertices->getArray());
     381      //      glVertexPointer(3, GL_FLOAT, 0, currentGroup->vertices->getArray());
    382382      currentGroup->normals->finalizeArray();
    383       glNormalPointer(GL_FLOAT, 0, currentGroup->normals->getArray());
     383      //      glNormalPointer(GL_FLOAT, 0, currentGroup->normals->getArray());
    384384      currentGroup->vTexture->finalizeArray();
    385385    }
     
    387387  readingVertices = false;
    388388  currentGroup->faceCount++;
    389   char subbuffer1[20];
    390   char subbuffer2[20];
    391   char subbuffer3[20];
    392   char subbuffer4[20] ="";
    393   sscanf (faceString, "%s %s %s %s", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
    394   if (!strcmp(subbuffer4, ""))
     389
     390  int elemCount = 0;
     391 
     392  FaceElement* firstElem = new FaceElement;
     393  FaceElement* tmpElem = firstElem;
     394
     395 
     396  while(strcmp (faceString, "\0"))
     397    {
     398      if (elemCount>0)
     399          tmpElem = tmpElem->next = new FaceElement;
     400      tmpElem->next = NULL;
     401
     402
     403      sscanf (faceString, "%s", tmpElem->value);
     404      faceString += strlen(tmpElem->value);
     405      if (strcmp (faceString, "\0"))
     406        faceString++;
     407      elemCount++;
     408
     409
     410    }
     411 
     412 
     413  if (elemCount == 3)
    395414    {
    396415      if (currentGroup->faceMode != 3)
     
    403422      currentGroup->faceMode = 3;
    404423      if (verbose >=3)
    405         printf ("found triag: %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3);
    406       addGLElement(subbuffer1);
    407       addGLElement(subbuffer2);
    408       addGLElement(subbuffer3);
    409       return true;
    410     }
    411   else
     424        printf ("found triag.\n");
     425    }
     426 
     427  else if (elemCount == 4)
    412428    {
    413429      if (currentGroup->faceMode != 4)
     
    419435      currentGroup->faceMode = 4;
    420436      if (verbose >=3 )
    421         printf ("found quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
    422       addGLElement(subbuffer1);
    423       addGLElement(subbuffer2);
    424       addGLElement(subbuffer3);
    425       addGLElement(subbuffer4);
    426       return true;
    427     }
     437        printf ("found quad.\n");
     438    }
     439 
     440  else if (elemCount > 4)
     441    {
     442      if (currentGroup->faceMode != -1)
     443        glEnd();
     444      glBegin(GL_POLYGON);
     445      if (verbose >=3)
     446        printf ("Polygon with %i faces found.", elemCount);
     447      currentGroup->faceMode = elemCount;
     448    }
     449
     450  tmpElem = firstElem;
     451  while (tmpElem != NULL)
     452    {
     453      //      printf ("%s\n", tmpElem->value);
     454      addGLElement(tmpElem->value);
     455      tmpElem = tmpElem->next;
     456    }
     457
    428458}
    429459
     
    444474
    445475  char* texture;
    446   texture = strstr (vertex, "/");
    447   texture[0] = '\0';
    448   texture ++;
    449   if (verbose>=3)
    450     printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*3, currentGroup->vTexture->getCount());
    451   glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
    452 
    453   char* normal;
    454   if ((normal = strstr (texture, "/")) !=NULL)
    455     {
    456       normal[0] = '\0';
    457       normal ++;
    458       //glArrayElement(atoi(vertex)-1);
    459       glNormal3fv(currentGroup->normals->getArray() +(atoi(normal)-1 - currentGroup->firstNormal)*3);
     476  if ((texture = strstr (vertex, "/")) != NULL)
     477    {
     478      texture[0] = '\0';
     479      texture ++;
     480      if (verbose>=3)
     481        printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*3, currentGroup->vTexture->getCount());
     482      glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
     483
     484      char* normal;
     485      if ((normal = strstr (texture, "/")) !=NULL)
     486        {
     487          normal[0] = '\0';
     488          normal ++;
     489          //glArrayElement(atoi(vertex)-1);
     490          glNormal3fv(currentGroup->normals->getArray() +(atoi(normal)-1 - currentGroup->firstNormal)*3);
     491        }
    460492    }
    461493  if (verbose>=3)
  • orxonox/branches/osX/src/object.h

    r2866 r2977  
    1818extern int verbose; //!< fill be removed and added again as a verbose-class
    1919
     20
     21struct FaceElement
     22{
     23  char value[20];
     24  FaceElement* next;
     25};
    2026
    2127//! Class that handles 3D-Objects. it can also read them in and display them.
  • orxonox/branches/osX/src/player.cc

    r2816 r2977  
    2626{
    2727
    28   obj = new Object ("reaphigh.obj");
     28  obj = new Object ("reaplow.obj");
    2929  /*
    3030  objectList = glGenLists(1);
Note: See TracChangeset for help on using the changeset viewer.