Commit Graph

115 Commits (5d37cb3b74b1e47fef78fdabaedb791091018dc6)

Author SHA1 Message Date
psi29a 435eacdaad Merge branch 'debug_draw_commands' into 'master'
API to draw primitives

See merge request OpenMW/openmw!2345
2 years ago
florent.teppe 43b0ae1ce7 all debug renders now use the same shader and it works
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
2 years ago
florent.teppe 21971c08ba debug draw shader uses the generic functions
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
2 years ago
florent.teppe bd1bbc0ab8 removes mutex, and uses double buffering to avoid writing on a resource that will be read by the draw thread
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
2 years ago
florent.teppe 2a980ecb50 cleaned some code and fixed some naming issues
Moved debug draw to components, fixed some whitespace issues, added include guard

fixed uniform name, removed old files

Fixes some more whitespace weirdness
2 years ago
Project579 a60cebd0f9 Use std::u8string_view in debug logger overloads parameters. 2 years ago
Project579 5456ef1d50 Add new functions and overloads to support std::u8string and std::filesystem::path. 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 78ab009d5c Add required overloads to logger for handling unicode paths, also add conversion functions from std::filesystem::path to std::string without losing unicode data. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
Project579 4bb07282c9 Replace all remaining occurrences of boost::filesystem with std::filesystem. 2 years ago
elsid d2ed62ec3a
Allow to disable crash catcher on Windows 3 years ago
Mads Buvik Sandvei b0e4c7e76a [Postprocessing] Stereo integration 3 years ago
ζeh Matt e185d186bf
Move Log implementation to cpp, remove expensive mutex include in hpp 3 years ago
ζeh Matt 14bf9af056
Move implementation details of debugging.hpp to cpp, reduce includes 3 years ago
AnyOldName3 e24a85419a Merge branch 'master' into 'master'
When building Win32 (VS 2019), there are problems in line 45.

See merge request OpenMW/openmw!1953
3 years ago
jvoisin 4e4debb1cb Remove even more of boost::filesystem 3 years ago
Petr Mikheev cf49b46d64 Show logs in the debug window
Some part of UI code is written by @andrew-app
3 years ago
ShadIK02 9649bfc4cb When building Win32 (VS 2019), there are problems in line 45.
This change solves the problem.

Special thanks to AnyOldName3 for the hint :)
3 years ago
elsid 0dcb1f5aac
Fix build on Windows
Use wrapper header over Windows.h to undefine far and near in a single place.
3 years ago
elsid e777e35414
Use system_clock for time in logs
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.
3 years ago
elsid 2d5ccc804b
Exchange binary messages between navmeshtool and launcher 3 years ago
Petr Mikheev dd5ba5c57b Redirect log only after parsing configuration 3 years ago
psi29a b6718ecb10 Merge branch 'log_lock' into 'master'
Acquire log lock only when logger should log

See merge request OpenMW/openmw!1363
3 years ago
elsid e0c4f08aa5
Remove redundant includes 3 years ago
elsid 727f784a98
Acquire log lock only when logger should log
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.
3 years ago
Thunderforge 339d347aea Fixing performance-faster-string-find issues
This addresses the Clang Tidy check [performance-faster-string-find](https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html).
4 years ago
fredzio 4058e117ca Don't clobber game log file when we collect a stack trace.
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.
4 years ago
AnyOldName3 9466d6a409 Hide macro usage from Macs where it isn't defined 4 years ago
AnyOldName3 5e004356a2 Merge remote-tracking branch 'upstream/master' into alpha-meddling 4 years ago
AnyOldName3 7e045cff75 #include <memory> 4 years ago
AnyOldName3 0e4e8eb0f3 Add glDebugGroup support 4 years ago
CedricMocquillon 112437cf28 Change crash file to dmp on window to avoid renaming it 4 years ago
CedricMocquillon 73afc55462 Fork the current process to monitor exe, generate minidump on crash 4 years ago
Petr Mikheev 49c6e50c31 Print '--version' and '--help' messages without timestamps 4 years ago
Petr Mikheev 5734551ff3 Add time to logs. Redirect OSG log to OpenMW log. 4 years ago
AnyOldName3 89d73c5fc7 Only reroute stdout etc. to new console if not already redirected
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.
4 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
AnyOldName3 390fb4f12e Disable OpenGL Debug stuff when SDL doesn't provide the necessary definitions 4 years ago
AnyOldName3 3f61ff3a44 Make OpenGL debugging optional 4 years ago
AnyOldName3 441c09578a Merge remote-tracking branch 'origin/khr_debug' into khr_debug 4 years ago
Andrei Kortunov 2e7712a390 Fix C5204 warnings by adding default virtual destructors 5 years ago
elsid 29f262e514
Fix crash on destructed stream usage 5 years ago
Andrei Kortunov 14b756a692 Use a generic logging system for RecastNavigation 6 years ago
AnyOldName3 6de1deeb2d Include gldebug attribution and licence 6 years ago
AnyOldName3 e147f6fed9 Finsih gldebug move completely this time 6 years ago
AnyOldName3 ac18983f37 Finish gldebug location move 6 years ago
AnyOldName3 d42c976852 Add detailed OpenGL debug messages 6 years ago
AnyOldName3 aaa3eedf99 Move gldebug from components/misc to components/debug 6 years ago
Stanislaw Halik c5c160870d fix accidental header namespace inclusion 6 years ago
Stanislaw Halik f6c8842457 move to debugging.[ch]pp 6 years ago
Stanislaw Halik 74955555b9 remove verbose comments and example 6 years ago
Stanislaw Halik 56d79bd4e0 fix typo 6 years ago
Stanislaw Halik 44e60b708b fix missing _WIN32 guard 6 years ago
Stanislaw Halik 64e960aa22 enable win32 debug console when launching from console 6 years ago
AnyOldName3 a6d3210a9c Include missing Windows header before calling Windows-specific functions 6 years ago
AnyOldName3 90986df81c Allow OSG objects to be sent to the debug log. 6 years ago
Andrei Kortunov b5df385111 Allow apps without logging system to display log messages 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
Andrei Kortunov e5a81b1f99 Fix some issues, found by Coverity Scan 6 years ago
Andrei Kortunov 5693ceca74 Remove redundant declaration 6 years ago
Andrei Kortunov 1452684d9e Use new logging system for components 6 years ago
Andrei Kortunov 9a5b016293 Move crashcatcher initialization to components 6 years ago
Andrei Kortunov 5e172ed831 Move cerr initialization out of 'try' block 6 years ago
Andrei Kortunov 7d6e3673e0 Implement advanced logging system (feature #4581) 6 years ago