Fix warnings in testbed application
This commit is contained in:
parent
235b1db90c
commit
21bb8bc625
|
@ -47,7 +47,7 @@ ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position,
|
||||||
mScalingMatrix = openglframework::Matrix4::identity();
|
mScalingMatrix = openglframework::Matrix4::identity();
|
||||||
|
|
||||||
// For each subpart of the mesh
|
// For each subpart of the mesh
|
||||||
for (int i=0; i<getNbParts(); i++) {
|
for (uint i=0; i<getNbParts(); i++) {
|
||||||
|
|
||||||
// Vertex and Indices array for the triangle mesh (data in shared and not copied)
|
// Vertex and Indices array for the triangle mesh (data in shared and not copied)
|
||||||
rp3d::TriangleVertexArray* vertexArray =
|
rp3d::TriangleVertexArray* vertexArray =
|
||||||
|
@ -104,7 +104,7 @@ ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position, float mass,
|
||||||
mScalingMatrix = openglframework::Matrix4::identity();
|
mScalingMatrix = openglframework::Matrix4::identity();
|
||||||
|
|
||||||
// For each subpart of the mesh
|
// For each subpart of the mesh
|
||||||
for (int i=0; i<getNbParts(); i++) {
|
for (uint i=0; i<getNbParts(); i++) {
|
||||||
|
|
||||||
// Vertex and Indices array for the triangle mesh (data in shared and not copied)
|
// Vertex and Indices array for the triangle mesh (data in shared and not copied)
|
||||||
rp3d::TriangleVertexArray* vertexArray =
|
rp3d::TriangleVertexArray* vertexArray =
|
||||||
|
@ -146,7 +146,7 @@ ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position, float mass,
|
||||||
ConcaveMesh::~ConcaveMesh() {
|
ConcaveMesh::~ConcaveMesh() {
|
||||||
|
|
||||||
// Destroy the triangle mesh data for the physics engine
|
// Destroy the triangle mesh data for the physics engine
|
||||||
for (int i=0; i<mPhysicsTriangleMesh.getNbSubparts(); i++) {
|
for (uint i=0; i<mPhysicsTriangleMesh.getNbSubparts(); i++) {
|
||||||
delete mPhysicsTriangleMesh.getSubpart(i);
|
delete mPhysicsTriangleMesh.getSubpart(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,4 @@ void Light::init() {
|
||||||
|
|
||||||
// Enable the light
|
// Enable the light
|
||||||
enable();
|
enable();
|
||||||
|
|
||||||
// Set the diffuse and specular color
|
|
||||||
GLfloat diffuseColor[] = {mDiffuseColor.r, mDiffuseColor.g, mDiffuseColor.b, mDiffuseColor.a};
|
|
||||||
GLfloat specularColor[] = {mSpecularColor.r,mSpecularColor.g,mSpecularColor.b,mSpecularColor.a};
|
|
||||||
//glLightfv(mLightID, GL_DIFFUSE, diffuseColor);
|
|
||||||
//glLightfv(mLightID, GL_SPECULAR, specularColor);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,6 @@ ConcaveMeshScene::ConcaveMeshScene(const std::string& name)
|
||||||
// ---------- Create the cube ----------- //
|
// ---------- Create the cube ----------- //
|
||||||
|
|
||||||
// Position
|
// Position
|
||||||
rp3d::decimal radius = 2.0;
|
|
||||||
openglframework::Vector3 spherePos(15, 10, 0);
|
openglframework::Vector3 spherePos(15, 10, 0);
|
||||||
|
|
||||||
// Create a sphere and a corresponding rigid in the dynamics world
|
// Create a sphere and a corresponding rigid in the dynamics world
|
||||||
|
|
|
@ -44,9 +44,6 @@ JointsScene::JointsScene(const std::string& name)
|
||||||
// Gravity vector in the dynamics world
|
// Gravity vector in the dynamics world
|
||||||
rp3d::Vector3 gravity(0, rp3d::decimal(-9.81), 0);
|
rp3d::Vector3 gravity(0, rp3d::decimal(-9.81), 0);
|
||||||
|
|
||||||
// Time step for the physics simulation
|
|
||||||
rp3d::decimal timeStep = 1.0f / 60.0f;
|
|
||||||
|
|
||||||
// Create the dynamics world for the physics simulation
|
// Create the dynamics world for the physics simulation
|
||||||
mDynamicsWorld = new rp3d::DynamicsWorld(gravity);
|
mDynamicsWorld = new rp3d::DynamicsWorld(gravity);
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ void Gui::createSimulationPanel() {
|
||||||
// Scenes
|
// Scenes
|
||||||
std::vector<Scene*> scenes = mApp->getScenes();
|
std::vector<Scene*> scenes = mApp->getScenes();
|
||||||
std::vector<std::string> scenesNames;
|
std::vector<std::string> scenesNames;
|
||||||
for (int i=0; i<scenes.size(); i++) {
|
for (uint i=0; i<scenes.size(); i++) {
|
||||||
scenesNames.push_back(scenes[i]->getName().c_str());
|
scenesNames.push_back(scenes[i]->getName().c_str());
|
||||||
}
|
}
|
||||||
Label* labelScenes = new Label(mSimulationPanel, "Scene","sans-bold");
|
Label* labelScenes = new Label(mSimulationPanel, "Scene","sans-bold");
|
||||||
|
|
|
@ -50,8 +50,8 @@ const float TestbedApplication::SCROLL_SENSITIVITY = 0.02f;
|
||||||
// Constructor
|
// Constructor
|
||||||
TestbedApplication::TestbedApplication(bool isFullscreen)
|
TestbedApplication::TestbedApplication(bool isFullscreen)
|
||||||
: Screen(Vector2i(1280, 760), "Testbed ReactPhysics3D", true, isFullscreen),
|
: Screen(Vector2i(1280, 760), "Testbed ReactPhysics3D", true, isFullscreen),
|
||||||
mIsInitialized(false), mFPS(0), mNbFrames(0), mPreviousTime(0),
|
mIsInitialized(false), mGui(this), mFPS(0), mNbFrames(0), mPreviousTime(0),
|
||||||
mLastTimeComputedFPS(0), mFrameTime(0), mPhysicsTime(0), mGui(this) {
|
mLastTimeComputedFPS(0), mFrameTime(0), mPhysicsTime(0) {
|
||||||
|
|
||||||
mCurrentScene = NULL;
|
mCurrentScene = NULL;
|
||||||
mIsMultisamplingActive = true;
|
mIsMultisamplingActive = true;
|
||||||
|
@ -128,7 +128,7 @@ void TestbedApplication::createScenes() {
|
||||||
// Remove all the scenes
|
// Remove all the scenes
|
||||||
void TestbedApplication::destroyScenes() {
|
void TestbedApplication::destroyScenes() {
|
||||||
|
|
||||||
for (int i=0; i<mScenes.size(); i++) {
|
for (uint i=0; i<mScenes.size(); i++) {
|
||||||
delete mScenes[i];
|
delete mScenes[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user