1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:59:56 +00:00
Commit graph

17 commits

Author SHA1 Message Date
AnyOldName3
28131fd62b Fixes for a whole bunch of warnings
These warnings were always enabled, but we didn't see them due to https://gitlab.com/OpenMW/openmw/-/issues/7882.
I do not fully understand the cause of 7822 as I can't repro it in a minimal CMake project.

Some of these fixes are thought through.
Some are sensible best guesses.
Some are kind of a stab in the dark as I don't know whether there was a
possible bug the warning was telling me about that I've done nothing to
help by introducing a static_cast.

Nearly all of these warnings were about some kind of narrowing
conversion, so I'm not sure why they weren't firing with GCC and Clang,
which have -Wall -Wextra -pedantic set, which should imply -Wnarrowing,
and they can't have been affected by 7882.

There were also some warnings being triggered from Boost code.
The vast majority of library headers that do questionable things weren't
firing warnings off, but for some reason, /external:I wasn't putting
these Boost headers into external mode.

We need these warnings dealt with one way or another so we can switch
the default Windows CI from MSBuild (which doesn't do ccache) to Ninja
(which does).
I have the necessary magic for that on a branch, but the branch won't
build because of these warnings.
2024-03-14 23:39:33 +00:00
Andrei Kortunov
fc1f244627 Add missing initialization 2024-02-23 17:01:59 +04:00
Alexei Kotov
d9ee54ae98 DebugCustomDraw: Correct PerContextProgram use, clean up drawImplementation 2024-02-16 14:43:16 +03:00
Alexei Kotov
6a96cdaa31 Make DebugDrawer a Node 2024-02-09 22:16:46 +03:00
Alexei Kotov
9531b6983a Don't reallocate debug line primitives 2024-02-09 22:16:32 +03:00
Alexei Kotov
f9498e6ea4 Make DebugDrawer a LightManager child, don't use VAO for lines
Fixes terrain lighting but currently breaks non-line primitive rendering in exteriors
2024-02-09 20:50:33 +03:00
Alexei Kotov
38ab09a52e Try to uncursify DebugDrawer scene representation 2024-02-09 20:49:40 +03:00
Andrei Kortunov
35561450f1 Do not copy osg::ref_ptr when possible 2023-07-31 20:43:46 +04:00
Cody Glassman
ac4787aeec shade refactor 2023-02-25 11:03:39 -08:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
florent.teppe
943198e325 Small changes 2022-09-14 13:20:35 +02:00
florent.teppe
e811f7ed00 Simplified the data structures.
DebugCustomDraw owns the vector of drawcalls and the line geometry.
There are two DebugCustomDraw, so anything they own is double buffered.
Because DebugDrawer has a ref_ptr on the DebugCustomDraw, they live at least as long as DebugDrawer, making memory access from it safe.

removed redundent this
2022-09-13 18:26:33 +02:00
florent.teppe
565a08b95a crashfix on game exit 2022-09-12 19:13:02 +02:00
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
2022-09-11 17:54:01 +02:00
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
2022-09-11 17:53:59 +02:00
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
2022-09-11 17:53:56 +02:00
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
2022-09-11 17:53:53 +02:00
Renamed from apps/openmw/mwrender/debugdraw.cpp (Browse further)