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 and related data, and a renderer/ component that holds textures and stuff like that.
The WaterManager is now held by the GameView, since that seems to make sense.
The renderer itself is mostly holding stuff used by the terrain renderer, and there's some more refactoring opportunities in there for sure.

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

SAFE ARRAY DELETE ?

113

UNUSED?

197

we → We

source/graphics/WaterManager.h
21–22

Forward declare CVector3D?

81

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

source/renderer/WaterRendering.h
37

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

We use *Renderer names, not *Rendering.

18–20

Useless comment here, should be in the description.