- added another xerces XML validation flag

- added new commandline option: opengl-info to output graphics card info
- added some opengl rendering optimzations
This commit is contained in:
Mark Vejvoda
2010-07-12 06:30:54 +00:00
parent bdd4f306f4
commit d1fa4975de
8 changed files with 501 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
// ==============================================================
// This file is part of Glest Shared Library (www.glest.org)
//
// Copyright (C) 2001-2007 Marti<EFBFBD>o Figueroa
// Copyright (C) 2001-2007 Martio Figueroa
//
// You can redistribute this code and/or modify it under
// the terms of the GNU General Public License as published
@@ -36,7 +36,7 @@ void Properties::load(const string &path){
this->path= path;
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
fileStream.open(path.c_str(), ios_base::in);
if(fileStream.fail()){
@@ -44,7 +44,7 @@ void Properties::load(const string &path){
throw runtime_error("Can't open propertyMap file: " + path);
}
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
propertyMap.clear();
while(!fileStream.eof()){

View File

@@ -42,6 +42,7 @@ std::map<SystemFlags::DebugType,SystemFlags::SystemFlagsType> SystemFlags::debug
int SystemFlags::lockFile = -1;
int SystemFlags::lockFileCountIndex = -1;
string SystemFlags::lockfilename = "";
bool SystemFlags::haveSpecialOutputCommandLineOption = false;
CURL *SystemFlags::curl_handle = NULL;
int SystemFlags::DEFAULT_HTTP_TIMEOUT = 10;
//
@@ -147,7 +148,8 @@ CURL *SystemFlags::initHTTP() {
return handle;
}
void SystemFlags::init() {
void SystemFlags::init(bool haveSpecialOutputCommandLineOption) {
SystemFlags::haveSpecialOutputCommandLineOption = haveSpecialOutputCommandLineOption;
if(SystemFlags::debugLogFileList.size() == 0) {
SystemFlags::debugLogFileList[SystemFlags::debugSystem] = SystemFlags::SystemFlagsType(SystemFlags::debugSystem);
SystemFlags::debugLogFileList[SystemFlags::debugNetwork] = SystemFlags::SystemFlagsType(SystemFlags::debugNetwork);
@@ -206,7 +208,10 @@ SystemFlags::~SystemFlags() {
void SystemFlags::Close() {
if(SystemFlags::debugLogFileList.size() > 0) {
printf("START Closing logfiles\n");
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
printf("START Closing logfiles\n");
}
for(std::map<SystemFlags::DebugType,SystemFlags::SystemFlagsType>::iterator iterMap = SystemFlags::debugLogFileList.begin();
iterMap != SystemFlags::debugLogFileList.end(); iterMap++) {
SystemFlags::SystemFlagsType &currentDebugLog = iterMap->second;
@@ -229,13 +234,15 @@ void SystemFlags::Close() {
}
if(SystemFlags::debugLogFileList.size() > 0) {
printf("END Closing logfiles\n");
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
printf("END Closing logfiles\n");
}
}
}
void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
if(SystemFlags::debugLogFileList.size() == 0) {
SystemFlags::init();
SystemFlags::init(false);
}
SystemFlags::SystemFlagsType &currentDebugLog = SystemFlags::debugLogFileList[type];
if(currentDebugLog.enabled == false) {
@@ -312,13 +319,17 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
SystemFlags::lockfilename = newlockfile;
debugLog += intToStr(idx);
printf("Opening additional logfile [%s]\n",debugLog.c_str());
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
printf("Opening additional logfile [%s]\n",debugLog.c_str());
}
}
}
else if(SystemFlags::lockFileCountIndex > 0) {
debugLog += intToStr(SystemFlags::lockFileCountIndex);
printf("Opening additional logfile [%s]\n",debugLog.c_str());
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
printf("Opening additional logfile [%s]\n",debugLog.c_str());
}
}
if(currentDebugLog.fileStream == NULL) {
@@ -328,7 +339,9 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
currentDebugLog.mutex = new Mutex();
}
printf("Opening logfile [%s] type = %d, currentDebugLog.fileStreamOwner = %d\n",debugLog.c_str(),type, currentDebugLog.fileStreamOwner);
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
printf("Opening logfile [%s] type = %d, currentDebugLog.fileStreamOwner = %d\n",debugLog.c_str(),type, currentDebugLog.fileStreamOwner);
}
MutexSafeWrapper safeMutex(currentDebugLog.mutex);