rename to b3 convention, to avoid naming conflicts when using in combination with Bullet 2.x

This commit is contained in:
erwincoumans
2013-04-29 15:19:36 -07:00
parent 7366e262fd
commit 55b69201a9
88 changed files with 1682 additions and 1584 deletions

View File

@@ -471,7 +471,7 @@ int main(int argc, char* argv[])
while (!window->requestedExit())
{
CProfileManager::Reset();
b3ProfileManager::Reset();
GLint err = glGetError();
b3Assert(err==GL_NO_ERROR);
@@ -637,7 +637,7 @@ int main(int argc, char* argv[])
glFinish();
}
CProfileManager::Increment_Frame_Counter();
b3ProfileManager::Increment_Frame_Counter();
static bool printStats = true;
@@ -650,7 +650,7 @@ int main(int argc, char* argv[])
if (count<0)
{
count = 100;
// CProfileManager::dumpAll();
// b3ProfileManager::dumpAll();
//printStats = false;
} else
{

View File

@@ -1007,7 +1007,7 @@ void GLInstancingRenderer::updateCamera()
eyePos[m_forwardAxis] = -m_data->m_cameraDistance;
b3Vector3 forward(eyePos[0],eyePos[1],eyePos[2]);
if (forward.length2() < SIMD_EPSILON)
if (forward.length2() < B3_EPSILON)
{
forward.setValue(1.f,0.f,0.f);
}

View File

@@ -152,15 +152,15 @@ public:
}
float dumpRecursive(CProfileIterator* profileIterator, Gwen::Controls::TreeNode* parentNode)
float dumpRecursive(b3ProfileIterator* profileIterator, Gwen::Controls::TreeNode* parentNode)
{
profileIterator->First();
if (profileIterator->Is_Done())
return 0.f;
float accumulated_time=0,parent_time = profileIterator->Is_Root() ? CProfileManager::Get_Time_Since_Reset() : profileIterator->Get_Current_Parent_Total_Time();
float accumulated_time=0,parent_time = profileIterator->Is_Root() ? b3ProfileManager::Get_Time_Since_Reset() : profileIterator->Get_Current_Parent_Total_Time();
int i;
int frames_since_reset = CProfileManager::Get_Frame_Count_Since_Reset();
int frames_since_reset = b3ProfileManager::Get_Frame_Count_Since_Reset();
//printf("Profiling: %s (total running time: %.3f ms) ---\n", profileIterator->Get_Current_Parent_Name(), parent_time );
float totalTime = 0.f;
@@ -175,7 +175,7 @@ public:
numChildren++;
float current_total_time = profileIterator->Get_Current_Total_Time();
accumulated_time += current_total_time;
double fraction = parent_time > SIMD_EPSILON ? (current_total_time / parent_time) * 100 : 0.f;
double fraction = parent_time > B3_EPSILON ? (current_total_time / parent_time) * 100 : 0.f;
Gwen::String name(profileIterator->Get_Current_Name());
#ifdef _WIN32
@@ -214,7 +214,7 @@ public:
}
void UpdateText(CProfileIterator* profileIterator, bool idle)
void UpdateText(b3ProfileIterator* profileIterator, bool idle)
{
static bool update=true;
@@ -232,7 +232,7 @@ public:
static double time_since_reset = 0.f;
if (!idle)
{
time_since_reset = CProfileManager::Get_Time_Since_Reset();
time_since_reset = b3ProfileManager::Get_Time_Since_Reset();
}
//Gwen::UnicodeString txt = Gwen::Utility::Format( L"FEM Settings %i fps", test );
@@ -243,7 +243,7 @@ public:
double totalTime = 0;
int frames_since_reset = CProfileManager::Get_Frame_Count_Since_Reset();
int frames_since_reset = b3ProfileManager::Get_Frame_Count_Since_Reset();
profileIterator->First();
@@ -258,10 +258,10 @@ public:
#ifdef _WIN32
Gwen::UnicodeString uname = Gwen::Utility::StringToUnicode(name);
Gwen::UnicodeString txt = Gwen::Utility::Format( L"Profiling: %s total time: %.3f ms, unaccounted %.3f %% :: %.3f ms", uname.c_str(), parent_time ,
parent_time > SIMD_EPSILON ? ((parent_time - accumulated_time) / parent_time) * 100 : 0.f, parent_time - accumulated_time);
parent_time > B3_EPSILON ? ((parent_time - accumulated_time) / parent_time) * 100 : 0.f, parent_time - accumulated_time);
#else
Gwen::UnicodeString txt = Gwen::Utility::Format( L"Profiling: %s total time: %.3f ms, unaccounted %.3f %% :: %.3f ms", name, parent_time ,
parent_time > SIMD_EPSILON ? ((parent_time - accumulated_time) / parent_time) * 100 : 0.f, parent_time - accumulated_time);
parent_time > B3_EPSILON ? ((parent_time - accumulated_time) / parent_time) * 100 : 0.f, parent_time - accumulated_time);
#endif
//sprintf(blockTime,"--- Profiling: %s (total running time: %.3f ms) ---", profileIterator->Get_Current_Parent_Name(), parent_time );
//displayProfileString(xOffset,yStart,blockTime);
@@ -364,7 +364,7 @@ void resizeGUI(int width, int height)
primRenderer->setScreenSize(width,height);
}
void processProfileData(CProfileIterator* iterator, bool idle)
void processProfileData(b3ProfileIterator* iterator, bool idle)
{
if (profWindow)
{

View File

@@ -18,7 +18,7 @@ extern Gwen::Controls::Canvas* pCanvas;
class GLPrimitiveRenderer;
void setupGUI(int width, int height, sth_stash* font, float retinaScale,GLPrimitiveRenderer* primRender);
void processProfileData(class CProfileIterator* iterator, bool idle);
void processProfileData(class b3ProfileIterator* iterator, bool idle);
void resizeGUI(int width, int height);
#endif //MY_GWEN_WINDOW_H

View File

@@ -341,13 +341,13 @@ int main(int argc, char* argv[])
pCanvas->SetSize(g_OpenGLWidth,g_OpenGLHeight);
}
setupGUI(g_OpenGLWidth,g_OpenGLHeight,stash,retinaScale,primRenderer);
class CProfileIterator* m_profileIterator;
m_profileIterator = CProfileManager::Get_Iterator();
class b3ProfileIterator* m_profileIterator;
m_profileIterator = b3ProfileManager::Get_Iterator();
glClearColor(1,1,1,1);
while (!window->requestedExit())
{
CProfileManager::Reset();
b3ProfileManager::Reset();
{
B3_PROFILE("loop");
@@ -473,7 +473,7 @@ int main(int argc, char* argv[])
CProfileManager::Increment_Frame_Counter();
b3ProfileManager::Increment_Frame_Counter();
@@ -491,7 +491,7 @@ int main(int argc, char* argv[])
//B3_PROFILE("processProfileData");
processProfileData(m_profileIterator,false);
}
//CProfileManager::dumpAll();
//b3ProfileManager::dumpAll();
//printStats = false;
} else
{

View File

@@ -114,7 +114,7 @@ void createSceneProgrammatically(GLInstancingRenderer& renderer)
int tetraShapeIndex = -1;
float position[4]={0,0,0,0};
b3Quaternion born(b3Vector3(1,0,0),SIMD_PI*0.25*0.5);
b3Quaternion born(b3Vector3(1,0,0),B3_PI*0.25*0.5);
float orn[4] = {0,0,0,1};
// float rotOrn[4] = {born.getX(),born.getY(),born.getZ(),born.getW()};//