Bitbucket | 27 Sep 23:24 2012

commit/ogre: wolfmanfx: Add FlashCC platform support and make it compile against adobe drop 7 sdk

1 new commit in ogre:

https://bitbucket.org/sinbad/ogre/changeset/07dfd1a35d56/
changeset:   07dfd1a35d56
branch:      v1-9
user:        wolfmanfx
date:        2012-09-27 23:23:58
summary:     Add FlashCC platform support and make it compile against adobe drop 7 sdk
affected #:  16 files

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c CMake/Dependencies.cmake
--- a/CMake/Dependencies.cmake
+++ b/CMake/Dependencies.cmake
 <at>  <at>  -79,7 +79,7  <at>  <at> 
 macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org"
FALSE "" "")

 # Find X11
-if (UNIX AND NOT APPLE AND NOT ANDROID)
+if (UNIX AND NOT APPLE AND NOT ANDROID AND NOT FLASHCC)
   find_package(X11)
   macro_log_feature(X11_FOUND "X11" "X Window system" "http://www.x.org" TRUE "" "")
   macro_log_feature(X11_Xt_FOUND "Xt" "X Toolkit" "http://www.x.org" TRUE "" "")
 <at>  <at>  -94,7 +94,7  <at>  <at> 
 #######################################################################

 # Find OpenGL
-if(NOT ANDROID)
+if(NOT ANDROID AND NOT FLASHCC)
   find_package(OpenGL)
   macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render system"
"http://www.opengl.org/" FALSE "" "")
 endif()
 <at>  <at>  -118,7 +118,7  <at>  <at> 
 #######################################################################

 # Find Cg
-if (NOT (OGRE_BUILD_PLATFORM_APPLE_IOS OR OGRE_BUILD_PLATFORM_WINRT OR ANDROID))
+if (NOT (OGRE_BUILD_PLATFORM_APPLE_IOS OR OGRE_BUILD_PLATFORM_WINRT OR ANDROID OR FLASHCC))
   find_package(Cg)
   macro_log_feature(Cg_FOUND "cg" "C for graphics shader language"
"http://developer.nvidia.com/object/cg_toolkit.html" FALSE "" "")
 endif ()

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c CMake/FlashCC.make
--- /dev/null
+++ b/CMake/FlashCC.make
 <at>  <at>  -0,0 +1,32  <at>  <at> 
+$?EXTRACFLAGS=
+FLASCC:=/Users/wolfmanfx/flashcc/sdk
+FLEX:=/Users/wolfmanfx/flashcc/flex
+CMAKE_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+BUILD_DIR := $(CURDIR)/buildFlash
+
+$?UNAME=$(shell uname -s)
+ifneq (,$(findstring CYGWIN,$(UNAME)))
+	$?nativepath=$(shell cygpath -at mixed $(1))
+	$?unixpath=$(shell cygpath -at unix $(1))
+else
+	$?nativepath=$(abspath $(1))
+	$?unixpath=$(abspath $(1))
+endif
+$?AS3COMPILERARGS=java $(JVMARGS) -jar $(call nativepath,$(FLASCC)/usr/lib/$(AS3COMPILER))
-merge -md
+
+all: check
+	mkdir -p "$(BUILD_DIR)"
+	cd $(BUILD_DIR) && PATH="$(call unixpath,$(FLASCC)/usr/bin):$(PATH)" CC=gcc CXX=g++ CFLAGS="-O4
$(EXTRACFLAGS)" CXXFLAGS="-O4 $(EXTRACFLAGS)" cmake -DFLASHCC=1 ..
+	cd buildflash && PATH="$(call unixpath,$(FLASCC)/usr/bin):$(PATH)" make -j8
+
+check:
+	 <at> if [ -d $(FLASCC)/usr/bin ] ; then true ; \
+	else echo "Couldn't locate FLASCC sdk directory, please invoke make with \"make
FLASCC=/path/to/FLASCC/sdk ...\"" ; exit 1 ; \
+	fi
+
+	 <at> if [ -d "$(FLEX)/bin" ] ; then true ; \
+	else echo "Couldn't locate Flex sdk directory, please invoke make with \"make FLEX=/path/to/flex 
...\"" ; exit 1 ; \
+	fi
+
+clean:
+	rm -rf $(BUILD_DIR) *.swf *.swc

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c CMake/Templates/OgreBuildSettings.h.in
--- a/CMake/Templates/OgreBuildSettings.h.in
+++ b/CMake/Templates/OgreBuildSettings.h.in
 <at>  <at>  -61,4 +61,6  <at>  <at> 

 #cmakedefine RTSHADER_SYSTEM_BUILD_EXT_SHADERS

