make source compile under MinGW32
todo: link against OpenGL GLU/GLUT.
This commit is contained in:
@@ -12,6 +12,8 @@ typedef union
|
||||
void *p;
|
||||
} addr64;
|
||||
|
||||
#define USE_WIN32_THREADING 1
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
|
||||
#else
|
||||
#endif //__MINGW32__
|
||||
@@ -26,7 +28,7 @@ typedef union
|
||||
|
||||
#include <string.h> //memcpy
|
||||
|
||||
#define USE_WIN32_THREADING 1
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#define spu_printf printf
|
||||
|
||||
@@ -17,17 +17,20 @@ subject to the following restrictions:
|
||||
|
||||
#ifdef USE_WIN32_THREADING
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "SpuCollisionTaskProcess.h"
|
||||
|
||||
#include "SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h"
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
|
||||
///The number of threads should be equal to the number of available cores
|
||||
///Todo: each worker should be linked to a single core, using SetThreadIdealProcessor.
|
||||
|
||||
///Win32ThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
|
||||
///Setup and initialize SPU/CELL/Libspe2
|
||||
Win32ThreadSupport::Win32ThreadSupport(Win32ThreadConstructionInfo& threadConstructionInfo)
|
||||
Win32ThreadSupport::Win32ThreadSupport(const Win32ThreadConstructionInfo & threadConstructionInfo)
|
||||
{
|
||||
startThreads(threadConstructionInfo);
|
||||
}
|
||||
@@ -173,7 +176,7 @@ void Win32ThreadSupport::waitForResponse(unsigned int *puiArgument0, unsigned in
|
||||
|
||||
|
||||
|
||||
void Win32ThreadSupport::startThreads(Win32ThreadConstructionInfo& threadConstructionInfo)
|
||||
void Win32ThreadSupport::startThreads(const Win32ThreadConstructionInfo& threadConstructionInfo)
|
||||
{
|
||||
|
||||
m_activeSpuStatus.resize(threadConstructionInfo.m_numThreads);
|
||||
|
||||
@@ -67,8 +67,6 @@ private:
|
||||
public:
|
||||
///Setup and initialize SPU/CELL/Libspe2
|
||||
|
||||
|
||||
|
||||
struct Win32ThreadConstructionInfo
|
||||
{
|
||||
Win32ThreadConstructionInfo(char* uniqueName,
|
||||
@@ -94,12 +92,14 @@ public:
|
||||
|
||||
};
|
||||
|
||||
Win32ThreadSupport(Win32ThreadConstructionInfo& threadConstructionInfo);
|
||||
|
||||
|
||||
Win32ThreadSupport(const Win32ThreadConstructionInfo& threadConstructionInfo);
|
||||
|
||||
///cleanup/shutdown Libspe2
|
||||
virtual ~Win32ThreadSupport();
|
||||
|
||||
void startThreads(Win32ThreadConstructionInfo& threadInfo);
|
||||
void startThreads(const Win32ThreadConstructionInfo& threadInfo);
|
||||
|
||||
|
||||
///send messages to SPUs
|
||||
|
||||
Reference in New Issue
Block a user