54 return gSettings.get();
69 gDefaultLogger = logger;
73 return gDefaultLogger.get();
84 return gDefaultLoadWriterManager.get();
88 gDefaultLoadWriterManager = lwm;
99 return gDefaultFileSystem.get();
103 gDefaultFileSystem = fs;
114 return gDefaultMersenneTwister.get();
118 gDefaultMersenneTwister= reg;
129 std::string gVersionString =
String(
Say(
"%n.%n.%s") << VL_Major << VL_Minor << VL_Patch ).
toStdString();
134 #if defined(VL_PLATFORM_WINDOWS) 141 #if defined(VL_PLATFORM_WINDOWS) 142 if (AllocConsole() == 0)
144 FILE* f_new_stdout =
nullptr;
145 FILE* f_new_stderr =
nullptr;
146 FILE* f_new_stdin =
nullptr;
147 ::freopen_s(&f_new_stdout,
"CONOUT$",
"w", stdout);
148 ::freopen_s(&f_new_stderr,
"CONOUT$",
"w", stderr);
149 ::freopen_s(&f_new_stdin,
"CONIN$",
"r", stdin);
161 #if defined(_MSC_VER) 162 const char* compiler =
"MSVC";
163 #elif defined(__GNUG__) 164 const char* compiler =
"GCC";
166 const char* compiler =
"UNKNOWN";
169 #if defined(DEBUG) || !defined(NDEBUG) 170 const char* build_type =
"DEBUG";
172 const char* build_type =
"RELEASE";
175 vl::Log::print(
Say(
"Visualization Library v%s [%s]\n%s - %s - %s compiler [%s] [%s]\n")
177 << (
sizeof(
vec3) ==
sizeof(
fvec3) ?
"f32" :
"f64")
178 << __DATE__ << __TIME__ << compiler << build_type
179 << (
sizeof(
void*) == 4 ?
"x32" :
"x64") );
182 const char* val = getenv(
"VL_LOGFILE_PATH");
188 val = getenv(
"VL_DATA_PATH");
194 val = getenv(
"VL_VERBOSITY_LEVEL");
200 val = getenv(
"VL_CHECK_GL_STATES");
Utility class to generate logs.
VLCORE_EXPORT FileSystem * defFileSystem()
Returns the default FileSystem used by VisualizationLibrary.
VLCORE_EXPORT void abort_vl()
A simple String formatting class.
VLCORE_EXPORT void logSystemInfo()
Logs VL and system information.
VLCORE_EXPORT void showWin32Console()
Shows a console window that displays the standard output. This function is meant to be used only unde...
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
Global application settings controlling how Visualization Library behaves.
The LoadWriterManager class loads and writes resources using the registered ResourceLoadWriter object...
< Outputs normal information messages, plus all error messages.
VLCORE_EXPORT void setGlobalSettings(GlobalSettings *)
Sets VisulizationLibrary's global settings.
Visualization Library main namespace.
Manages multiple VirtualDirectory objects.
static void print(const String &message)
Application message for the user.
VLCORE_EXPORT void setDefFileSystem(FileSystem *fs)
Sets the default FileSystem used by VisualizationLibrary.
VLCORE_EXPORT const char * versionString()
Returns the Visualization Library's version string.
< Outputs critical and runtime error messages.
VLCORE_EXPORT void setDefLoadWriterManager(LoadWriterManager *lwm)
Sets the default LoadWriterManager used by Visualization Library.
< Outputs extra information messages useful for debugging, plus all normal and error messages...
VLCORE_EXPORT void setDefLogger(Log *logger)
Installs the default logger used by Visualization Library. Setting this to NULL will disable logging...
VLCORE_EXPORT void setDefMersenneTwister(MersenneTwister *)
The ref<> class is used to reference-count an Object.
std::string toStdString() const
Returns a UTF8 encoded std::string.
VLCORE_EXPORT Log * defLogger()
Returns the currently installed default logger.
static void sleep(unsigned int milliseconds)
VLCORE_EXPORT MersenneTwister * defMersenneTwister()
VLCORE_EXPORT LoadWriterManager * defLoadWriterManager()
Returs the default LoadWriterManager used by Visualization Library.
VLCORE_EXPORT GlobalSettings * globalSettings()
Returns VisulizationLibrary's global settings.