+#cmakedefine __FLASHCC__
+
 #endif

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
 <at>  <at>  -248,6 +248,20  <at>  <at> 
   set(OGRE_BUILD_TESTS FALSE CACHE BOOL "Disable tests on Android" FORCE)
   set(OGRE_BUILD_TOOLS FALSE CACHE BOOL "Disable tools on Android" FORCE)
   set(OGRE_STATIC TRUE CACHE BOOL "Forcing static buil for Android" FORCE)  
+elseif (FLASHCC)
+  set(__FLASHCC__ TRUE)
+  set(OGRE_PLATFORM OGRE_PLATFORM_FLASHCC)
+  set(OGRE_BUILD_RENDERSYSTEM_STAGE3D TRUE CACHE BOOL "Enable Stage3D RenderSystem for FlashCC" FORCE)
+  set(OGRE_BUILD_RENDERSYSTEM_GLES2 FALSE CACHE BOOL "Disable OpenGL ES 2 RenderSystem for FlashCC" FORCE)
+  set(OGRE_BUILD_RENDERSYSTEM_GLES FALSE CACHE BOOL "Disable OpenGL ES 1 RenderSystem for FlashCC" FORCE)
+  set(OGRE_BUILD_COMPONENT_PAGING FALSE CACHE BOOL "Disable paging component on FlashCC" FORCE)
+  set(OGRE_BUILD_COMPONENT_TERRAIN FALSE CACHE BOOL "Disable terrain component on FlashCC" FORCE)
+  set(OGRE_BUILD_COMPONENT_VOLUME FALSE CACHE BOOL "Disable volume component on FlashCC" FORCE)  
+  set(OGRE_BUILD_PLUGIN_PCZ FALSE CACHE BOOL "Disable pcz on FlashCC" FORCE)
+  set(OGRE_BUILD_PLUGIN_BSP FALSE CACHE BOOL "Disable bsp scenemanager on FlashCC" FORCE)
+  set(OGRE_BUILD_TESTS FALSE CACHE BOOL "Disable tests on FlashCC" FORCE)
+  set(OGRE_BUILD_TOOLS FALSE CACHE BOOL "Disable tools on FlashCC" FORCE)
+  set(OGRE_STATIC TRUE CACHE BOOL "Forcing static buil for FlashCC" FORCE)  
 elseif (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)

   # Set 10.5 as the base SDK by default
 <at>  <at>  -284,6 +298,7  <at>  <at> 
 cmake_dependent_option(OGRE_BUILD_RENDERSYSTEM_GL "Build OpenGL RenderSystem" TRUE
"OPENGL_FOUND;NOT OGRE_BUILD_PLATFORM_APPLE_IOS;NOT OGRE_BUILD_PLATFORM_WINRT" FALSE)
 cmake_dependent_option(OGRE_BUILD_RENDERSYSTEM_GLES "Build OpenGL ES 1.x RenderSystem" FALSE
"OPENGLES_FOUND;NOT OGRE_BUILD_PLATFORM_WINRT" FALSE)
 cmake_dependent_option(OGRE_BUILD_RENDERSYSTEM_GLES2 "Build OpenGL ES 2.x RenderSystem" FALSE
"OPENGLES2_FOUND;NOT OGRE_BUILD_PLATFORM_WINRT" FALSE)
+cmake_dependent_option(OGRE_BUILD_RENDERSYSTEM_STAGE3D "Build Stage3D RenderSystem" FALSE
"FLASHCC" FALSE)
 cmake_dependent_option(OGRE_BUILD_PLATFORM_APPLE_IOS "Build Ogre for iOS" FALSE
"iOSSDK_FOUND;OPENGLES_FOUND;OPENGLES2_FOUND" FALSE)
 cmake_dependent_option(OGRE_BUILD_PLATFORM_NACL "Build Ogre for Google's Native Client (NaCl)"
FALSE "OPENGLES2_FOUND" FALSE)
 cmake_dependent_option(OGRE_BUILD_PLATFORM_WINRT "Build Ogre for Metro style application (WinRT)"
FALSE "WIN32;DirectX_D3D11_FOUND" FALSE)

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/CMakeLists.txt
--- a/OgreMain/CMakeLists.txt
+++ b/OgreMain/CMakeLists.txt
 <at>  <at>  -584,6 +584,15  <at>  <at> 
   )

   set(PLATFORM_HEADER_INSTALL "Android")
