- performance changes... (problem found by titi) most debug calls line are skipped when the debug flag is disabled even BEFORE getting into the handledebug method.

This improves performance VERY MUCH.
This commit is contained in:
Mark Vejvoda
2011-03-28 03:54:23 +00:00
parent 453e5a12e6
commit 3b56aa4475
58 changed files with 1573 additions and 2312 deletions

View File

@@ -42,7 +42,7 @@ Texture::Texture() {
void Texture1D::load(const string &path){
this->path= path;
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
if (pixmap.getComponents() == -1) { //TODO: look where you really need that
pixmap.init(defaultComponents);
@@ -66,7 +66,7 @@ void Texture1D::deletePixels() {
void Texture2D::load(const string &path){
this->path= path;
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
if (pixmap.getComponents() == -1) {
pixmap.init(defaultComponents);
@@ -90,7 +90,7 @@ void Texture2D::deletePixels() {
void Texture3D::loadSlice(const string &path, int slice){
this->path= path;
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
if (pixmap.getComponents() == -1) {
pixmap.init(defaultComponents);
@@ -114,7 +114,7 @@ void Texture3D::deletePixels() {
void TextureCube::loadFace(const string &path, int face){
this->path= path;
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
if (pixmap.getFace(0)->getComponents() == -1) {
pixmap.init(defaultComponents);