remove debug draw shader, now that debug and debugdraw serve the same function
remove debug draw code from actors to clean
replaced int uniforms with bool for better readability
clang format
cleanup, remove unused func, and mistake whitespace
fix namespace
added more colors
fixed missing whitespace
renamed files
roundabout way to change case with windows noticing
fixed type
fix filename in cmakelist.txt
ported shader and c++ code so glsl 120 can be used instead of 330
new debug shader and old one are almost unified
for some reason, even though I get no compilation issue, old debug draws don't work, only the new one implemented by this MR
remove useless const cast
changes when the buffers are reset -> at the end of the draw, because that's when we are certain the data isn't needed anymore
removed useless variable
fixed typo
include osg::vec3 instead of osg vec3f
compile linux
compile ?
applied clang format to the new files
Moved debug draw to components, fixed some whitespace issues, added include guard
fixed uniform name, removed old files
Fixes some more whitespace weirdness
high_resolution_clock may not give real time. MSVC implements it as
steady_clock that is basically CPU time which is usually desynchronized with
real time.
To minimize overhead for calls when level is less than current. For example
Log(Debug::Debug) should not lock mutex when current logging level is Verbose.
When the crash catcher catch a signal it forks to collect data about its
parent. In the process the child reinitialize the log file, which ends
up empty.
This should fix the issue where Windows Release builds (compiled as
/SUBSYSTEM:WINDOWS instead of /SUBSYSTEM:CONSOLE) can't have their
output redirected.
Basically, a console application creates a console if not given one, so
you get a console window behind OpenMW while it's running. It was
decided that this was ugly, so we set Release builds to be windows
applications, which don't get an automatic console and don't
automatically connect to a console if given one anyway.
Of course, we still wanted to actually be able to print to a console if
given one, so we manually attach to the parent process' console if it
exists, then reopen the standard streams connected to CON, the Windows
pseudo-file representing the current console.
This is a little like connecting a second wire into a dumb terminal in
that you're pumping characters into the display rather than onto a
pipeline, so output can't be redirected.
It turns out, though, that if a /SUBSYSTEM:WINDOWS application has its
standard streams redirected by the calling process, it still gets its
handles as normal, so everything starts off connected just how we want
it and we were clobbering this good setup with the straight-to-console
fix.
All we need to do to fix that is check if we've got valid standard
handles and that they go somewhere useful, and if so, avoid reopening
them once the console is attached. Simples.