Cs345-2010

From Earlham CS Department
Revision as of 15:37, 14 February 2010 by Leemasa (talk | contribs) (Near Term Tasks)
Jump to navigation Jump to search

Porting Intel's Smoke Game Demo to Linux

N.B. - If you edit by section (using the "edit" links next to the section heading) you will be much less likely to cause a Save conflict.


Background Information

  • http://software.intel.com/en-us/articles/smoke-game-technology-demo/ - Intel Software Network article
  • Place links to the other articles (TBB, Procedural Trees, etc.) here
  • Notes from the Intel Software Network article on porting Smoke
    • No one has tried in on OSX. I would be very interested to know if you can get it to work. The biggest dependencies on Windows are DirectX and .NET. DirectX is used by Ogre3D... however, you should be able to use OpenGL instead of DirectX (OpenGL is just a separate plug for Ogre). The scripting system uses .NET... but you can feel free to disable the scripting project (it's not used in the demo at the moment). In the \bin folder you will find Smoke.gdf... delete the reference to the scripting system (you might need to remove it from Demo.cdf too).
    • Now here are the big challenges. There are a few systems that also depend on DX. These is SystemInput and SystemFire. SystemInput uses DirectX's input support. But that's easy enough to replace (or disable). SystemFire uses DirectX for some of the math calculations. Our math library should support all the needed functionality... we just didn’t have time to get all the DX out of there.

Near Term Tasks

  1. Examine all of the documentation and build an annotated index of it in the wiki. Materials that are on-line already, e.g. the ones listed above, can have URLs and annotations. Ones that come with the source kit should just have titles, file system paths, and annotations. We don't want to upload those to the wiki without first checking with Intel about re-publishing their materials. (Nick)
  2. Examine all of the source kit's directory tree and build an annotated map of it in the wiki. (Nick)
  3. Examine all of the #includes in Smoke.cpp and propose solutions for porting/converting/removing each of them. Remember that #includes nest, we need to follow each thread starting with the ones in Smoke.cpp. (Sam)
  4. Figure-out roughly how each of these works, what the dependencies are, etc. and propose a solution for porting/converting/removing each of them:
    • Logging (To Do)
    • Debugging (To Do)
    • EngineExecuteGDF (To Do)
    • main() in Smoke.cpp (To Do)
    • Argument processing in Smoke.cpp (To Do)
  5. Develop an ordered plan in the wiki (collective, in class on Tuesday)
    • Modules
    • Libraries
      • Ogre/OpenGL replacing DirectX (To Do)
      • Find and guard/eliminate .NET stuff (To Do)
      • DirectX -> ? conversion for SystemInput and SystemFire (To Do)
      • Havoc (Future)
    • Functionality
  6. Figure-out Doxygen and build a doc set (To Do)
  7. Figure-out Make and construct the first simple Makefile that builds Smoke (collective, in class on Tuesday)

Documentation

  • Entries from Background section above.
    • Description of what's in each document, what it's useful for.
  • Other papers Intel has published about Smoke.
    • Etc.

Directory Tree

  • bin - Some explanation
    • debug - Some explanation
    • logs - Some explanation
    • profile - Some explanation
    • release - Some explanation
  • code
    • Etc.
  • docs
  • media
  • tools

Smoke.cpp #include Files

  • windows.h - A Windows-exclusive header file.
  • tchar.h - Some explanation
    • Files it includes
  • ..\BaseTypes\BaseTypes.h - Some explanation
    • Files it includes
  • ..\Interfaces\Interface.h - Some explanation
    • Files it includes
  • ..\Framework\FrameworkAPI.h - Some explanation
    • Files it includes
    • ..\Framework\EnvironmentManager.cpp - Some explanation
    • Files it includes
  • atlbase.h
    • Files it includes

System Path #include files

Format is: (A file that includes the header) #include <(include file)>

  • Tbb is an intel threading library
    • BaseTypes/TbbSpinMutex.h #include <tbb/spin_mutex.h> -
    • Framework/TaskManagerTBB.cpp #include <tbb/parallel_for.h>
    • Framework/TaskManagerTBB.cpp #include <tbb/blocked_range.h>
    • Framework/TaskManagerTBB.cpp #include <tbb/partitioner.h>
    • Framework/TaskManagerTBB.h #include <tbb/task.h>
    • Framework/TaskManagerTBB.h #include <tbb/task_scheduler_init.h>
    • Framework/TaskManagerTBB.h #include <tbb/tbb_thread.h>
    • SystemProceduralFire/FireObject.cpp #include <tbb/scalable_allocator.h>
    • Framework/IttNotify.h #include <libittnotify.h>
  • This is just a collection of windows-specific functions. It contains stdarg, ctype and string standard header functions
    • BaseTypes/Synchronization.cpp #include <windows.h>
    • Framework/ThreadPool.cpp #include <Windows.h>
  • Standard Headers. All of these should work fine sans modification
    • BaseTypes/Math.cpp #include <math.h>
    • BaseTypes/Debug.h #include <stdarg.h>
    • Interfaces/Property.cpp #include <StdArg.h>
    • BaseTypes/BaseTypes.h #include <queue>
    • BaseTypes/BaseTypes.h #include <list>
    • BaseTypes/BaseTypes.h #include <map>
    • BaseTypes/BaseTypes.h #include <string>
    • BaseTypes/dbnew.cpp #include <new>
    • Framework/ChangeControlManager.h #include <set>
    • BaseTypes/Debug.cpp #include <stdio.h>
    • BaseTypes/Debug.cpp #include <time.h>
    • Framework/Instrumentation.cpp #include <sstream>
    • SystemAudioFMOD/Object.h #include <ctime>
    • SystemAudioFMOD/System.cpp #include <vector>
    • SystemAudioFMOD/ObjectAI.cpp #include <cstring>
    • BaseTypes/Debug.cpp #include <direct.h>
    • Framework/TaskManagerTBB.cpp #include <process.h>
  • OgreGraphics. This hopefully is easily reengineerable
    • SystemGraphicsOgre/ObjectWindow.cpp #include <OgreBorderPanelOverlayElement.h>
    • SystemGraphicsOgre/ObjectWindow.cpp #include <OgreHardwarePixelBuffer.h>
    • SystemGraphicsOgre/Scene.cpp #include <OgreFontManager.h>
    • SystemGraphicsOgre/ObjectWindow.h #include <OgrePanelOverlayElement.h>
    • SystemGraphicsOgre/ObjectWindow.h #include <OgreTextAreaOverlayElement.h>
    • SystemGraphicsOgre/DynamicBuffer.h #include <OgreSimpleRenderable.h>
    • SystemGraphicsOgre/DynamicBuffer.cpp #include <Ogre.h>
    • SystemPhysicsCollisionHavok/Scene.cpp #include <Common/Visualize/hkVisualDebugger.h>
    • SystemPhysicsCollisionHavok/Scene.cpp #include <Physics/Utilities/VisualDebugger/hkpPhysicsContext.h>
  • Other
    • BaseTypes/MathX.h #include <intrin.h> - Not sure what this all means http://parasol.tamu.edu/~yuriys/polaris/intrin_8h-source.html
    • Framework/DebugWindow.cpp #include <commctrl.h> - Looks like a Windows-specific directory
    • Smoke/Smoke.cpp #include <tchar.h> - Microsoft specific library for character mapping (lets you easily switch between Ascii, Unicode etc.)
    • Smoke/Smoke.cpp #include <atlbase.h> - Looks Microsoft specific

Sub-Systems

Logging

  • Purpose and operation
  • Dependencies
  • Proposed adapt/convert/remove plan

Debugging

  • Purpose and operation
  • Dependencies
  • Proposed adapt/convert/remove plan

EngineExecuteGDF

  • What is it calling?
  • Purpose and operation
  • Dependencies
  • Proposed adapt/convert/remove plan

Ogre/OpenGL replacing Ogre/DirectX

  • Purpose and operation
  • Dependencies
  • Proposed adapt/convert/remove plan

? replacing .NET

  • Where is it used?
  • Purpose and operation
  • Dependencies
  • Proposed adapt/convert/remove plan

DirectX -> ? conversion for SystemInput and SystemFire

  • Where is it used?
  • Purpose and operation
  • Dependencies
  • Proposed adapt/convert/remove plan