+elseif(FLASHCC)
+  set(PLATFORM_HEADER_FILES
+    include/FlashCC/OgreTimerImp.h
+  )
+  set(PLATFORM_SOURCE_FILES
+    src/FlashCC/OgreTimer.cpp
+  )
+
+  set(PLATFORM_HEADER_INSTALL "FlashCC")
 elseif (UNIX)
   include_directories(include/GLX ${X11_INCLUDE_DIR})
   set(PLATFORM_HEADER_FILES

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/include/FlashCC/OgreConfigDialogImp.h
--- /dev/null
+++ b/OgreMain/include/FlashCC/OgreConfigDialogImp.h
 <at>  <at>  -0,0 +1,57  <at>  <at> 
+/*
+-----------------------------------------------------------------------------
+This source file is part of OGRE
+(Object-oriented Graphics Rendering Engine)
+For the latest info, see http://www.ogre3d.org/
+
+Copyright (c) 2000-2012 Torus Knot Software Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-----------------------------------------------------------------------------
+*/
+
+#ifndef __FlashCCConfigDialog_H__
+#define __FlashCCConfigDialog_H__
+
+#include "OgrePrerequisites.h"
+#include "OgreRoot.h"
+#include "OgreRenderSystem.h"
+
+namespace Ogre
+{
+	class _OgreExport ConfigDialog : public UtilityAlloc
+	{
+	public:
+		ConfigDialog();
+		~ConfigDialog();
+	
+	public:
+		void initialise();
+		void run();
+		void cancel();
+
+		bool display();
+
+	protected:
+		RenderSystem* iSelectedRenderSystem;
+		bool		iDisplayStatus;		
+	};
+}
+
+#endif // __AndroidConfigDialog_H__

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/include/FlashCC/OgreTimerImp.h
--- /dev/null
+++ b/OgreMain/include/FlashCC/OgreTimerImp.h
 <at>  <at>  -0,0 +1,78  <at>  <at> 
+/*
+-----------------------------------------------------------------------------
+This source file is part of OGRE
+(Object-oriented Graphics Rendering Engine)
+For the latest info, see http://www.ogre3d.org/
+
+Copyright (c) 2000-2012 Torus Knot Software Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-----------------------------------------------------------------------------
+*/
+
+#ifndef __FlashCCTimer_H__
+#define __FlashCCTimer_H__
+
+#include "OgrePrerequisites.h"
+
+namespace Ogre
+{
+	/** Timer class */
+	class _OgreExport Timer : public TimerAlloc
+	{
+	private:
+		struct timeval start;
+		clock_t zeroClock;
+	public:
+		Timer();
+		~Timer();
+
+		/** Method for setting a specific option of the Timer. These options are usually
+            specific for a certain implementation of the Timer class, and may (and probably
+            will) not exist across different implementations.  reset() must be called after
+			all setOption() calls.
+             <at> param
+                strKey The name of the option to set
+             <at> param
+                pValue A pointer to the value - the size should be calculated by the timer
+                based on the key
+             <at> return
+                On success, true is returned.
+             <at> par
+                On failure, false is returned.
+        */
+        bool setOption( const String& strKey, const void* pValue ) { return false; }
+
+		/** Resets timer */
+		void reset();
+
+		/** Returns milliseconds since initialisation or last reset */
+		unsigned long getMilliseconds();
+
+		/** Returns microseconds since initialisation or last reset */
+		unsigned long getMicroseconds();
+
+		/** Returns milliseconds since initialisation or last reset, only CPU time measured */	
+		unsigned long getMillisecondsCPU();
+
+		/** Returns microseconds since initialisation or last reset, only CPU time measured */	
+		unsigned long getMicrosecondsCPU();
+	};
+}
+#endif

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/include/OgreConfigDialog.h
--- a/OgreMain/include/OgreConfigDialog.h
+++ b/OgreMain/include/OgreConfigDialog.h
 <at>  <at>  -52,6 +52,8  <at>  <at> 
 # include "iOS/OgreConfigDialogImp.h"
 #elif OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
 # include "Android/OgreConfigDialogImp.h"
+#elif OGRE_PLATFORM == OGRE_PLATFORM_FLASHCC
+# include "FlashCC/OgreConfigDialogImp.h"
 #endif

 #endif

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/include/OgreDynLib.h
--- a/OgreMain/include/OgreDynLib.h
+++ b/OgreMain/include/OgreDynLib.h
 <at>  <at>  -49,7 +49,7  <at>  <at> 
 struct HINSTANCE__;
 typedef struct HINSTANCE__* hInstance;

-#elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_ANDROID ||
OGRE_PLATFORM == OGRE_PLATFORM_NACL
+#elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_ANDROID ||
OGRE_PLATFORM == OGRE_PLATFORM_NACL || OGRE_PLATFORM == OGRE_PLATFORM_FLASHCC
 #    define DYNLIB_HANDLE void*
 #    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY | RTLD_GLOBAL)
 #    define DYNLIB_GETSYM( a, b ) dlsym( a, b )

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/include/OgrePlatform.h
--- a/OgreMain/include/OgrePlatform.h
+++ b/OgreMain/include/OgrePlatform.h
 <at>  <at>  -112,6 +112,8  <at>  <at> 
 #	else
 #		define OGRE_PLATFORM OGRE_PLATFORM_WIN32
 #	endif
+#elif defined(__FLASHCC__)
+#	define OGRE_PLATFORM OGRE_PLATFORM_FLASHCC
 #elif defined( __APPLE_CC__)
     // Device                                                     Simulator
     // Both requiring OS version 4.0 or greater
 <at>  <at>  -212,7 +214,7  <at>  <at> 
 //----------------------------------------------------------------------------
 // Linux/Apple/iOs/Android/NaCl Settings
 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM ==
OGRE_PLATFORM_APPLE_IOS || \
-    OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || OGRE_PLATFORM == OGRE_PLATFORM_NACL
+    OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || OGRE_PLATFORM == OGRE_PLATFORM_NACL || OGRE_PLATFORM == OGRE_PLATFORM_FLASHCC

 // Enable GCC symbol visibility
 #   if defined( OGRE_GCC_VISIBILITY )
 <at>  <at>  -253,8 +255,7  <at>  <at> 
 #       undef OGRE_UNICODE_SUPPORT
 #   endif
 #	define OGRE_UNICODE_SUPPORT 0
-#   define OGRE_DEBUG_MODE 0
-#	  define CLOCKS_PER_SEC  1000
+#	define CLOCKS_PER_SEC  1000
     // A quick define to overcome different names for the same function
 #   define stricmp strcasecmp
 #   ifdef DEBUG
 <at>  <at>  -263,6 +264,21  <at>  <at> 
 #       define OGRE_DEBUG_MODE 0
 #   endif
 #endif
+    
+//----------------------------------------------------------------------------
+// FlashCC Settings
+#if OGRE_PLATFORM == OGRE_PLATFORM_FLASHCC
+#   ifdef OGRE_UNICODE_SUPPORT
+#       undef OGRE_UNICODE_SUPPORT
+#   endif
+#	define OGRE_UNICODE_SUPPORT 0
+#   ifdef DEBUG
+#       define OGRE_DEBUG_MODE 1
+#   else
+#       define OGRE_DEBUG_MODE 0
+#   endif
+#endif
+
 //----------------------------------------------------------------------------
 // Endian Settings
 // check for BIG_ENDIAN config flag, set OGRE_ENDIAN correctly

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/include/OgreTimer.h
--- a/OgreMain/include/OgreTimer.h
+++ b/OgreMain/include/OgreTimer.h
 <at>  <at>  -44,6 +44,8  <at>  <at> 
 # include "iOS/OgreTimerImp.h"
 #elif OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
 # include "Android/OgreTimerImp.h"
+#elif OGRE_PLATFORM == OGRE_PLATFORM_FLASHCC
+# include "FlashCC/OgreTimerImp.h"
 #endif

 #endif

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/src/FlashCC/OgreConfigDialog.cpp
--- /dev/null
+++ b/OgreMain/src/FlashCC/OgreConfigDialog.cpp
 <at>  <at>  -0,0 +1,62  <at>  <at> 
+/*
+-----------------------------------------------------------------------------
+This source file is part of OGRE
+(Object-oriented Graphics Rendering Engine)
+For the latest info, see http://www.ogre3d.org/
+
+Copyright (c) 2000-2012 Torus Knot Software Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-----------------------------------------------------------------------------
+*/
+#include "OgreLogManager.h"
+#include "OgreConfigDialog.h"
+
+namespace Ogre {
+
+	ConfigDialog* dlg = NULL;
+
+	ConfigDialog::ConfigDialog()
+	{
+		dlg = this;
+	}
+	
+	ConfigDialog::~ConfigDialog()
+	{
+	}
+	
+	void ConfigDialog::initialise()
+    {
+	}
+	
+	void ConfigDialog::run()
+	{
+
+	}
+	
+	void ConfigDialog::cancel()
+	{
+	}
+
+	bool ConfigDialog::display()
+	{
+		return true;
+	}
+
+};

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/src/FlashCC/OgreTimer.cpp
--- /dev/null
+++ b/OgreMain/src/FlashCC/OgreTimer.cpp
 <at>  <at>  -0,0 +1,79  <at>  <at> 
+/*
+-----------------------------------------------------------------------------
+This source file is part of OGRE
+(Object-oriented Graphics Rendering Engine)
+For the latest info, see http://www.ogre3d.org/
+
+Copyright (c) 2000-2012 Torus Knot Software Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-----------------------------------------------------------------------------
+*/
+#include "OgreTimer.h"
+#include <sys/time.h>
+
+using namespace Ogre;
+
+//--------------------------------------------------------------------------------//
+Timer::Timer()
+{
+	reset();
+}
+
+//--------------------------------------------------------------------------------//
+Timer::~Timer()
+{
+}
+
+//--------------------------------------------------------------------------------//
+void Timer::reset()
+{
+	zeroClock = clock();
+	gettimeofday(&start, NULL);
+}
+
+//--------------------------------------------------------------------------------//
+unsigned long Timer::getMilliseconds()
+{
+	struct timeval now;
+	gettimeofday(&now, NULL);
+	return (now.tv_sec-start.tv_sec)*1000+(now.tv_usec-start.tv_usec)/1000;
+}
+
+//--------------------------------------------------------------------------------//
+unsigned long Timer::getMicroseconds()
+{
+	struct timeval now;
+	gettimeofday(&now, NULL);
+	return (now.tv_sec-start.tv_sec)*1000000+(now.tv_usec-start.tv_usec);
+}
+
+//-- Common Across All Timers ----------------------------------------------------//
+unsigned long Timer::getMillisecondsCPU()
+{
+	clock_t newClock = clock();
+	return (unsigned long)((float)(newClock-zeroClock) / ((float)CLOCKS_PER_SEC/1000.0)) ;
+}
+
+//-- Common Across All Timers ----------------------------------------------------//
+unsigned long Timer::getMicrosecondsCPU()
+{
+	clock_t newClock = clock();
+	return (unsigned long)((float)(newClock-zeroClock) / ((float)CLOCKS_PER_SEC/1000000.0)) ;
+}

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/src/OgreDynLib.cpp
--- a/OgreMain/src/OgreDynLib.cpp
+++ b/OgreMain/src/OgreDynLib.cpp
 <at>  <at>  -47,7 +47,7  <at>  <at> 
 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
 #   include "macUtils.h"
 #endif
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS ||
OGRE_PLATFORM == OGRE_PLATFORM_NACL
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS ||
OGRE_PLATFORM == OGRE_PLATFORM_NACL || OGRE_PLATFORM == OGRE_PLATFORM_FLASHCC
 #   include <dlfcn.h>
 #endif

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c OgreMain/src/OgreFileSystem.cpp
--- a/OgreMain/src/OgreFileSystem.cpp
+++ b/OgreMain/src/OgreFileSystem.cpp
 <at>  <at>  -38,7 +38,8  <at>  <at> 
 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE || \
     OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS || \
     OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || \
-    OGRE_PLATFORM == OGRE_PLATFORM_NACL
+    OGRE_PLATFORM == OGRE_PLATFORM_NACL || \
+    OGRE_PLATFORM == OGRE_PLATFORM_FLASHCC
 #   include "OgreSearchOps.h"
 #   include <sys/param.h>
 #   define MAX_PATH MAXPATHLEN

diff -r 2ef4fd398d3b3342042fa9a37d0aa4ae332b8283 -r 07dfd1a35d563ffdce24cf176f568bd682f1ea3c RenderSystems/CMakeLists.txt
--- a/RenderSystems/CMakeLists.txt
+++ b/RenderSystems/CMakeLists.txt
 <at>  <at>  -58,3 +58,8  <at>  <at> 
     add_subdirectory(GLES2)
   endif()
 endif()
+
+
+if (OGRE_BUILD_RENDERSYSTEM_STAGE3D AND FLASHCC)
+    add_subdirectory(Stage3D)
+endif()

Repository URL: https://bitbucket.org/sinbad/ogre/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html

Gmane