windows fixes
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
#include "../Utils/b3Clock.h"
|
#include "../Utils/b3Clock.h"
|
||||||
|
|
||||||
#include "ExampleEntries.h"
|
#include "ExampleEntries.h"
|
||||||
#include "Bullet3Common/b3Logging.h"
|
#include "Bullet3Common/b3Scalar.h"
|
||||||
#include "../SharedMemory/InProcessMemory.h"
|
#include "../SharedMemory/InProcessMemory.h"
|
||||||
|
|
||||||
void ExampleBrowserThreadFunc(void* userPtr,void* lsMemory);
|
void ExampleBrowserThreadFunc(void* userPtr,void* lsMemory);
|
||||||
@@ -22,9 +22,7 @@ void* ExampleBrowserMemoryFunc();
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
//#include "BulletMultiThreaded/PlatformDefinitions.h"
|
//#include "BulletMultiThreaded/PlatformDefinitions.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
#include "Bullet3Common/b3Logging.h"
|
||||||
#include "../MultiThreading/b3PosixThreadSupport.h"
|
|
||||||
|
|
||||||
#include "ExampleEntries.h"
|
#include "ExampleEntries.h"
|
||||||
#include "LinearMath/btAlignedObjectArray.h"
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
#include "EmptyExample.h"
|
#include "EmptyExample.h"
|
||||||
@@ -32,6 +30,38 @@ void* ExampleBrowserMemoryFunc();
|
|||||||
#include "../SharedMemory/PhysicsServerExample.h"
|
#include "../SharedMemory/PhysicsServerExample.h"
|
||||||
#include "../SharedMemory/PhysicsClientExample.h"
|
#include "../SharedMemory/PhysicsClientExample.h"
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
#include "../MultiThreading/b3PosixThreadSupport.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static b3ThreadSupportInterface* createExampleBrowserThreadSupport(int numThreads)
|
||||||
|
{
|
||||||
|
b3PosixThreadSupport::ThreadConstructionInfo constructionInfo("testThreads",
|
||||||
|
ExampleBrowserThreadFunc,
|
||||||
|
ExampleBrowserMemoryFunc,
|
||||||
|
numThreads);
|
||||||
|
b3ThreadSupportInterface* threadSupport = new b3PosixThreadSupport(constructionInfo);
|
||||||
|
|
||||||
|
return threadSupport;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#elif defined( _WIN32)
|
||||||
|
#include "../MultiThreading/b3Win32ThreadSupport.h"
|
||||||
|
|
||||||
|
b3ThreadSupportInterface* createExampleBrowserThreadSupport(int numThreads)
|
||||||
|
{
|
||||||
|
b3Win32ThreadSupport::Win32ThreadConstructionInfo threadConstructionInfo("testThreads",ExampleBrowserThreadFunc,ExampleBrowserMemoryFunc,numThreads);
|
||||||
|
b3Win32ThreadSupport* threadSupport = new b3Win32ThreadSupport(threadConstructionInfo);
|
||||||
|
return threadSupport;
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -162,30 +192,6 @@ const char* ExampleEntriesPhysicsServer::getExampleDescription(int index)
|
|||||||
return m_data->m_allExamples[index].m_description;
|
return m_data->m_allExamples[index].m_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
static b3ThreadSupportInterface* createExampleBrowserThreadSupport(int numThreads)
|
|
||||||
{
|
|
||||||
b3PosixThreadSupport::ThreadConstructionInfo constructionInfo("testThreads",
|
|
||||||
ExampleBrowserThreadFunc,
|
|
||||||
ExampleBrowserMemoryFunc,
|
|
||||||
numThreads);
|
|
||||||
b3ThreadSupportInterface* threadSupport = new b3PosixThreadSupport(constructionInfo);
|
|
||||||
|
|
||||||
return threadSupport;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#elif defined( _WIN32)
|
|
||||||
#include "../MultiThreading/b3Win32ThreadSupport.h"
|
|
||||||
|
|
||||||
b3ThreadSupportInterface* createExampleBrowserThreadSupport(int numThreads)
|
|
||||||
{
|
|
||||||
b3Win32ThreadSupport::Win32ThreadConstructionInfo threadConstructionInfo("testThreads",ExampleBrowserThreadFunc,ExampleBrowserMemoryFunc,numThreads);
|
|
||||||
b3Win32ThreadSupport* threadSupport = new b3Win32ThreadSupport(threadConstructionInfo);
|
|
||||||
return threadSupport;
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -284,6 +290,7 @@ struct btInProcessExampleBrowserInternalData
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
btInProcessExampleBrowserInternalData* btCreateInProcessExampleBrowser(int argc,char** argv2)
|
btInProcessExampleBrowserInternalData* btCreateInProcessExampleBrowser(int argc,char** argv2)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -695,8 +695,8 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int width = 1920;
|
int width = 1024;
|
||||||
int height=1080;
|
int height=768;
|
||||||
#ifndef NO_OPENGL3
|
#ifndef NO_OPENGL3
|
||||||
SimpleOpenGL3App* simpleApp=0;
|
SimpleOpenGL3App* simpleApp=0;
|
||||||
sUseOpenGL2 =args.CheckCmdLineFlag("opengl2");
|
sUseOpenGL2 =args.CheckCmdLineFlag("opengl2");
|
||||||
|
|||||||
@@ -180,6 +180,21 @@ int Win32OpenGLWindow::fileOpenDialog(char* fileName, int maxFileNameLength)
|
|||||||
//return 0;
|
//return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Win32OpenGLWindow::getWidth() const
|
||||||
|
{
|
||||||
|
if (m_data)
|
||||||
|
return m_data->m_openglViewportWidth;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Win32OpenGLWindow::getHeight() const
|
||||||
|
{
|
||||||
|
if (m_data)
|
||||||
|
return m_data->m_openglViewportHeight;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ public:
|
|||||||
virtual float getRetinaScale() const {return 1.f;}
|
virtual float getRetinaScale() const {return 1.f;}
|
||||||
virtual void setAllowRetina(bool /*allowRetina*/) {};
|
virtual void setAllowRetina(bool /*allowRetina*/) {};
|
||||||
|
|
||||||
|
virtual int getWidth() const;
|
||||||
|
virtual int getHeight() const;
|
||||||
|
|
||||||
virtual int fileOpenDialog(char* fileName, int maxFileNameLength);
|
virtual int fileOpenDialog(char* fileName, int maxFileNameLength);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user