Changed Ghoul version

replaced all _SAFE logging macros with non-safe ones
This commit is contained in:
Alexander Bock
2014-01-20 17:57:13 +01:00
parent dd02a73831
commit b697b5a212
6 changed files with 44 additions and 44 deletions
+27 -27
View File
@@ -108,16 +108,16 @@ void SceneGraphLoader::loadSceneGraphTree(tinyxml2::XMLElement* node, SceneGraph
if(setting == "focus") {
// HACK
OsEng.interactionHandler().setFocusNode(thisNode->parent());
LINFO_SAFE("Setting camera focus: " << name);
LINFO("Setting camera focus: " << name);
} else if(setting == "position") {
OsEng.interactionHandler().getCamera()->setPosition(thisNode->getWorldPosition());
LINFO_SAFE("Setting camera position: " << name);
LINFO("Setting camera position: " << name);
}
}
} else {
LERROR_SAFE("Could not load SceneGraphNode [ " << name << " ], ignoring all children!");
LERROR("Could not load SceneGraphNode [ " << name << " ], ignoring all children!");
}
}
@@ -171,18 +171,18 @@ SceneGraphNode * SceneGraphLoader::loadSceneGraphNode(tinyxml2::XMLElement *xmln
// multiply with factor 1000, spice uses km as standard and Open Space uses m
radius = pss::CreatePSS(radii[0]*1000.0);
} else {
LERROR_SAFE("Tried to use spice raddi but failed for: " << name);
LERROR("Tried to use spice raddi but failed for: " << name);
delete thisNode;
return nullptr;
}
} else {
LERROR_SAFE("Could not find radiiElement or spice id for: " << name << " " << thisNode->getSpiceID() );
LERROR("Could not find radiiElement or spice id for: " << name << " " << thisNode->getSpiceID() );
delete thisNode;
return nullptr;
}
LINFO_SAFE("Adding renderable: "<< name);
LINFO("Adding renderable: "<< name);
// load texture and shader
ghoul::opengl::Texture *texture = nullptr;
ghoul::opengl::ProgramObject *program = nullptr;
@@ -190,15 +190,15 @@ SceneGraphNode * SceneGraphLoader::loadSceneGraphNode(tinyxml2::XMLElement *xmln
tinyxml2::XMLElement* textureElement = renderableElement->FirstChildElement( "texture" );
if(textureElement) {
if( ! getTexture(&texture, path, textureElement->FirstChildElement( "file" ))) {
LERROR_SAFE("Could not load texture " << name);
LERROR("Could not load texture " << name);
}
} else {
LERROR_SAFE("Could not find texture for: " << name);
LERROR("Could not find texture for: " << name);
}
// load shader
if( ! getShader(&program, path, renderableElement->FirstChildElement( "shader" ))) {
LERROR_SAFE("Could not find shader for: " << name);
LERROR("Could not find shader for: " << name);
}
if( ! texture || ! program) {
@@ -228,18 +228,18 @@ SceneGraphNode * SceneGraphLoader::loadSceneGraphNode(tinyxml2::XMLElement *xmln
// multiply with factor 1000, spice uses km as standard and Open Space uses m
radius = pss::CreatePSS(radii[0]*1000.0);
} else {
LERROR_SAFE("Tried to use spice raddi but failed for: " << name);
LERROR("Tried to use spice raddi but failed for: " << name);
delete thisNode;
return nullptr;
}
} else {
LERROR_SAFE("Could not find radiiElement or spice id for: " << name << " " << thisNode->getSpiceID() );
LERROR("Could not find radiiElement or spice id for: " << name << " " << thisNode->getSpiceID() );
delete thisNode;
return nullptr;
}
LINFO_SAFE("Adding renderable: "<< name);
LINFO("Adding renderable: "<< name);
// load texture and shader
ghoul::opengl::Texture *texture = nullptr;
ghoul::opengl::ProgramObject *program = nullptr;
@@ -247,15 +247,15 @@ SceneGraphNode * SceneGraphLoader::loadSceneGraphNode(tinyxml2::XMLElement *xmln
tinyxml2::XMLElement* textureElement = renderableElement->FirstChildElement( "texture" );
if(textureElement) {
if( ! getTexture(&texture, path, textureElement->FirstChildElement( "file" ))) {
LERROR_SAFE("Could not load texture " << name);
LERROR("Could not load texture " << name);
}
} else {
LERROR_SAFE("Could not find texture for: " << name);
LERROR("Could not find texture for: " << name);
}
// load shader
if( ! getShader(&program, path, renderableElement->FirstChildElement( "shader" ))) {
LERROR_SAFE("Could not find shader for: " << name);
LERROR("Could not find shader for: " << name);
}
if( ! texture || ! program) {
@@ -268,7 +268,7 @@ SceneGraphNode * SceneGraphLoader::loadSceneGraphNode(tinyxml2::XMLElement *xmln
renderable->setTexture(texture);
renderable->setProgramObject(program);
thisNode->setRenderable(renderable);
LINFO_SAFE("Adding renderablePlanet");
LINFO("Adding renderablePlanet");
}
}
@@ -278,7 +278,7 @@ SceneGraphNode * SceneGraphLoader::loadSceneGraphNode(tinyxml2::XMLElement *xmln
return thisNode;
} else {
LERROR_SAFE("Unable to open properties element");
LERROR("Unable to open properties element");
return nullptr;
}
}
@@ -307,10 +307,10 @@ bool SceneGraphLoader::getSpice(SceneGraphNode *node, SceneGraphNode *parent, ti
node->setSpiceID(spiceID,parentSpice);
return true;
} else {
LERROR_SAFE("Could not find spice ID ");
LERROR("Could not find spice ID ");
}
} else {
LERROR_SAFE("Could not find spice identifier element in xml ");
LERROR("Could not find spice identifier element in xml ");
}
}
return false;
@@ -340,16 +340,16 @@ bool SceneGraphLoader::getTexture(ghoul::opengl::Texture **texture, const std::s
// if textures where accessed, upload them to the graphics card. This check needs to be done to avoid crash.
if(texture) {
LINFO_SAFE("Uploading tetxure: "<< texturePath);
LINFO("Uploading tetxure: "<< texturePath);
(*texture)->uploadTexture();
//ghoul::opengl::Texture *tmp = new ghoul::opengl::Texture(*texture);
//texture = tmp;
return true;
} else {
LERROR_SAFE("Could not load texture: "<< texturePath);
LERROR("Could not load texture: "<< texturePath);
}
} else {
LERROR_SAFE("Could not find file element");
LERROR("Could not find file element");
}
return false;
}
@@ -369,7 +369,7 @@ bool SceneGraphLoader::getShader(ghoul::opengl::ProgramObject **program, const s
return true;
}
LERROR_SAFE("Could not find common shader: " << identifier);
LERROR("Could not find common shader: " << identifier);
return false;
// load and return the shader
@@ -414,13 +414,13 @@ bool SceneGraphLoader::getShader(ghoul::opengl::ProgramObject **program, const s
if(programObject->compileShaderObjects()) {
if(programObject->linkProgramObject()) {
*program = programObject;
LINFO_SAFE("Common shader successfully loaded!");
LINFO("Common shader successfully loaded!");
return true;
} else {
LERROR_SAFE("Common shader could not be linked!");
LERROR("Common shader could not be linked!");
}
} else {
LERROR_SAFE("Common shader could not be compiled!");
LERROR("Common shader could not be compiled!");
}
if(programObject)
@@ -431,7 +431,7 @@ bool SceneGraphLoader::getShader(ghoul::opengl::ProgramObject **program, const s
}
}
LERROR_SAFE("Could not load shader");
LERROR("Could not load shader");
return false;
}
+1 -1
View File
@@ -27,7 +27,7 @@ SceneGraphNode::SceneGraphNode() {
SceneGraphNode::~SceneGraphNode() {
// logger string
std::string _loggerCat = "SceneGraphNode::~SceneGraphNode()";
LDEBUG_SAFE("Deallocating: " << nodeName_);
LDEBUG("Deallocating: " << nodeName_);
// deallocate the renderable
if(renderable_)
+7 -7
View File
@@ -30,7 +30,7 @@ Spice::Spice() {
// print spice toolkit version
ConstSpiceChar * versn;
versn = tkvrsn_c( "TOOLKIT" );
LINFO_SAFE("Spice Toolkit version: " << versn);
LINFO("Spice Toolkit version: " << versn);
// make the spice framework not exit on error
erract_c (const_cast<char*>("SET"), lenout, const_cast<char*>("RETURN"));
@@ -93,8 +93,8 @@ bool Spice::loadKernel(const std::string &path) {
if(failed) {
char shrtms[shrtms_len];
getmsg_c ( "SHORT", shrtms_len, shrtms );
LERROR_SAFE("Error when loading kernel with path: " << path);
LERROR_SAFE("Spice reported: " << shrtms);
LERROR("Error when loading kernel with path: " << path);
LERROR("Spice reported: " << shrtms);
reset_c();
}
return ( ! failed);
@@ -116,8 +116,8 @@ bool Spice::getRadii(const std::string & name, double radii[3], int *n) {
if(failed) {
char shrtms[shrtms_len];
getmsg_c ( "SHORT", shrtms_len, shrtms );
LERROR_SAFE("Error when fetching radii");
LERROR_SAFE("Spice reported: " << shrtms);
LERROR("Error when fetching radii");
LERROR("Spice reported: " << shrtms);
reset_c();
}
return ( ! failed);
@@ -164,8 +164,8 @@ bool Spice::spk_getOrientation(const std::string &target, double state[3][3]) {
if(failed) {
char shrtms[shrtms_len];
getmsg_c ( "SHORT", shrtms_len, shrtms );
LERROR_SAFE("Error when fetching orientation");
LERROR_SAFE("Spice reported: " << shrtms);
LERROR("Error when fetching orientation");
LERROR("Spice reported: " << shrtms);
reset_c();
}
return ( ! failed);
+4 -4
View File
@@ -152,11 +152,11 @@ void gl4::VBO::init()
if(_vBufferID == 0)
{
LERROR_SAFE("Vertex buffer not initialized");
LERROR("Vertex buffer not initialized");
}
if(_iBufferID == 0)
{
LERROR_SAFE("Index buffer not initialized");
LERROR("Index buffer not initialized");
}
glBindVertexArray(0);
@@ -164,8 +164,8 @@ void gl4::VBO::init()
errorID = glGetError();
if(errorID != GL_NO_ERROR)
{
LERROR_SAFE("OpenGL error: " << glewGetErrorString(errorID));
LERROR_SAFE("Attempting to proceed anyway. Expect rendering errors or a crash.");
LERROR("OpenGL error: " << glewGetErrorString(errorID));
LERROR("Attempting to proceed anyway. Expect rendering errors or a crash.");
}
}
+4 -4
View File
@@ -67,10 +67,10 @@ public:
glBufferData(GL_ELEMENT_ARRAY_BUFFER, isize_*sizeof(int), iarray_, GL_STATIC_DRAW);
if(vBufferID_ == 0) {
LERROR_SAFE("Vertex buffer not initialized");
LERROR("Vertex buffer not initialized");
}
if(iBufferID_ == 0) {
LERROR_SAFE("Index buffer not initialized");
LERROR("Index buffer not initialized");
}
glBindVertexArray(0);
@@ -78,8 +78,8 @@ public:
errorID = glGetError();
if(errorID != GL_NO_ERROR)
{
LERROR_SAFE("OpenGL error: " << glewGetErrorString(errorID));
LERROR_SAFE("Attempting to proceed anyway. Expect rendering errors or a crash.");
LERROR("OpenGL error: " << glewGetErrorString(errorID));
LERROR("Attempting to proceed anyway. Expect rendering errors or a crash.");
}
};