Page MenuHomeWildfire Games

Split the rendering WaterManager in a graphics/ and a renderer/ part.
Needs ReviewPublic

Authored by wraitii on Feb 10 2021, 5:41 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Trac Tickets
#2692
Summary

This splits the WaterManager class, used for water rendering, in a graphics/ component that holds the water settings, renderer/WaterRData and the renderer itself.
CWater is now held by the World, since that seems to make sense.

The goal is to make the rendering-bits (i.e. OpenGL) more independent from graphics stuff, and thus easier to change.

Refs #2692 for the in-game actor editor.

Test Plan

Compile, agree.

Event Timeline

wraitii created this revision.Feb 10 2021, 5:41 PM
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Feb 10 2021, 5:41 PM

Build failure - The Moirai have given mortals hearts that can endure.

Debug: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

    10>e:\jenkins\workspace\vs2015-differential\libraries\source\spidermonkey\include-win32-debug\js\sweepingapi.h(38): warning C4100: 'needs': unreferenced formal parameter (compiling source file ..\..\..\source\simulation2\components\CCmpAIManager.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\simulation2.vcxproj]
    14>e:\jenkins\workspace\vs2015-differential\source\renderer\patchrdata.cpp(1252): warning C4189: 'mapSize': local variable is initialized but not referenced [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\graphics.vcxproj]
     4>MSVCRTD.lib(initializers.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\pyrogenesis.vcxproj]
    22>e:\jenkins\workspace\vs2015-differential\libraries\source\spidermonkey\include-win32-debug\js\sweepingapi.h(38): warning C4100: 'needs': unreferenced formal parameter [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    22>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_pathfinder.h(150): error C2660: 'CMapReader::LoadMap': function does not take 15 arguments (compiling source file ..\..\..\source\simulation2\components\tests\test_Pathfinder.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    22>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_pathfinder.h(261): error C2660: 'CMapReader::LoadMap': function does not take 15 arguments (compiling source file ..\..\..\source\simulation2\components\tests\test_Pathfinder.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    22>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_pathfinder.h(318): error C2660: 'CMapReader::LoadMap': function does not take 15 arguments (compiling source file ..\..\..\source\simulation2\components\tests\test_Pathfinder.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    22>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_position.h(70): error C2259: 'MockTerrain': cannot instantiate abstract class (compiling source file ..\..\..\source\simulation2\components\tests\test_Position.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    22>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_position.h(142): error C2259: 'MockTerrain': cannot instantiate abstract class (compiling source file ..\..\..\source\simulation2\components\tests\test_Position.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    22>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_position.h(215): error C2259: 'MockTerrain': cannot instantiate abstract class (compiling source file ..\..\..\source\simulation2\components\tests\test_Position.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    22>e:\jenkins\workspace\vs2015-differential\source\simulation2\tests\test_serializer.h(895): error C2660: 'CMapReader::LoadMap': function does not take 15 arguments (compiling source file ..\..\..\source\simulation2\tests\test_Serializer.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/4308/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_dbg.a(precompiled.o) has no symbols
../../../source/renderer/PatchRData.cpp:1252:10: warning: unused variable 'mapSize' [-Wunused-variable]
        ssize_t mapSize = terrain->GetVerticesPerSide();
                ^
1 warning generated.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/CoreVideo.tbd and library file /System/Library/Frameworks//CoreVideo.framework/CoreVideo are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Cocoa.framework/Cocoa.tbd and library file /System/Library/Frameworks//Cocoa.framework/Cocoa are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//IOKit.framework/IOKit.tbd and library file /System/Library/Frameworks//IOKit.framework/IOKit are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//QuartzCore.framework/QuartzCore.tbd and library file /System/Library/Frameworks//QuartzCore.framework/QuartzCore are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Metal.framework/Metal.tbd and library file /System/Library/Frameworks//Metal.framework/Metal are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//OpenGL.framework/OpenGL.tbd and library file /System/Library/Frameworks//OpenGL.framework/OpenGL are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//OpenAL.framework/OpenAL.tbd and library file /System/Library/Frameworks//OpenAL.framework/OpenAL are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ApplicationServices.framework/ApplicationServices.tbd and library file /System/Library/Frameworks//ApplicationServices.framework/ApplicationServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Cocoa.framework/Cocoa.tbd and library file /System/Library/Frameworks//Cocoa.framework/Cocoa are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AppKit.framework/Versions/C/AppKit.tbd and library file /System/Library/Frameworks//AppKit.framework/Versions/C/AppKit are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreData.framework/Versions/A/CoreData.tbd and library file /System/Library/Frameworks//CoreData.framework/Versions/A/CoreData are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.tbd and library file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.tbd and library file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreGraphics.framework/Versions/A/CoreGraphics.tbd and library file /System/Library/Frameworks//CoreGraphics.framework/Versions/A/CoreGraphics are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreText.framework/Versions/A/CoreText.tbd and library file /System/Library/Frameworks//CoreText.framework/Versions/A/CoreText are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ImageIO.framework/Versions/A/ImageIO.tbd and library file /System/Library/Frameworks//ImageIO.framework/Versions/A/ImageIO are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ColorSync.framework/Versions/A/ColorSync.tbd and library file /System/Library/Frameworks//ColorSync.framework/Versions/A/ColorSync are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreServices.framework/Versions/A/CoreServices.tbd and library file /System/Library/Frameworks//CoreServices.framework/Versions/A/CoreServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreImage.framework/Versions/A/CoreImage.tbd and library file /System/Library/Frameworks//CoreImage.framework/Versions/A/CoreImage are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation.tbd and library file /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Foundation.framework/Versions/C/Foundation.tbd and library file /System/Library/Frameworks//Foundation.framework/Versions/C/Foundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork.tbd and library file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList are out of sync. Falling back to library file for linking.
ld: warning: object file (../../../libraries/osx/fmt/lib/libfmt.a(format.cc.o)) was built for newer OSX version (10.13) than being linked (10.12)
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
In file included from ../../../source/pch/test/precompiled.h:22:
../../../source/simulation2/system/ComponentTest.h:245:15: warning: 'MockTerrain::ReloadTerrain' hides overloaded virtual function [-Woverloaded-virtual]
        virtual void ReloadTerrain(bool UNUSED(ReloadWater))
                     ^
../../../source/simulation2/components/ICmpTerrain.h:67:15: note: hidden overloaded virtual function 'ICmpTerrain::ReloadTerrain' declared here: different number of parameters (0 vs 1)
        virtual void ReloadTerrain() = 0;
                     ^
1 warning generated.
In file included from ../../../source/simulation2/components/tests/test_Pathfinder.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/components/tests/test_Pathfinder.h:153:38: error: too many arguments to function call, expected 14, have 15
                        &sim2, &sim2.GetSimContext(), -1, false);
                                                          ^~~~~
../../../source/graphics/MapReader.h:56:2: note: 'LoadMap' declared here
        void LoadMap(const VfsPath& pathname, const ScriptContext& cx, JS::HandleValue settings, CTerrain*, SkyManager*, CLightEnv*, CGameView*,
        ^
In file included from ../../../source/simulation2/components/tests/test_Pathfinder.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/components/tests/test_Pathfinder.h:264:38: error: too many arguments to function call, expected 14, have 15
                        &sim2, &sim2.GetSimContext(), -1, false);
                                                          ^~~~~
../../../source/graphics/MapReader.h:56:2: note: 'LoadMap' declared here
        void LoadMap(const VfsPath& pathname, const ScriptContext& cx, JS::HandleValue settings, CTerrain*, SkyManager*, CLightEnv*, CGameView*,
        ^
In file included from ../../../source/simulation2/components/tests/test_Pathfinder.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/components/tests/test_Pathfinder.h:321:38: error: too many arguments to function call, expected 14, have 15
                        &sim2, &sim2.GetSimContext(), -1, false);
                                                          ^~~~~
../../../source/graphics/MapReader.h:56:2: note: 'LoadMap' declared here
        void LoadMap(const VfsPath& pathname, const ScriptContext& cx, JS::HandleValue settings, CTerrain*, SkyManager*, CLightEnv*, CGameView*,
        ^
In file included from ../../../source/simulation2/components/tests/test_Position.cpp:16:
/Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/components/tests/test_Position.h:70:15: error: variable type 'MockTerrain' is an abstract class
                MockTerrain terrain;
                            ^
/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../source/simulation2/components/ICmpTerrain.h:67:15: note: unimplemented pure virtual method 'ReloadTerrain' in 'MockTerrain'
        virtual void ReloadTerrain() = 0;
                     ^
In file included from ../../../source/simulation2/components/tests/test_Position.cpp:16:
/Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/components/tests/test_Position.h:142:15: error: variable type 'MockTerrain' is an abstract class
                MockTerrain terrain;
                            ^
/Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/components/tests/test_Position.h:215:15: error: variable type 'MockTerrain' is an abstract class
                MockTerrain terrain;
                            ^
3 errors generated.
make[1]: *** [obj/test_Debug/test_Pathfinder.o] Error 1
make[1]: *** Waiting for unfinished jobs....
3 errors generated.
make[1]: *** [obj/test_Debug/test_Position.o] Error 1
make: *** [test] Error 2

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/3208/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-gcc7.txt
../../../source/graphics/GameView.cpp:91:15: error: declaration of 'WaterManager CGameViewImpl::WaterManager' [-fpermissive]
  WaterManager WaterManager;
               ^~~~~~~~~~~~
In file included from ../../../source/graphics/GameView.cpp:38:
../../../source/graphics/WaterManager.h:26:7: error: changes meaning of 'WaterManager' from 'class WaterManager' [-fpermissive]
 class WaterManager
       ^~~~~~~~~~~~
make[1]: *** [graphics.make:250: obj/graphics_Debug/GameView.o] Error 1
make: *** [Makefile:125: graphics] Error 2

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/4866/display/redirect

wraitii requested review of this revision.Feb 10 2021, 7:24 PM
wraitii updated this revision to Diff 17321.May 1 2021, 4:58 PM

Rebase. Tested atlas, actor editor, in game, saved game, deserializaing, rejoin test. Starting different maps.
Seems to work fine.

I'll merge this soon-ish, it's kinda annoying to rebase and even if there is still some work left, we probably want a split of some kind to happen at some point.

wraitii edited the summary of this revision. (Show Details)May 1 2021, 5:00 PM
wraitii updated the Trac tickets for this revision.
Vulcan added a comment.May 1 2021, 5:01 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/4110/display/redirect

Vulcan added a comment.May 1 2021, 5:07 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/5819/display/redirect

Might make more sense in World to me. I'd like to have @vladislavbelov's opinion on it.

source/graphics/WaterManager.cpp
70 ↗(On Diff #17321)

SAFE ARRAY DELETE ?

113 ↗(On Diff #17321)

UNUSED?

197 ↗(On Diff #17321)

we → We

source/graphics/WaterManager.h
21–22 ↗(On Diff #17321)

Forward declare CVector3D?

81 ↗(On Diff #17321)

could be std::vector / std::array?

source/renderer/WaterRendering.h
37 ↗(On Diff #17321)

Missing <vector>

I don't see a point in the separation as a Manager. Your implementation contains data needed only for rendering (it doesn't manage something and doing such calculations on CPU in case someone wants changeable terrain is very expensive in comparison to GPU) and a small state that might be stored in CmpWaterManager. I'd suggest to use CmpWaterManager (I'm not even sure that we need the Manager suffix for Cmp as well) for the core state, Water (without Manager) for visual properties and WaterRenderer for rendering (like for Terrain).

source/renderer/WaterRendering.h
1 ↗(On Diff #17321)

We use *Renderer names, not *Rendering.

18–20 ↗(On Diff #17321)

Useless comment here, should be in the description.

wraitii updated this revision to Diff 19559.Jan 29 2022, 8:08 PM

Rewrite.

This splits into CWater, which holds the water settings & water height for graphics, WaterRData, which holds the persistent water data for rendering (such as wind strength), and WaterManager only holds the rendering stuff.

I think there is still some cleanup to be had with the SceneRenderer / World / Graphics logic, but this seems neater overall.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/7291/display/redirect

wraitii edited the summary of this revision. (Show Details)Jan 29 2022, 8:09 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/5592/display/redirect

Stan added inline comments.Jan 29 2022, 10:45 PM
source/graphics/GameView.cpp
254

Maybe Could Be GetHeight since the previous call is water

source/graphics/Water.h
67

Not initialized?

76

Should it be CStrW?

source/ps/World.cpp
55

Could they be unique_ptr?

source/renderer/ModelRenderer.cpp
736

Any reason this isn't calling timer_time() directly?

source/renderer/SceneRenderer.cpp
884

Debug?

source/renderer/TerrainRenderer.cpp
497

Since those are not moddable, might be better to make it an enum class or maybe intern those strings

source/renderer/WaterManager.cpp
180

Anyreason those are arrays and not std::vector / std::array?

source/simulation2/components/CCmpWaterManager.cpp
102–103

Could early return earlier?

What's about WaterRenderer?

source/graphics/GameView.cpp
224–225

I believe it should be in RegMemFun, because it loads a bunch of textures inside.

254

Also const while at it.

source/graphics/Water.h
26

Swap with the empty line above.

48

Is the comment needed? CWater doesn't own the terrain, so it's not responsible for its dirtiness.

64

Why it's protected?

source/renderer/SceneRenderer.cpp
541

const.

source/renderer/TerrainRenderer.cpp
436

It's not good to reload textures in the middle of rendering, you might put it somewhere before LOS/Minimap textures drawing.

source/renderer/WaterManager.cpp
350

a isn't a standard name for loops.

source/renderer/WaterRData.cpp
28

Include order.

329

const.

source/simulation2/components/CCmpWaterManager.cpp
109–117

Do we need x and z? If yes in the future then it should be in CWater as well.

source/simulation2/system/SimContext.h
47–48

Calls above duplicate this method.

What's about WaterRenderer?

I intended to do the renaming in a separate diff, but TBH this maybe doesn't make the diff that much smaller.

source/graphics/Water.h
48

As of this diff, the terrain is actually responsible for the water data because it's in PatchRData, so we need to mark the terrain dirty when changing the water height.

In that light, the comment might have some use, but maybe I can make that more explicit.

I'm planning to look into remedying that situation as well.

64

I tend to just use protected over private as default. Makes no difference in this particular instance.

source/ps/World.cpp
55

They should actually, but I think I'll leave that cleanup for another diff.

source/renderer/ModelRenderer.cpp
736

Yes, the game can be paused.

source/renderer/WaterManager.cpp
180

Legacy code. Think I'll also leave that update for another diff.

source/simulation2/system/SimContext.h
47–48

Am aware, but again wanted to leave that cleanup for a separate diff.

wraitii updated this revision to Diff 19567.Jan 30 2022, 9:09 AM
wraitii marked 21 inline comments as done.

Address comments, rename WaterManager to WaterRenderer

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/CoreVideo.tbd and library file /System/Library/Frameworks//CoreVideo.framework/CoreVideo are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Cocoa.framework/Cocoa.tbd and library file /System/Library/Frameworks//Cocoa.framework/Cocoa are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//IOKit.framework/IOKit.tbd and library file /System/Library/Frameworks//IOKit.framework/IOKit are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//QuartzCore.framework/QuartzCore.tbd and library file /System/Library/Frameworks//QuartzCore.framework/QuartzCore are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Metal.framework/Metal.tbd and library file /System/Library/Frameworks//Metal.framework/Metal are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//OpenAL.framework/OpenAL.tbd and library file /System/Library/Frameworks//OpenAL.framework/OpenAL are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ApplicationServices.framework/ApplicationServices.tbd and library file /System/Library/Frameworks//ApplicationServices.framework/ApplicationServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Cocoa.framework/Cocoa.tbd and library file /System/Library/Frameworks//Cocoa.framework/Cocoa are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AppKit.framework/Versions/C/AppKit.tbd and library file /System/Library/Frameworks//AppKit.framework/Versions/C/AppKit are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreData.framework/Versions/A/CoreData.tbd and library file /System/Library/Frameworks//CoreData.framework/Versions/A/CoreData are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition.tbd and library file /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreGraphics.framework/Versions/A/CoreGraphics.tbd and library file /System/Library/Frameworks//CoreGraphics.framework/Versions/A/CoreGraphics are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreText.framework/Versions/A/CoreText.tbd and library file /System/Library/Frameworks//CoreText.framework/Versions/A/CoreText are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ImageIO.framework/Versions/A/ImageIO.tbd and library file /System/Library/Frameworks//ImageIO.framework/Versions/A/ImageIO are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ColorSync.framework/Versions/A/ColorSync.tbd and library file /System/Library/Frameworks//ColorSync.framework/Versions/A/ColorSync are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreServices.framework/Versions/A/CoreServices.tbd and library file /System/Library/Frameworks//CoreServices.framework/Versions/A/CoreServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreImage.framework/Versions/A/CoreImage.tbd and library file /System/Library/Frameworks//CoreImage.framework/Versions/A/CoreImage are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation.tbd and library file /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Foundation.framework/Versions/C/Foundation.tbd and library file /System/Library/Frameworks//Foundation.framework/Versions/C/Foundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork.tbd and library file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList are out of sync. Falling back to library file for linking.
ld: warning: object file (../../../libraries/osx/fmt/lib/libfmt.a(format.cc.o)) was built for newer OSX version (10.13) than being linked (10.12)
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
In file included from ../../../source/graphics/tests/test_LOSTexture.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/graphics/tests/test_LOSTexture.h:31:16: error: no matching constructor for initialization of 'CSimulation2'
                CSimulation2 sim(NULL, g_ScriptContext, NULL);
                             ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../source/simulation2/Simulation2.h:50:2: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
        CSimulation2(std::shared_ptr<ScriptContext> cx, CWorld* world);
        ^
../../../source/simulation2/Simulation2.h:47:14: note: candidate constructor not viable: requires 1 argument, but 3 were provided
        NONCOPYABLE(CSimulation2);
                    ^
In file included from ../../../source/graphics/tests/test_LOSTexture.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/graphics/tests/test_LOSTexture.h:70:16: error: no matching constructor for initialization of 'CSimulation2'
                CSimulation2 sim(NULL, g_ScriptContext, NULL);
                             ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../source/simulation2/Simulation2.h:50:2: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
        CSimulation2(std::shared_ptr<ScriptContext> cx, CWorld* world);
        ^
../../../source/simulation2/Simulation2.h:47:14: note: candidate constructor not viable: requires 1 argument, but 3 were provided
        NONCOPYABLE(CSimulation2);
                    ^
2 errors generated.
make[1]: *** [obj/test_Debug/test_LOSTexture.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [test] Error 2

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/5600/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Debug:
    23>e:\jenkins\workspace\vs2015-differential\source\graphics\tests\test_lostexture.h(31): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\graphics\tests\test_LOSTexture.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\graphics\tests\test_lostexture.h(70): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\graphics\tests\test_LOSTexture.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_pathfinder.h(140): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\components\tests\test_Pathfinder.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_pathfinder.h(199): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\components\tests\test_Pathfinder.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_pathfinder.h(254): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\components\tests\test_Pathfinder.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_pathfinder.h(311): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\components\tests\test_Pathfinder.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\components\tests\test_position.h(142): error C2065: 'IID_WaterRenderer': undeclared identifier (compiling source file ..\..\..\source\simulation2\components\tests\test_Position.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\tests\test_cmptemplatemanager.h(243): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\tests\test_CmpTemplateManager.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\tests\test_simulation2.h(60): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\tests\test_Simulation2.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\tests\test_simulation2.h(80): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\tests\test_Simulation2.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\tests\test_simulation2.h(136): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\tests\test_Simulation2.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]
    23>e:\jenkins\workspace\vs2015-differential\source\simulation2\tests\test_serializer.h(890): error C2661: 'CSimulation2::CSimulation2': no overloaded function takes 3 arguments (compiling source file ..\..\..\source\simulation2\tests\test_Serializer.cpp) [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/6693/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-gcc7.txt
In file included from ../../../source/graphics/tests/test_LOSTexture.cpp:17:
/zpool0/gcc7/source/graphics/tests/test_LOSTexture.h: In member function 'void TestLOSTexture::test_basic()':
/zpool0/gcc7/source/graphics/tests/test_LOSTexture.h:31:47: error: no matching function for call to 'CSimulation2::CSimulation2(NULL, std::shared_ptr<ScriptContext>&, NULL)'
   CSimulation2 sim(NULL, g_ScriptContext, NULL);
                                               ^
In file included from /zpool0/gcc7/source/graphics/tests/test_LOSTexture.h:23,
                 from ../../../source/graphics/tests/test_LOSTexture.cpp:17:
../../../source/simulation2/Simulation2.h:50:2: note: candidate: 'CSimulation2::CSimulation2(std::shared_ptr<ScriptContext>, CWorld*)'
  CSimulation2(std::shared_ptr<ScriptContext> cx, CWorld* world);
  ^~~~~~~~~~~~
../../../source/simulation2/Simulation2.h:50:2: note:   candidate expects 2 arguments, 3 provided
In file included from ../../../source/graphics/tests/test_LOSTexture.cpp:17:
/zpool0/gcc7/source/graphics/tests/test_LOSTexture.h: In member function 'void TestLOSTexture::test_perf_DISABLED()':
/zpool0/gcc7/source/graphics/tests/test_LOSTexture.h:70:47: error: no matching function for call to 'CSimulation2::CSimulation2(NULL, std::shared_ptr<ScriptContext>&, NULL)'
   CSimulation2 sim(NULL, g_ScriptContext, NULL);
                                               ^
In file included from /zpool0/gcc7/source/graphics/tests/test_LOSTexture.h:23,
                 from ../../../source/graphics/tests/test_LOSTexture.cpp:17:
../../../source/simulation2/Simulation2.h:50:2: note: candidate: 'CSimulation2::CSimulation2(std::shared_ptr<ScriptContext>, CWorld*)'
  CSimulation2(std::shared_ptr<ScriptContext> cx, CWorld* world);
  ^~~~~~~~~~~~
../../../source/simulation2/Simulation2.h:50:2: note:   candidate expects 2 arguments, 3 provided
make[1]: *** [test.make:432: obj/test_Debug/test_LOSTexture.o] Error 1
make: *** [Makefile:205: test] Error 2

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/7299/display/redirect

source/graphics/Water.h
64

It doesn't seem reasonable, protected means you plan to add inheritance.

source/renderer/WaterRData.cpp
642

const.

source/renderer/WaterRenderer.h
61

Technically speaking textures can not be resized. And textures inside ResizeRenderingTextures a bit different from textures created in CreateRenderingTextures. Maybe something like RecreateScreenSizeRenderingTextures()?

wraitii added inline comments.Jan 30 2022, 10:53 AM
source/renderer/TerrainRenderer.cpp
497

Will do in cleanup diff I think

source/renderer/WaterRenderer.h
61

True, to be honest I think I might want to change the code to resize the reflection/refraction textures (if you switch from/top fullscreen, the quality can noticeably decrease).

source/simulation2/components/CCmpWaterManager.cpp
102–103

meh