fix double-precision compile problem
fix profile window (See View/Profiler in ExampleBrowser)
This commit is contained in:
@@ -9,6 +9,9 @@ struct CommonCameraInterface
|
||||
virtual void getCameraTargetPosition(float pos[3]) const = 0;
|
||||
virtual void getCameraPosition(float pos[3]) const = 0;
|
||||
|
||||
virtual void getCameraTargetPosition(double pos[3]) const = 0;
|
||||
virtual void getCameraPosition(double pos[3]) const = 0;
|
||||
|
||||
virtual void setCameraTargetPosition(float x,float y,float z) = 0;
|
||||
virtual void setCameraDistance(float dist) = 0;
|
||||
virtual float getCameraDistance() const = 0;
|
||||
|
||||
@@ -34,12 +34,13 @@
|
||||
#include "ExampleEntries.h"
|
||||
#include "OpenGLGuiHelper.h"
|
||||
#include "LinearMath/btIDebugDraw.h"
|
||||
CommonGraphicsApp* s_app=0;
|
||||
static CommonGraphicsApp* s_app=0;
|
||||
|
||||
CommonWindowInterface* s_window = 0;
|
||||
CommonParameterInterface* s_parameterInterface=0;
|
||||
CommonRenderInterface* s_instancingRenderer=0;
|
||||
OpenGLGuiHelper* s_guiHelper=0;
|
||||
static CommonWindowInterface* s_window = 0;
|
||||
static CommonParameterInterface* s_parameterInterface=0;
|
||||
static CommonRenderInterface* s_instancingRenderer=0;
|
||||
static OpenGLGuiHelper* s_guiHelper=0;
|
||||
static MyProfileWindow* s_profWindow =0;
|
||||
|
||||
#define DEMO_SELECTION_COMBOBOX 13
|
||||
const char* startFileName = "bulletDemo.txt";
|
||||
@@ -606,8 +607,8 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
|
||||
//gui->getInternalData()->pRenderer->setTextureLoader(myTexLoader);
|
||||
|
||||
|
||||
MyProfileWindow* profWindow = setupProfileWindow(gui->getInternalData());
|
||||
profileWindowSetVisible(profWindow,false);
|
||||
s_profWindow= setupProfileWindow(gui->getInternalData());
|
||||
profileWindowSetVisible(s_profWindow,false);
|
||||
gui->setFocus();
|
||||
|
||||
s_parameterInterface = s_app->m_parameterInterface = new GwenParameterInterface(gui->getInternalData());
|
||||
@@ -775,8 +776,8 @@ void OpenGLExampleBrowser::update(float deltaTime)
|
||||
static int toggle = 1;
|
||||
if (1)
|
||||
{
|
||||
//if (!pauseSimulation)
|
||||
// processProfileData(profWindow,false);
|
||||
if (!pauseSimulation)
|
||||
processProfileData(s_profWindow,false);
|
||||
|
||||
if (sUseOpenGL2)
|
||||
{
|
||||
|
||||
@@ -217,6 +217,21 @@ void SimpleCamera::getCameraViewMatrix(float viewMatrix[16]) const
|
||||
b3CreateLookAt(m_data->m_cameraPosition,m_data->m_cameraTargetPosition,m_data->m_cameraUp,viewMatrix);
|
||||
}
|
||||
|
||||
void SimpleCamera::getCameraTargetPosition(double pos[3]) const
|
||||
{
|
||||
pos[0] =m_data->m_cameraTargetPosition[0];
|
||||
pos[1] =m_data->m_cameraTargetPosition[1];
|
||||
pos[2] =m_data->m_cameraTargetPosition[2];
|
||||
}
|
||||
|
||||
void SimpleCamera::getCameraPosition(double pos[3]) const
|
||||
{
|
||||
pos[0] =m_data->m_cameraPosition[0];
|
||||
pos[1] =m_data->m_cameraPosition[1];
|
||||
pos[2] =m_data->m_cameraPosition[2];
|
||||
}
|
||||
|
||||
|
||||
void SimpleCamera::getCameraTargetPosition(float pos[3]) const
|
||||
{
|
||||
pos[0] =m_data->m_cameraTargetPosition[0];
|
||||
|
||||
@@ -17,6 +17,10 @@ struct SimpleCamera : public CommonCameraInterface
|
||||
virtual void getCameraTargetPosition(float pos[3]) const;
|
||||
virtual void getCameraPosition(float pos[3]) const;
|
||||
|
||||
virtual void getCameraTargetPosition(double pos[3]) const;
|
||||
virtual void getCameraPosition(double pos[3]) const;
|
||||
|
||||
|
||||
virtual void setCameraTargetPosition(float x,float y,float z);
|
||||
virtual void setCameraDistance(float dist);
|
||||
virtual float getCameraDistance() const;
|
||||
|
||||
Reference in New Issue
Block a user