Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 28, 2011, 7:15:14 AM (13 years ago)
Author:
rgrieder
Message:

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/external/bullet/LinearMath/btQuickprof.h

    r5781 r8351  
    1919//#define BT_NO_PROFILE 1
    2020#ifndef BT_NO_PROFILE
    21 
     21#include <stdio.h>//@todo remove this, backwards compatibility
    2222#include "btScalar.h"
    23 #include "LinearMath/btAlignedAllocator.h"
     23#include "btAlignedAllocator.h"
    2424#include <new>
    2525
     
    2727
    2828
    29 //if you don't need btClock, you can comment next line
     29
    3030#define USE_BT_CLOCK 1
    3131
    3232#ifdef USE_BT_CLOCK
    33 #ifdef __CELLOS_LV2__
    34 #include <sys/sys_time.h>
    35 #include <sys/time_util.h>
    36 #include <stdio.h>
    37 #endif
    38 
    39 #if defined (SUNOS) || defined (__SUNOS__)
    40 #include <stdio.h>
    41 #endif
    42 
    43 #if defined(WIN32) || defined(_WIN32)
    44 
    45 #define USE_WINDOWS_TIMERS
    46 #define WIN32_LEAN_AND_MEAN
    47 #define NOWINRES
    48 #define NOMCX
    49 #define NOIME
    50 #ifdef _XBOX
    51 #include <Xtl.h>
    52 #else
    53 #include <windows.h>
    54 #endif
    55 #include <time.h>
    56 
    57 #else
    58 #include <sys/time.h>
    59 #endif
    60 
    61 #define mymin(a,b) (a > b ? a : b)
    6233
    6334///The btClock is a portable basic clock that measures accurate time in seconds, use for profiling.
     
    6536{
    6637public:
    67         btClock()
    68         {
    69 #ifdef USE_WINDOWS_TIMERS
    70                 QueryPerformanceFrequency(&mClockFrequency);
    71 #endif
    72                 reset();
    73         }
     38        btClock();
    7439
    75         ~btClock()
    76         {
    77         }
     40        btClock(const btClock& other);
     41        btClock& operator=(const btClock& other);
     42
     43        ~btClock();
    7844
    7945        /// Resets the initial reference time.
    80         void reset()
    81         {
    82 #ifdef USE_WINDOWS_TIMERS
    83                 QueryPerformanceCounter(&mStartTime);
    84                 mStartTick = GetTickCount();
    85                 mPrevElapsedTime = 0;
    86 #else
    87 #ifdef __CELLOS_LV2__
    88 
    89                 typedef uint64_t  ClockSize;
    90                 ClockSize newTime;
    91                 //__asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory");
    92                 SYS_TIMEBASE_GET( newTime );
    93                 mStartTime = newTime;
    94 #else
    95                 gettimeofday(&mStartTime, 0);
    96 #endif
    97 
    98 #endif
    99         }
     46        void reset();
    10047
    10148        /// Returns the time in ms since the last call to reset or since
    10249        /// the btClock was created.
    103         unsigned long int getTimeMilliseconds()
    104         {
    105 #ifdef USE_WINDOWS_TIMERS
    106                 LARGE_INTEGER currentTime;
    107                 QueryPerformanceCounter(&currentTime);
    108                 LONGLONG elapsedTime = currentTime.QuadPart -
    109                         mStartTime.QuadPart;
    110 
    111                 // Compute the number of millisecond ticks elapsed.
    112                 unsigned long msecTicks = (unsigned long)(1000 * elapsedTime /
    113                         mClockFrequency.QuadPart);
    114 
    115                 // Check for unexpected leaps in the Win32 performance counter. 
    116                 // (This is caused by unexpected data across the PCI to ISA
    117                 // bridge, aka south bridge.  See Microsoft KB274323.)
    118                 unsigned long elapsedTicks = GetTickCount() - mStartTick;
    119                 signed long msecOff = (signed long)(msecTicks - elapsedTicks);
    120                 if (msecOff < -100 || msecOff > 100)
    121                 {
    122                         // Adjust the starting time forwards.
    123                         LONGLONG msecAdjustment = mymin(msecOff *
    124                                 mClockFrequency.QuadPart / 1000, elapsedTime -
    125                                 mPrevElapsedTime);
    126                         mStartTime.QuadPart += msecAdjustment;
    127                         elapsedTime -= msecAdjustment;
    128 
    129                         // Recompute the number of millisecond ticks elapsed.
    130                         msecTicks = (unsigned long)(1000 * elapsedTime /
    131                                 mClockFrequency.QuadPart);
    132                 }
    133 
    134                 // Store the current elapsed time for adjustments next time.
    135                 mPrevElapsedTime = elapsedTime;
    136 
    137                 return msecTicks;
    138 #else
    139 
    140 #ifdef __CELLOS_LV2__
    141                 uint64_t freq=sys_time_get_timebase_frequency();
    142                 double dFreq=((double) freq) / 1000.0;
    143                 typedef uint64_t  ClockSize;
    144                 ClockSize newTime;
    145                 SYS_TIMEBASE_GET( newTime );
    146                 //__asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory");
    147 
    148                 return (unsigned long int)((double(newTime-mStartTime)) / dFreq);
    149 #else
    150 
    151                 struct timeval currentTime;
    152                 gettimeofday(&currentTime, 0);
    153                 return (currentTime.tv_sec - mStartTime.tv_sec) * 1000 +
    154                         (currentTime.tv_usec - mStartTime.tv_usec) / 1000;
    155 #endif //__CELLOS_LV2__
    156 #endif
    157         }
     50        unsigned long int getTimeMilliseconds();
    15851
    15952        /// Returns the time in us since the last call to reset or since
    16053        /// the Clock was created.
    161         unsigned long int getTimeMicroseconds()
    162         {
    163 #ifdef USE_WINDOWS_TIMERS
    164                 LARGE_INTEGER currentTime;
    165                 QueryPerformanceCounter(&currentTime);
    166                 LONGLONG elapsedTime = currentTime.QuadPart -
    167                         mStartTime.QuadPart;
    168 
    169                 // Compute the number of millisecond ticks elapsed.
    170                 unsigned long msecTicks = (unsigned long)(1000 * elapsedTime /
    171                         mClockFrequency.QuadPart);
    172 
    173                 // Check for unexpected leaps in the Win32 performance counter. 
    174                 // (This is caused by unexpected data across the PCI to ISA
    175                 // bridge, aka south bridge.  See Microsoft KB274323.)
    176                 unsigned long elapsedTicks = GetTickCount() - mStartTick;
    177                 signed long msecOff = (signed long)(msecTicks - elapsedTicks);
    178                 if (msecOff < -100 || msecOff > 100)
    179                 {
    180                         // Adjust the starting time forwards.
    181                         LONGLONG msecAdjustment = mymin(msecOff *
    182                                 mClockFrequency.QuadPart / 1000, elapsedTime -
    183                                 mPrevElapsedTime);
    184                         mStartTime.QuadPart += msecAdjustment;
    185                         elapsedTime -= msecAdjustment;
    186                 }
    187 
    188                 // Store the current elapsed time for adjustments next time.
    189                 mPrevElapsedTime = elapsedTime;
    190 
    191                 // Convert to microseconds.
    192                 unsigned long usecTicks = (unsigned long)(1000000 * elapsedTime /
    193                         mClockFrequency.QuadPart);
    194 
    195                 return usecTicks;
    196 #else
    197 
    198 #ifdef __CELLOS_LV2__
    199                 uint64_t freq=sys_time_get_timebase_frequency();
    200                 double dFreq=((double) freq)/ 1000000.0;
    201                 typedef uint64_t  ClockSize;
    202                 ClockSize newTime;
    203                 //__asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory");
    204                 SYS_TIMEBASE_GET( newTime );
    205 
    206                 return (unsigned long int)((double(newTime-mStartTime)) / dFreq);
    207 #else
    208 
    209                 struct timeval currentTime;
    210                 gettimeofday(&currentTime, 0);
    211                 return (currentTime.tv_sec - mStartTime.tv_sec) * 1000000 +
    212                         (currentTime.tv_usec - mStartTime.tv_usec);
    213 #endif//__CELLOS_LV2__
    214 #endif
    215         }
    216 
     54        unsigned long int getTimeMicroseconds();
    21755private:
    218 #ifdef USE_WINDOWS_TIMERS
    219         LARGE_INTEGER mClockFrequency;
    220         DWORD mStartTick;
    221         LONGLONG mPrevElapsedTime;
    222         LARGE_INTEGER mStartTime;
    223 #else
    224 #ifdef __CELLOS_LV2__
    225         uint64_t        mStartTime;
    226 #else
    227         struct timeval mStartTime;
    228 #endif
    229 #endif //__CELLOS_LV2__
    230 
     56        struct btClockData* m_data;
    23157};
    23258
Note: See TracChangeset for help on using the changeset viewer.