1
0
forked from 0ad/0ad
Commit Graph

8427 Commits

Author SHA1 Message Date
ecab4595c3 Merges a duplication of CColor tests files introduced in 2c14d94559.
This was SVN commit r27133.
2022-10-07 23:19:12 +00:00
ca427529c0 Fixes include guards of CDeviceCommandContext headers.
This was SVN commit r27132.
2022-10-07 23:02:15 +00:00
4079818187 Fixes CGradientTexture backend name.
This was SVN commit r27131.
2022-10-07 22:55:30 +00:00
61019c0e91 Removes unused minimap shader variants.
This was SVN commit r27130.
2022-10-07 22:52:23 +00:00
ef9057239a Fix notes in 0a4ba039b4
This was SVN commit r27129.
2022-10-07 12:39:23 +00:00
0a4ba039b4 Update ifdef condition for MCST-LCC compiler (E2K)
Patch by: @r-a-sattarov
Differential Revision: https://code.wildfiregames.com/D4795
This was SVN commit r27128.
2022-10-07 07:44:40 +00:00
4d77de66d4 Removes GUI dependency from Canvas2D.
Initially the GetDefaultGuiMatrix function was added in 4113aa0a36 and
renamed in 04c63a4093.

This was SVN commit r27111.
2022-10-04 20:25:39 +00:00
adc6447b7b Fixes vertex attribute stride in Canvas2D.
This was SVN commit r27110.
2022-10-04 19:38:40 +00:00
75518d0e15 Removes drawing via IDeviceCommandContext from CMinimap.
Comments By: phosit
Differential Revision: https://code.wildfiregames.com/D4779
This was SVN commit r27109.
2022-10-04 19:32:42 +00:00
bd7b9b884a Fixes out of bounds on each match start in Profiler2 introduced in 3cbe96d24c. Refs #6620
Differential Revision: https://code.wildfiregames.com/D4787
This was SVN commit r27108.
2022-10-04 19:28:21 +00:00
296daea4ba Cleanups CShaderParams::SItems comparisons.
Patch By: phosit
Differential Revision: https://code.wildfiregames.com/D4689
This was SVN commit r27107.
2022-10-04 19:13:44 +00:00
6ca43f056d Adds PS::span and std::string_view to CmdLineArgs.
Patch By: phosit
Differential Revision: https://code.wildfiregames.com/D4677
This was SVN commit r27106.
2022-10-04 19:08:39 +00:00
f68528777f Bump version to alpha 27.
Last alpha 26 commit was [[SVN:27104]]

Accepted by: @asterix, @vladislavbelov
Discussed with: @Freagarach, @wraitii, @implodedok, @Itms

Refs: #6625

Differential Revision: https://code.wildfiregames.com/D4789
This was SVN commit r27105.
2022-10-04 17:05:11 +00:00
a72fa8f7c7 Remove code for the lobby bots from SVN
This removes the code for the lobby bots from SVN to avoid confusion as
the code is now hosted on Github at https://github.com/0ad/lobby-bots.

Differential Revision: https://code.wildfiregames.com/D4155
This was SVN commit r27094.
2022-09-11 13:21:41 +00:00
7f5e664eec Remove code for the lobby bots from SVN
This removes the code for the lobby bots from SVN to avoid confusion as
the code is now hosted on Github at https://github.com/0ad/lobby-bots.

Differential Revision: https://code.wildfiregames.com/D4155
This was SVN commit r27093.
2022-09-11 13:14:20 +00:00
6109fd3ee0 Fix the check translation script failing.
This was SVN commit r27091.
2022-09-10 17:16:32 +00:00
f616327f2d Revert 10554eb5b1 as it prevents building on FreeBSD.
This was SVN commit r27081.
2022-09-01 20:39:46 +00:00
6be7bd0677 Fixes space correction after f4128208de.
Tested By: phosit
Differential Revision: https://code.wildfiregames.com/D4774
This was SVN commit r27077.
2022-08-30 17:46:33 +00:00
2ee13983a1 Minor fixes for NSIS - Windows distribution script, HTTP > HTTPS.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D4756
This was SVN commit r27073.
2022-08-26 16:01:57 +00:00
d286080285 Fixes the default number of workers in TaskManager in case of zero hardware_concurrency.
Differential Revision: https://code.wildfiregames.com/D4768
This was SVN commit r27064.
2022-08-20 20:40:05 +00:00
2285d84d3d Fix warning reported by the NOPCH automatic CI.
This was SVN commit r27063.
2022-08-20 12:25:19 +00:00
e947dcb23c Fix ab16e60afa
Reported by: @Langbart
Accepted by: @Vladislavbelov
Tested by: @Langbart
Fixes: #6603
Differential Revision: https://code.wildfiregames.com/D4765
This was SVN commit r27058.
2022-08-16 14:57:28 +00:00
ab16e60afa Fix previous commit.
This was SVN commit r27056.
2022-08-14 18:22:48 +00:00
c9dc8676a6 Fix mod installation in non latin folders. Use OSString for consistency.
Refs e7ab22286e
Refs 880a797ce0
Refs 404e1a9a4a
Refs 52baaa4bbd

This was SVN commit r27055.
2022-08-14 17:55:08 +00:00
880a797ce0 Fix replay cache creation in non latin folders.
IRC:
https://irclogs.wildfiregames.com/%230ad-dev/2022-08-14-QuakeNet-%230ad-dev.log
Reported by: @AirXonix2
Thread:
https://wildfiregames.com/forum/topic/89261-a-new-series-of-bugs/#comment-514734
Discussed with: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4763
This was SVN commit r27054.
2022-08-14 17:23:50 +00:00
95106b2d9b Fixes crash in Atlas when switching from the Actor viewer. Fixes #6524
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4732
This was SVN commit r27041.
2022-08-10 17:17:24 +00:00
759aa333a5 Add a function to handle custom phase techs, so they do not show as unused.
Fix autostart files being marked as unused.
Fix an issue with the researcher component. Patch by: @marder
Refs https://code.wildfiregames.com/D4750
Refs #6587
Fixes ca82935dfc

This was SVN commit r27033.
2022-08-06 15:06:03 +00:00
fb94d8aa59 Fix writing mod.json on Windows in non Latin user folders.
Accepted by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4741
This was SVN commit r27031.
2022-08-05 17:55:49 +00:00
9d2275e26b Fix assertion when trying to draw a line with one point. This would trigger an ensure if one enabled the unitmotion overlay.
Patch by: @vladislavbelov
This was SVN commit r27016.
2022-07-25 20:08:03 +00:00
ca82935dfc Add techs and auras to the list of possibly missing files.
Refs: #6544
Accepted by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4725
This was SVN commit r26991.
2022-06-27 14:31:16 +00:00
ec723428d1 Logic fix for very high shadows on very large screens.
ON large screens like 5120x1440 calculated shadow map was 32768. That
was 16x more than high setting, 32x more than medium setting and 64x
more than low setting.

After this change shadow map sizes using very high setting by resolution
will be following:
1920x1080 - 4096
2560x1440 - 4096
3840x1440 - 4096
5120x1440 - 8192
3840x2160 - 4096
7680x4320 - 8192
Patch by: @karmux
Reviewed by: @vladislavbelov, @Stan
Differential Revision: https://code.wildfiregames.com/D4723
This was SVN commit r26983.
2022-06-23 17:04:13 +00:00
833f8d0e79 Bump the max amount of instanced icons to 256 to account for Egypt 3v3 as suggested by @vladislavbelov.
192 worked as well but the error spam isn't really nice going above 256
is madness anyway.
Reported by: @Langbart
Fixes: #6578

This was SVN commit r26969.
2022-06-20 07:12:43 +00:00
8ee8e63bcc Fixes same sequenced frames for LOS smooth textures. Fixes #6569
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4700
This was SVN commit r26950.
2022-06-17 19:42:48 +00:00
28e46ba765 Groups close minimap icons by path and color to decrease their visible count.
Comments By: phosit, Stan
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4702
This was SVN commit r26949.
2022-06-17 19:40:50 +00:00
274fe129a1 Change deprecated binary_negate<> to not_fn<>
Deprecated in C++17

Patch by: jprahman
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D4693
This was SVN commit r26939.
2022-06-12 08:45:39 +00:00
9845a99f77 Adds EGL support for Wayland.
Tested By: Freagarach, Mentula, phosit
Differential Revision: https://code.wildfiregames.com/D4642
This was SVN commit r26929.
2022-06-09 21:09:32 +00:00
8b57e0eeba Fix build without precompiled headers. Fixes f4128208de
This was SVN commit r26925.
2022-06-06 21:48:07 +00:00
12dfe2ce55 Use CVector2D instead of float arrays for TexturedLineRData
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4688
This was SVN commit r26924.
2022-06-06 21:46:37 +00:00
24140bf620 Fixes crash in LOSTexture because of incorrect nullptr check introduced in 648e68e49c.
This was SVN commit r26923.
2022-06-06 21:21:52 +00:00
ffe4ea24ab Fixes LOS flickering because of float precision. Fixes #6546
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4684
This was SVN commit r26922.
2022-06-06 20:48:18 +00:00
b0c29b8676 Removes GL types from regular renderer code after 3ed4eaf247.
This was SVN commit r26920.
2022-06-06 07:30:45 +00:00
54aae3e6d4 Moves anisotropic filtering support check from GL texture to TextureManager to make it explicit.
This was SVN commit r26919.
2022-06-06 06:59:20 +00:00
aaa95dc00b Minor cleanup in Future and TaskManager
- Remove redundant std::move() calls
- default ctor/dtor in place of empty {}

Patch by: jprahman
Comments by; phosit

Accepted by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4675
This was SVN commit r26916.
2022-06-02 12:59:25 +00:00
f4128208de Fix text alignment handling of spaces around wrapping.
Follows f8d2927748.

There is an issue with text-wrapping and word separators (aka spaces).
Because 0 A.D. collates the space after a word to the same TextCall, we
occasionally need to ignore it when considering line-wrapping, because
we don't want empty spaces on the right-side of right-aligned text.
However, the logic to handle this is currently broken and inconsistent.

The method introduced here uses the SFeedback structure to properly
report it and generalises the checks.

Note that multiples spaces are not collapsed in 0 A.D., and for
consistency the word-separator-collapsing behaviour is ignored.

Comments by: phosit, vlasdislavbelov
Fixes #6551

Differential Revision: https://code.wildfiregames.com/D4662
This was SVN commit r26915.
2022-06-02 12:56:53 +00:00
b9adbbd8be Fix 557fa0312e by adding the js files to the list of dependencies. They were previously found under the gui folder.
Reported by: @Langbart
Fixes #6542

This was SVN commit r26909.
2022-05-28 17:01:42 +00:00
095838da0a Fixes A8 framebuffer format used for LOS interpolation and enables smooth LOS by default.
Tested By: Langbart, mastoras
Differential Revision: https://code.wildfiregames.com/D4654
This was SVN commit r26906.
2022-05-26 16:36:57 +00:00
68d73e1726 Fixes double shader program reloading after dddd599146.
This was SVN commit r26904.
2022-05-25 17:33:54 +00:00
53033ceaa2 Fixes rendering reflections and refractions in case of empty scissors.
This was SVN commit r26902.
2022-05-24 19:15:26 +00:00
a6f60afdc5 Adds instancing support to backend and enables it for minimap.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4650
This was SVN commit r26901.
2022-05-24 07:11:23 +00:00
bb
f8d2927748 Fix an infinite loop when trying to word-wrap
Comments By: Stan, Phosit, s0600204, Langbart, Silier, marder, vladislav
Reviewed By: wraitii
Differential Revision: D4530
fixes #6451

This was SVN commit r26889.
2022-05-17 12:10:56 +00:00
10554eb5b1 Fix RAM amount detection on BSD and macOS.
Tested by: @Mastoras
Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4651
This was SVN commit r26888.
2022-05-17 08:08:14 +00:00
08e7efc76a Allo native builds on Mac OS M1 / Apple Silicon
- Update GMP to a version that supports arm64 darwin
- Patch spidermonkey 78 to build and run on arm64 darwin
- Choose the correct architecture dynamically in build scripts
- Include python workaround that fixes python related errors on
spidermonkey build

Based on a patch by: kumikumi
Based on a patch by: Langbart
Fixes #6474

Differential Revision: https://code.wildfiregames.com/D4607
This was SVN commit r26881.
2022-05-15 06:45:53 +00:00
557fa0312e Fix non-visual autostart, as well as client/host autostart.
Follows 8eecc39e71.

Piping the autostart through a GUI page is easy but requires using the
GUI in non-visual mode, which is problematic since it's not initialized.
The GUI is not needed, only its ability to load scripts, so this diff
fixes the problem by adding an 'entrypoint' script in the new
`autostart` folder that gets called with this unique ability, setting
things up properly. The mod mod gets a placeholder.

Other changes:
- Fix some issues with networked autostart:
  - Players were not assigned slots.
  - The host didn't actually wait for other players.
- Move gamesettings from `gui/gamesettings/` to `gamesettings/`. This
moves attributes as well.
- Move autostart files from `gui/autostart/` to ` autostart/`. Note that
`gui/autostart/` still exists as it's used in the tutorial button from
the main menu.
- Rename the JSI_VFS functions to be explicitly about their function:
the ability to write and the potential restricted folders.
- Don't require `autostart` when using `--autostart-client` in
non-visual mode.

Starting the autostart client/host has poor UX in some situations, but
improving that feature is beyond the scope of this diff.

Suggestions for future work:
- Some files in gui/common should probably be moved elsewhere
- Template loading code is duplicated
- The gamesetup code still needs work for proper UI/logic separation.

Help & comments by: smiley

Reported by: vladislav / Langbart
Fixes #6513

Differential Revision: https://code.wildfiregames.com/D4628
This was SVN commit r26879.
2022-05-15 06:34:17 +00:00
ed4e07e594 Allow setting the passability class depending on formation members.
Improves pathfinding for the general case (no large entities in a
formation).

Differential revision: https://code.wildfiregames.com/D4605
Comments by: @marder, @Stan, @wraitii
This was SVN commit r26873.
2022-05-11 14:47:16 +00:00
1f8705d8f7 Avoids drawing text in GUI if it will be clipped.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4640
This was SVN commit r26870.
2022-05-10 16:32:25 +00:00
dddd599146 Fixes shader program and technique reloading.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4641
This was SVN commit r26869.
2022-05-10 12:54:57 +00:00
ee0fcf2b95 Fix map errors from GetTemplate not being available in the sim
Follows ea72437739. Fixes it by providing a convenience function in the
component Manager that matches the API in the GUI / AI

Refs #6444

Differential Revision: https://code.wildfiregames.com/D4630
This was SVN commit r26867.
2022-05-09 18:13:34 +00:00
69c76acabb Fix crash in non-visual autostart from not loading terrain textures
Fixes 410d2e883a

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D4627
This was SVN commit r26866.
2022-05-09 17:31:00 +00:00
2ccd1ba280 UnitMotion - Fix Clearance serialization and only allow changing passability of formation controllers.
Fixes 5de50c447c

Changing the passability class at runtime breaks some UnitMotion
assumptions in unrecoverable ways and will lead to units getting into
impassable terrain.
Formation controllers can tolerate it since units still check their own
obstruction.
Until some code is added to recover from the above bad case,
de-activated changing passability class for non-formation controllers.

This also fixes serialization issues related to clearance & passability
classes following that diff.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D4629
This was SVN commit r26865.
2022-05-09 17:29:15 +00:00
db8d251a8b Adds XML path of GL shader descriptions to file dependencies.
This was SVN commit r26864.
2022-05-09 10:13:19 +00:00
132058bc04 Fixes RenderDoc captures by calling glGetProgramivARB to get constants only for ARB shaders.
This was SVN commit r26863.
2022-05-09 08:22:21 +00:00
67e8e28006 Fixes dynamic GL buffer orphaning forgotten in cff79b421a. Fixes #6533
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4638
This was SVN commit r26859.
2022-05-08 22:45:54 +00:00
62e589ab76 Adds renderer backend interface and dummy backend.
Comments By: phosit, Stan
Tested By: Langbart, phosit
Differential Revision: https://code.wildfiregames.com/D4636
This was SVN commit r26858.
2022-05-08 22:02:46 +00:00
b808adcc00 Disables writing depth for decals as they follow terrain and water (if floating) shape. Fixes #6494
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4637
This was SVN commit r26852.
2022-05-05 17:25:20 +00:00
3ed4eaf247 Removes ogl_WarnIfError from regular renderer code.
This was SVN commit r26850.
2022-05-02 21:52:21 +00:00
a493a9f07f Removes ARB switch optimization as it triggers slow down. Fixes #6525
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4635
This was SVN commit r26849.
2022-05-02 21:25:13 +00:00
04bd96cee0 Moves uniform and texture binding to CDeviceCommandContext.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4631
This was SVN commit r26848.
2022-05-02 20:57:22 +00:00
a8caed8348 Uses correct value_type to iterate over the map in JSInterface_Hotkey. Refs a4852c4c01.
Patch By: phosit
Differential Revision: https://code.wildfiregames.com/D4633
This was SVN commit r26847.
2022-05-02 10:03:34 +00:00
ac60b12045 Replaces occurrences of "VBO" in comments by "backend buffer". Refs cff79b421a
This was SVN commit r26835.
2022-04-27 20:04:56 +00:00
d8b8128abb Adds AsFloatArray to CMatrix3D.
This was SVN commit r26834.
2022-04-27 19:53:42 +00:00
22a4db837b Adds backend buffer upload forgotten in aba7a170d9. Fixes #6520
This was SVN commit r26833.
2022-04-27 19:00:06 +00:00
b26aa5936d Avoids scoped binding of the already bound backend buffer.
This was SVN commit r26831.
2022-04-26 18:25:52 +00:00
98c18425a8 Adds more detailed debug name for backend buffers.
This was SVN commit r26830.
2022-04-26 18:16:45 +00:00
069560a290 Fixes incorrect vertex buffer offset added in aba7a170d9. Fixes #6519
This was SVN commit r26829.
2022-04-26 18:12:56 +00:00
d2d22a4538 Makes the terrain and decals rendering code load effect once per usage.
This was SVN commit r26823.
2022-04-24 13:44:00 +00:00
d3a7491724 Removes CONFIG2_GLES from CPostprocManager and renderers.
This was SVN commit r26817.
2022-04-23 23:49:52 +00:00
df612ab8b4 Moves GLSL-specific uniform name workaround (added in 227f9e403f) to CShaderProgramGLSL.
This was SVN commit r26816.
2022-04-23 21:39:15 +00:00
aba7a170d9 Moves vertex attribute binding to CDeviceCommandContext.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4610
This was SVN commit r26815.
2022-04-23 20:11:14 +00:00
ddb8b08508 Removes lib_api.h cleared but not deleted in 8c068aab07.
This was SVN commit r26813.
2022-04-22 16:11:21 +00:00
9b6365f9f2 Removes unused Noise generator added in 18eb72a25a without any actual usage.
60befbd1cf added the exact same implementation to the rmgen tool,
469d0fe5c5 removed the rmgen tool along with the original implementation
of noise.

Patch By: smiley
Differential Revision: https://code.wildfiregames.com/D4611
This was SVN commit r26810.
2022-04-20 20:22:01 +00:00
2355240eec Removes the Profiler allocation counter. Fixes #6476
Refs 5c8250ddb8, 5664f097d9, 6b0a0e83eb.

Patch By: smiley
Differential Revision: https://code.wildfiregames.com/D4606
This was SVN commit r26805.
2022-04-18 21:37:08 +00:00
7bd075d570 Moves glReadPixels to GL backend.
This was SVN commit r26802.
2022-04-17 14:55:00 +00:00
5de50c447c Allow setting the passability class dynamically. This is needed to improve formation behavior for the release.
Accepted by: @Freagarach
Refs: https://code.wildfiregames.com/D4563,
https://code.wildfiregames.com/D4605
Differential Revision: https://code.wildfiregames.com/Dr4599
This was SVN commit r26801.
2022-04-17 11:06:09 +00:00
c6da4d9312 Adds a fallback texture to skies to avoid a crash if a sky texture was invalid.
This was SVN commit r26800.
2022-04-17 10:10:52 +00:00
e02b402a14 Uses vertex attribute name only for GLSL. Fixes #6500
This was SVN commit r26799.
2022-04-17 08:00:10 +00:00
eaac0b0dbe Uses vertex streams to get attribute locations reducing duplication in XML.
Also adds missing streams.

This was SVN commit r26792.
2022-04-15 18:13:33 +00:00
37645670c1 Fixes crash in shader preprocessor introduced in d295dacb9b and appeared after 25332f9b86. Fixes #6033
This was SVN commit r26791.
2022-04-15 17:45:15 +00:00
2c8f4c4837 Moves AssertPointersBound to draw commands to not forget to call it for new shaders.
In the future it allows to call AssertPointersBound in a more lazy way.

This was SVN commit r26784.
2022-04-12 18:02:08 +00:00
d8d736f0eb Allows tex clients decide how to handle invalid textures instead of assertions. Fixes #6436
This was SVN commit r26783.
2022-04-12 17:39:05 +00:00
8c1a469253 Uses GL device capabilities for all vertex attribute locations.
This was SVN commit r26782.
2022-04-12 16:49:04 +00:00
ad2068dae0 Uses sequential numbering of GL vertex attributes for modern hardware. Refs #3054
Differential Revision: https://code.wildfiregames.com/D4601
This was SVN commit r26781.
2022-04-12 16:13:47 +00:00
f6837978e8 Adds GL debug labels only if they are supported (forgotten in 3db24af763). Fixes #6495
This was SVN commit r26780.
2022-04-12 06:44:06 +00:00
e6dd9f944e Moves Vulkan report code to its device to prevent crashing when a GL device is created. Fixes #6270
Differential Revision: https://code.wildfiregames.com/D4577
This was SVN commit r26779.
2022-04-12 06:39:14 +00:00
811a540382 Simplifies GL::CShaderProgram to store less data.
This was SVN commit r26777.
2022-04-11 22:10:21 +00:00
3db24af763 Adds names to GL shaders and programs.
This was SVN commit r26776.
2022-04-11 20:30:23 +00:00
8a51e05c2e Avoids a crash if a texture size is not a power of two.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4586
This was SVN commit r26774.
2022-04-11 16:28:41 +00:00
73c0e40045 Fixes warnings about unused function arguments in renderer.
This was SVN commit r26763.
2022-04-08 06:49:38 +00:00
d3dd98418e Fixes GLES build after c842678591.
This was SVN commit r26760.
2022-04-07 06:59:40 +00:00
e08590ee34 Fixes warning about unused captured variable in CDeviceCommandContext.
This was SVN commit r26749.
2022-04-02 20:40:40 +00:00
02b87cdb46 Fixes MSAA on macOS GL drivers for textures with incorrect sample count, fixes #6480
Refs #5969

Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4581
This was SVN commit r26737.
2022-03-31 07:04:51 +00:00
3f8cbecd72 Remove hardcoded shadows in Atlas UI
Fixes c9a7aabbea
Patch by: @nwtour
Accepted by: @phosit
Tested by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4400
This was SVN commit r26730.
2022-03-28 22:47:52 +00:00
8f85f24608 Update the water height slider if the water height is set using the picker.
Patch by: @phosit
Fixes: #6424
Differential Revision: https://code.wildfiregames.com/D4576
This was SVN commit r26727.
2022-03-28 22:36:17 +00:00
a33e0ccc84 Remove some duplicated code from ScriptInterface.cpp
Tested by: @Langbart
Patch by: @smiley
Differential Revision: https://code.wildfiregames.com/D4574
This was SVN commit r26725.
2022-03-28 21:58:22 +00:00
c842678591 Removes usages of EXT and INTEL timer query GL extensions.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4571
This was SVN commit r26724.
2022-03-28 17:32:09 +00:00
4934784266 Adds USE_FP_SHADOW to shader context only for GL ARB.
This was SVN commit r26712.
2022-03-26 19:00:28 +00:00
249f7cad55 Fixes cinematic camera distortion on some angles.
Differential Revision: https://code.wildfiregames.com/D4567
This was SVN commit r26690.
2022-03-20 21:59:49 +00:00
a57581471d Reduces the number of uniform changes in decals rendering and the number of render queries in models.
This was SVN commit r26688.
2022-03-20 16:08:19 +00:00
d214745f8f Reduces the number of uniform changes in decals rendering.
This was SVN commit r26687.
2022-03-20 14:58:03 +00:00
2a66c783ee Make configurable mouse edge distance for view scroll.
Differential Revision: https://code.wildfiregames.com/D4552
This was SVN commit r26665.
2022-03-17 18:25:54 +00:00
2ed2e9de0c Invalidates CDeviceCommandContext texture bind cache properly.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4553
This was SVN commit r26664.
2022-03-17 18:17:11 +00:00
ce3a47e49a Fix passibilty overlay in atlas
Broken in bb49fbe793.

Patch by: nwtour
Fixes #6374

Differential Revision: https://code.wildfiregames.com/D4338
This was SVN commit r26663.
2022-03-17 15:17:49 +00:00
37b30901b3 Removes C++ code for conditional defines removed in f29d059617.
Differential Revision: https://code.wildfiregames.com/D4551
This was SVN commit r26661.
2022-03-15 22:13:22 +00:00
ea6af3f148 Updates a model color uniform in RenderModifier only if it was changed.
This was SVN commit r26653.
2022-03-14 22:56:38 +00:00
b4253d48cb Moves CShaderProgram to backend and handling via CDeviceCommandContext.
Differential Revision: https://code.wildfiregames.com/D4548
This was SVN commit r26652.
2022-03-14 22:16:14 +00:00
Angen
8cec96270b Don't create thread on failed connection
Differential revision: D4545
Fixes: #6442

This was SVN commit r26649.
2022-03-14 17:19:42 +00:00
376fe61df9 Adds missed shader program validation after 0456b09c3c.
Reported By: Freagarach
This was SVN commit r26637.
2022-03-13 11:01:32 +00:00
e89e55539e Removes custom vertex attribute locations for GLSL. Refs ce215cace3.
This was SVN commit r26630.
2022-03-12 23:25:23 +00:00
992c18aabb Enables ARB shaders only once since we should not mix different backends.
This was SVN commit r26629.
2022-03-12 22:10:47 +00:00
0456b09c3c Moves shader dependent XML parsing from shader manager to shader program.
This was SVN commit r26628.
2022-03-12 22:02:21 +00:00
518a1421ab Clears the color attachment of the main framebuffer only if needed.
Differential Revision: https://code.wildfiregames.com/D4539
This was SVN commit r26623.
2022-03-11 22:26:49 +00:00
9c22f9f123 Fix the loading of subfiles for LODS. It currently failed because el_actor and el_quality levels have different ids depending on the loaded file. e.g for an actor with qualitylevels el_actor will be 18 and el_qualitylevels will be 0 while for a standard actor el_actor will be 0 and el_qualitylevels will be -1, hence failing for all the files since the code assumed wrong. XeroActor.Load() takes care of all the other cases, e.g. trying to load a variant which means the only valid check is for qualitylevels.
Fixes 76acc4e146

This was SVN commit r26616.
2022-03-10 21:32:36 +00:00
5390143b66 Fixes rendering reflections even they are disabled, broken in 9ce51f4357. Fixes #6454
Reported By: Langbart
This was SVN commit r26615.
2022-03-10 16:36:16 +00:00
1ce999a52d Creates water backend textures and framebuffers only if needed.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4536
This was SVN commit r26613.
2022-03-09 21:40:24 +00:00
cb1f0807c5 Removes FALLTHROUGH in VertexArray after 12c304e494. Fixes #6453
This was SVN commit r26611.
2022-03-09 07:07:02 +00:00
12c304e494 Removes duplication of backend format in VertexArray usages, optimizes vertex color attribute of quad overlay.
This was SVN commit r26609.
2022-03-08 23:28:31 +00:00
41f2ab87ed Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d.
Also fixes GLES.

Differential Revision: https://code.wildfiregames.com/D4528
This was SVN commit r26605.
2022-03-07 23:04:11 +00:00
687174e5d9 Fix crash when creating JSON file that do not exist.
Tested by: @Langbart
Refs: #6450
Differential Revision: https://code.wildfiregames.com/D4529
This was SVN commit r26604.
2022-03-07 15:46:28 +00:00
647fccd410 Replaces native GL types by backend format in vertex attributes in CShaderProgram.
This was SVN commit r26594.
2022-03-07 02:21:05 +00:00
ce18f297d5 Adds icons to minimap.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4513
This was SVN commit r26592.
2022-03-07 01:22:06 +00:00
3399791677 Adds renderer backend vertex formats and normalizes texture formats.
This was SVN commit r26588.
2022-03-06 22:14:57 +00:00
db7894ff6b Removes redundant binding slot retrieving from CShaderProgram.
This was SVN commit r26585.
2022-03-06 21:17:24 +00:00
bb
8eecc39e71 Let the Gamesetup.cpp Autostart (starting from cl) use the gamesettings via the autostart gui page.
Comments and testing By: Langbart
Fixes #6433
Differential Revision: D4492
Includes/Obsoletes D4287

This was SVN commit r26584.
2022-03-06 21:12:16 +00:00
bc6ab4ac49 Removes redundant CShaderProgram streams.
This was SVN commit r26582.
2022-03-06 20:53:39 +00:00
63f749da2d Removes unused functions from CShaderProgram.
This was SVN commit r26579.
2022-03-06 16:40:04 +00:00
9ce9273c35 Add quotes to the logged filenames.
Differential Revision: https://code.wildfiregames.com/D2212
This was SVN commit r26546.
2022-03-05 18:30:38 +00:00
b9d3d00c50 Show system_info.txt, console.txt, json file, userreport_hw.txt paths in the terminal when it's written to the disk.
Discussed with: @vladislavbelov
Idea by: @elexis
Differential Revsion: https://code.wildfiregames.com/D2212

This was SVN commit r26544.
2022-03-05 17:28:00 +00:00
3eee3a444d Adds final keyword to simulation component classes.
Differential Revision: https://code.wildfiregames.com/D4520
This was SVN commit r26537.
2022-03-03 22:42:26 +00:00
d494bbd583 Replaces M_PIf by M_PI in Atlas, fixes compilation with gcc 11.2.0 and glibc 2.35.
There was added a workaround in glibc to fix tests.

Refs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103735
https://sourceware.org/bugzilla/show_bug.cgi?id=28713

This was SVN commit r26536.
2022-03-03 18:10:05 +00:00
bb
be2f33b661 removeable => removable
Patch By: LudovicRousseau
Comments By: vladislav, Nescio
Differential Revision: D3663
fixes #6098

This was SVN commit r26533.
2022-03-03 14:52:13 +00:00
bb
fefde41317 Allied chat opens with t bug (on linux)
Comments By: vladislav, elexis
Solution Proposed By: elexis
fixes #5194
refs #3870

Differential Revision: D1386
This was SVN commit r26530.
2022-03-03 11:36:08 +00:00
3a4bbd11fd Moves all GL draw commands to CDeviceCommandContext.
Differential Revision: https://code.wildfiregames.com/D4518
This was SVN commit r26525.
2022-03-03 07:09:59 +00:00
bb
7c3aed5f36 Set the size of the overlaybox without relying on the arbitrary initSize
Comments By: vladislav
Differential Revision: D4489
This was SVN commit r26523.
2022-03-02 16:27:11 +00:00
bb
8aa00041e9 Fix BufferZone in right alignment
Comments By: vladislav
Differential Revision: D4490
This was SVN commit r26522.
2022-03-02 16:14:05 +00:00
6de2649955 Fixes empty decals drawing when a decal is outside or on a border of a map.
Reported By: Nullus
This was SVN commit r26514.
2022-03-01 18:02:52 +00:00
1ff3b45a1e Adds more checks for vertex and index buffer creations.
This was SVN commit r26502.
2022-02-27 20:21:07 +00:00
da4ec670c1 Moves glViewport from CRenderer to CDeviceCommandContext.
This was SVN commit r26497.
2022-02-26 23:17:48 +00:00
680b0215fc Adds depth bias to PipelineState and its management to CDeviceCommandContext.
Refs #2368

This was SVN commit r26495.
2022-02-26 21:49:32 +00:00
bf8fe51dea Moves enabling of GL multisample to CDevice.
This was SVN commit r26494.
2022-02-26 21:10:14 +00:00
6bc2f7a783 Draws entities on minimap via triangles instead of points.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4509
This was SVN commit r26493.
2022-02-26 20:30:09 +00:00
67cafcd599 Fixes GLES and compilation warnings.
This was SVN commit r26492.
2022-02-26 20:28:39 +00:00
23a023507a Replaces GL_LINES, GL_QUADS, GL_TRIANGLE_STRIP and GL_TRIANGLE_FAN by GL_TRIANGLES.
This was SVN commit r26488.
2022-02-26 00:37:27 +00:00
59a0a74951 Fixes a degenerate triangle on terrain sides of map corners.
This was SVN commit r26487.
2022-02-25 23:45:54 +00:00
d5d1754991 Moves polygon mode handling to PipelineState and CDeviceCommandContext.
This was SVN commit r26486.
2022-02-25 22:05:06 +00:00
a87cb6c94d Moves GL depth comparison function to SamplerDesc.
This was SVN commit r26485.
2022-02-25 20:02:03 +00:00
0d2faa1cab Adds debug context option for GL context creation.
This was SVN commit r26484.
2022-02-25 16:26:56 +00:00
8a63adc40d Uses CDeviceCommandContext as an input parameter for CCanvas2D.
This was SVN commit r26480.
2022-02-25 08:14:11 +00:00
d1f1d41a9f Uses triangles for drawing lines in CCanvas2D.
Differential Revision: https://code.wildfiregames.com/D4444
This was SVN commit r26479.
2022-02-25 06:59:57 +00:00
b778caf146 Move FormationName and Icon from cmpFormation to cmpIdentity.
Reduces duplication across components.
Allows to provide specific names and history for formations.

Differential revision: https://code.wildfiregames.com/D4476
Comments by: @bb, @Stan
Fixes #6400

This was SVN commit r26476.
2022-02-24 06:51:07 +00:00
6a0fc31c33 Replaces GL_QUADS by GL_TRIANGLES for drawing overlays and debug frustums.
This was SVN commit r26465.
2022-02-22 18:41:31 +00:00
731b85b9a2 Adds GPU scoped labels for console, logger and profiler.
This was SVN commit r26444.
2022-02-20 21:55:29 +00:00
a0b0effd50 Fixes minimap after map reloading.
Reported By: marder
This was SVN commit r26439.
2022-02-20 10:51:11 +00:00
aac1a64675 Moves dynamic geometry for rendering sky to static vertex buffer.
This was SVN commit r26424.
2022-02-19 20:07:55 +00:00
bb
0f07c368ed Allow more general contexts in json translatable strings
While at it fix the messages.json from ea72437739 (missing excludeMask
and make the keywords objects not arrays)
Comments By: Freagarach
Differential Revision: D4483
This was SVN commit r26422.
2022-02-19 17:21:23 +00:00
b0826da1bc Fixes not drawing brushes under water when refractions are enabled.
This was SVN commit r26411.
2022-02-19 15:44:32 +00:00
36833d1df2 Moves max texture size to backend device capabilities.
This was SVN commit r26409.
2022-02-18 23:17:48 +00:00
5eb21cbfbf Adds debug labels to backend framebuffers.
This was SVN commit r26408.
2022-02-18 23:00:11 +00:00
b949f19875 Moves GL debug information toggle to run-time to make it easier to test after release.
This was SVN commit r26407.
2022-02-18 22:38:45 +00:00
cff79b421a Moves GL vertex and index buffer management to CDeviceCommandContext.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4493
This was SVN commit r26406.
2022-02-18 17:33:12 +00:00
6a2a297c0e Clean LoadPlayerSettings in Player-helper.
- Removed obsolete C++-side `addPlayer`, introduced in 4fed9b8242, moved
out of Atlas in 1c0536bf08, unused after 9ee44bd9b8.
- Get the player settings from a local function (avoids passing
arguments).
- Removed setting the standard diplomacy (done in cmpPlayerManager since
132020f88e).
- Create entity when adding a player instead of creating it and
instructing the playermanager to add it.
- Changed/Removed some comments.

Differential revision: https://code.wildfiregames.com/D4482
Comments by: @Stan
This was SVN commit r26404.
2022-02-18 08:10:13 +00:00
6496aea364 Update unitTables.py for A25 and trunk
- Add support for mul_round
- Correct table
- BUGFIX: correct roster table via the mixin Civ fix
- avoid long lines for PEP8 compliance
- for mod development outside .svn repo, create symlink
- replace all TAB indents to 4 spaces for PEP8
- TAB to 4 spaces to be PEP8 compliant
- refactor complex inline logic to compute and formatting
- beautify and avoid long lines to be PEP8 compliant
- beautify and simplify JS table format code
- Using more accessible color scheme
- Better color scheme
- main analysis file
- Rename the new version back to keep consistancy
- dependency JS library
- Unit analysis result
- Rewrite specilized table logic to only show changed
- Prefer numeric flag over string flag to refactor
- Re-format HTML templates into readable source code
- Civ specific table now renders non-empty
- Update computeCivTemplate to parse A25 template dir
- Cleanup debugging flags
- Update copyright notice to 2022
- Explain how the code works for future development
- Initial README
- Refactor: put HTML IO code in a single function
- Refactor: include JavaScript as verbatim str
- Refactor: separate computation from IO
- Refactor: compute templates before HTML IO
- Refactor: compute CivTemplates before HTML IO
- Refactor: compute separate from IO code
- Fixed melee and ranged attack damage parsing
- Fixed Resistance parsing
- Implement the undefined function complain
- Rename Armour -> Resistance
- Simplify NumericStatProcess logic

Patch by: @hyiltiz
Differential Revision: https://code.wildfiregames.com/D4445
This was SVN commit r26403.
2022-02-17 22:41:53 +00:00
bb
3484a3d483 Move parabolic range computation to rangemanager
Co-proposed By: Freagarach
Reviewed By: Freagarach
Test written By: Stan
Comments By: vladislavbelov, stan, wraitii, Silier
Depricates: D4356

Differential Revision: D3249
This was SVN commit r26392.
2022-02-15 20:31:55 +00:00
bb
47e79c71d5 Make CGUIText variables camel case
Reviewed By: vladislavbelov
Differential Revision: D4491
This was SVN commit r26379.
2022-02-14 17:48:08 +00:00
6ec956553a Fixes builds after d0115185b9 by removing includes to res handle.
This was SVN commit r26372.
2022-02-14 06:29:50 +00:00
59df75e78b Fixes two clang warnings.
Refs #5550 #5294

This was SVN commit r26370.
2022-02-13 23:41:47 +00:00
d0115185b9 Removes unused and redundant h_mgr after 0e599a3176 and dd91a5e0ef.
This was SVN commit r26369.
2022-02-13 22:31:36 +00:00
dd91a5e0ef Removes unused ogl_tex after 4de89c3db1 and 492a109b68.
This was SVN commit r26368.
2022-02-13 22:07:56 +00:00
492a109b68 Removes redundant ogl_tex quality option after 4de89c3db1.
This was SVN commit r26367.
2022-02-13 21:53:02 +00:00
aaf378f041 Moves backend capabilities to CDevice.
This was SVN commit r26366.
2022-02-13 21:46:03 +00:00
4de89c3db1 Moves texture management to CDeviceCommandContext, adds quality options.
Comments By: nwtour, Stan
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4488
This was SVN commit r26365.
2022-02-13 19:30:28 +00:00
936fb5a172 Replace checkrefs.pl by a python script. This makes it easier to run on Windows for non technical persons.
- Add support for tips
- Fix other scripts not writing to the correct output (they were writing
info messages to stderr)

Based on a patch by: @mammadori	and @cyrille
Differential Revision: https://code.wildfiregames.com/D3213
This was SVN commit r26350.
2022-02-12 15:43:42 +00:00
bb
9696b18a72 Happy new year bb.
See previous commit

This was SVN commit r26339.
2022-02-10 16:38:24 +00:00
bb
505bead1da Some minor improvements for the localization scripts
Comments By: Stan
Reviewed By Freagarach

Differential Revision: D4397
This was SVN commit r26338.
2022-02-10 16:18:49 +00:00
f55282fc96 Add a python equivalent to validate.pl.
Refs: D3213

This was SVN commit r26334.
2022-02-09 23:06:40 +00:00
adcd1d105c Improve the validator.py script. Fix false positives with particles and variants. Use a logger instead.
This was SVN commit r26333.
2022-02-09 22:07:36 +00:00
Angen
0a72a02ea0 Make scale variables constant
b4fbbed379

This was SVN commit r26307.
2022-02-06 11:11:35 +00:00
a17fad722a Moves framebuffer management to CDeviceCommandContext.
Tested By: Langbart, nwtour
Differential Revision: https://code.wildfiregames.com/D4475
This was SVN commit r26302.
2022-02-05 16:59:23 +00:00
ea72437739 Move GenericName, History and Icon from the civ-JSON to cmpIdentity.
Since the players/civs already have cmpIdentity, use it.
This forces civs to have corresponding XML in the `special/players/`
folder.

Also moves the files from `special/player/` to `special/players/`
consistent with other folders. And moves the generic `player.xml` one
level up.

Differential revision: https://code.wildfiregames.com/D4473
Help and comments by: @Stan, @wraitii
This was SVN commit r26298.
2022-02-05 06:24:45 +00:00
37aa0456c8 Fixes missed assignment to currentTech in ParticleRenderer added in 5adbe4f1a3.
This was SVN commit r26296.
2022-02-04 16:27:35 +00:00
ac77d1c3e0 Moves scissor test management to DeviceCommandContext.
This was SVN commit r26288.
2022-02-01 17:58:21 +00:00
aeaf495da3 Renames GL::CTexture levelCount to MIPLevelCount to match Tex.
This was SVN commit r26287.
2022-02-01 16:48:24 +00:00
a1f98b016b Moves depth and stencil tests to PipelineState and DeviceCommandContext.
Differential Revision: https://code.wildfiregames.com/D4471
This was SVN commit r26286.
2022-02-01 16:38:55 +00:00
709e8292b0 Moves color mask, depth mask and function management from CShaderPass to DeviceCommandContext.
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4465
This was SVN commit r26284.
2022-01-31 20:10:06 +00:00
22db9202f1 Fixes EOL in PipelineState files after 5adbe4f1a3.
This was SVN commit r26283.
2022-01-31 11:47:58 +00:00
8c068aab07 Removes possibility to link lowlevel library dynamically.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4470
This was SVN commit r26281.
2022-01-31 06:53:30 +00:00
02c96903c5 Renames sgn function to Sign to fit the naming of other MathUtil functions.
This was SVN commit r26276.
2022-01-30 20:51:01 +00:00
0e403632cf Allow giving different weights to different templates when pushing.
This makes it possible to make units heavier, which both push more & get
pushed less by other units.
In particular, the diff does it for siege units & elephants.

This improves movement for these units in crowd situation, since they
will now basically not move when other regular units push into them.

Supported By: asterix, marder
Refs #6127

Differential Revision: https://code.wildfiregames.com/D4452
This was SVN commit r26275.
2022-01-30 14:22:27 +00:00
4df03ed2d2 Run the AI in the same Compartment as the simulation. Let the AI access Sim data.
This is a paradigm change for AI computation.
Historically, the AI was intended to be run in a separate thread from
the simulation. The idea was that slow AI wouldn't stop the renderer
from being smooth.

In that original design, the AI received a copy of the game world and
used that to run its logic. This meant the simulation could safely do
whatever it wanted in the meantime. This copy was done via AIProxy &
AIInterface.

This design ended up having significant flaws:
- The copying impacts the simulation negatively, particularly because
AIProxy subscribes to a lot of messages (sometimes sent exclusively to
it). This time cannot be threaded, and impacts MP games without AIs.
- Copying the data is increasingly difficult. Modifiers are a headache,
LOS is not implemented. Lots of logic is duplicated.

The intended benefits of the design also failed to realise somewhat:
- The AI was never threaded, and in fact, it is probably better to try
and thread Sim + AI from the renderer than just the AI, at which point
threading the AI specifically brings little benefit.

The new design is much simpler and straighforward, but this has some
side-effects:
- The AI can now change the simulation. This can be used for cheating,
or possibly for a tutorial AI.
- The AI runs in the same GC zone as the simulation, which may lead to
more frequent Sim GCs (but overall we might expect a reduction in
temporary objects).
- The AI state was essentially cached, so replacing some functions with
Engine.QueryInterface might be slower. The tradeoff should be balanced
by lower AIProxy computation times.

Future work:
- Threading some specific AI tasks could still be worthwhile, but should
be done in specific worker threads, allowed to run over several turns if
needed.

Technical note: the AI 'global' is in its own Realm, which means name
collisions with the same are not possible.

Other notes:
- The RL Interface uses the AI Interface and thus will gradually lose
some data there. Given that the RL Interface can now request data
however, this should be dine.

Refs #5962, #2370

Differential Revision: https://code.wildfiregames.com/D3769
This was SVN commit r26274.
2022-01-30 13:33:34 +00:00
0779c64052 Add tests for fixed::FromFraction
Differential Revision: https://code.wildfiregames.com/D4458
This was SVN commit r26273.
2022-01-30 12:57:08 +00:00
d740b4f335 Fix bug where 'archive' XMB files could end up being written to the user mod
Users sometimes ended up with bad (wrong version) XMB files in the user
mod. This resulted in A25 loading a black screen.
There is a combination of unfortunate code paths that lead to this. The
core issue is that:
- cdd75deafb changed the XMB loading code that if there is an error in
Init from a cached XMB, it reports an error. This error happens to be
silent, because the GUI expects CXeromyces to do its own error reporting
(a pretty poor decision, all in all, but whatever). This explained why
the black screen showed no errors.
- The code flow attemps to load an 'archive' XMB first, then only a
loose cache. _But_ if the XMB that fails to load is an archive (which
generally never happens except when using incompatible mods, which is
generally less easy in A25 since we added code to stop that), then the
game will try to recreate the XMB as an 'archived' path, not a 'loose
cache' path as it would usually do.
- Because the 'archived' path already exists in the VFS, the game will
attempt to overwrite that. It so happens that in non-dev copies, this
writes to the user mod.
- Because the user-mod is always loaded, this was unexpected for users.

Fixing this is rather simple: the game should never attempt to write
'archive' XMBs in that function. Added explicit barrier, which shouldn't
matter performance-wise but fixes the issue by writing in the proper
place, and also properly recovering in case of read failure.
I will note that the game will still try to load the archived file, and
recreate it every time, but I don't think that's a particularly big
deal, in general having engine-incompatible mods in the future should be
harder because of A25 changes there.
(NB: users that have used both A24 and A25 should perhaps still be
advised to check their user mod folder, otherwise they'll end up
recreating those files forever).

Reported by: dave_k
Fixes #6320

Differential Revision: https://code.wildfiregames.com/D4275
This was SVN commit r26272.
2022-01-30 12:50:43 +00:00
e0d98cd94d Call SetTerrainDirty on CModelAbstract without going through CmpVisualActor
The UnitManager already lists all units, so we do not need to go through
the visual actor of entities to update them. This is faster and
decouples simulation & graphics code slightly.

Further, the simulation does not need to know about texture changes (see
also 410d2e883a), so remove those calls in Atlas.

Differential Revision: https://code.wildfiregames.com/D4455
This was SVN commit r26270.
2022-01-29 08:28:04 +00:00
410d2e883a Remove leftover terrain-based movement cost code.
6581796103 removed the ability for terrain to affect movement speed. The
JPS pathfinder cannot support it, and the approach was poor anyways,
coupling rendering data with simulation data.
This lets us remove the dependency on CTerrainTextureManager everywhere.

Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D4459
This was SVN commit r26269.
2022-01-29 08:22:28 +00:00
1e07283bac Disables possibility to mix shader types with a single backend.
Differential Revision: https://code.wildfiregames.com/D4463
This was SVN commit r26264.
2022-01-28 06:34:34 +00:00
285e542a0a Removes redundant comment about alpha test in shaders forgotten in 5cbd46de94.
This was SVN commit r26260.
2022-01-27 17:32:07 +00:00
d4d1bc039f Moves culling mode and front face state management to DeviceCommandContext.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4456
This was SVN commit r26259.
2022-01-27 17:25:37 +00:00
83d251406c Move BuildAnimation to CSkeletalAnimMgr / CObjectEntry
There is no need to have BuildAnimation in CModel when everything is
done in CObjectEntry anyways.
This removes a pointer in every CModel object, which is nice.

Accepted By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4454
This was SVN commit r26254.
2022-01-26 14:55:19 +00:00
27f64b80ed Remove unused variable following 330b570ba8
Forgotten in that diff.

Reported by: vladislavbelov
This was SVN commit r26250.
2022-01-25 18:47:38 +00:00
330b570ba8 Remove RENDERDATA_UPDATE_COLOR, which is not used, and cleanup.
RENDERDATA_UPDATE_COLOR was used to precompute lightEnv-dependent data
on the CPU. This is no longer done following engine upgrades, and in
particular d7d02a4740 which explictly always did this on the GPU.

ModelAbstract had a 'SetDirtyRec' hack for it because of decals, which
can also be removed. The 'dirty' bit of CRenderableObject is renderdata
for the specific item, never its props, so it never actually needs to be
recursive.

CheckLightEnv is also useless as a result, and removed.

Differential Revision: https://code.wildfiregames.com/D4453
This was SVN commit r26249.
2022-01-25 16:59:29 +00:00
acb043f4a2 Adds a rasterization state to the renderer backend pipeline state.
This was SVN commit r26248.
2022-01-25 16:28:58 +00:00
158cf8ea8d UnitMotion pushing improvements
The main change is the introduction of a 'pushing pressure' counter on
units. This counter increases when units get pushed around, and
decreases over time. In essence, units under high pressure move slower &
are harder to push around.
The major effect is that units can now get bogged down when very dense
groups start colliding. This makes movement more realistic, makes unit
movement more 'chokepointy', and generally improves the mathematical
soundness of the system (lower values are easier to handle for our 200ms
turns).

Other changes:
- The logic to detect units crossing each other's path has been
reworked. Units that run towards each other should not more obviously
avoid each other.
- New parameters: 'Spread' is a measure of how strong the pushing effect
is based on distance. With the current settings, static-pushing is
rather 'on/off', whereas moving-pushing is more gradual (and thus the
max influence distance was increased when moving).
- Default values have been tweaked for lower overlap.
- Units only looked at other units within their grid region. This led to
overlap near grid-borders. Units now look at neighboring grid elements,
which largely removes this issue. While this may be slower, the
performance of pushing was largely negligible before, so it is unlikely
to become a main cause of lag (and overlap was generally disliked by
players).
- Units no longer orient in the direction of pushing, but instead keep
facing their target. This can look slightly odd under very heavy pushing
forces, but vastly improves behaviour of very slow units such as rams
(since they spend much less time turning around). As a side-effect,
clean up angle code following acc780bcbb .

Engine changes:
- Add a debug rendering mode at compile-time to help understand what is
happening.
- Make it possible to constexpr initialise fractional fixed numbers by
using FromFraction

The 'pressure' change was inspired by alre's suggestion at
https://wildfiregames.com/forum/topic/56436-for-a-better-unit-movement/#comment-461987

Refs #6127

Differential Revision: https://code.wildfiregames.com/D4439
This was SVN commit r26245.
2022-01-24 15:36:13 +00:00
4ce609bb1f Uses MIPs for terrain textures previews following e4455a8e8f.
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4447
This was SVN commit r26239.
2022-01-24 07:00:55 +00:00
c114bab396 Removes mem_get_ptr from the Tex::get_data comment forgotten in 63086f4e26.
This was SVN commit r26237.
2022-01-23 11:59:35 +00:00
ad5377bc0e Fixes fancy water shores drawing after 1d9a8b2b0b.
Reported By: wraitii
This was SVN commit r26231.
2022-01-20 17:31:21 +00:00
41fe3aafa4 Fixes minimap texture scissoring rect following b5d85e279f. Fixes #6382
This was SVN commit r26229.
2022-01-19 17:40:26 +00:00
5adbe4f1a3 Moves blend state management to DeviceCommandContext. Fixes #6420
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4441
This was SVN commit r26228.
2022-01-19 17:28:47 +00:00
40e75f9c89 Removes binding additional attribute for water shader added in 1d9a8b2b0b.
Reported By: Freagarach
This was SVN commit r26223.
2022-01-15 16:47:42 +00:00
a4a647e9f0 Removes unused variable in ParticleRenderer after fc223e3540.
This was SVN commit r26222.
2022-01-15 16:29:26 +00:00
971b734873 Moves hardcoded blend state in debug overlay and water to their techniques.
This was SVN commit r26218.
2022-01-14 18:44:40 +00:00
fc223e3540 Moves hardcoded blend state in ParticleRenderer to the transparent particles technique.
This was SVN commit r26217.
2022-01-14 18:18:28 +00:00
829e37371b Moves hardcoded blend state in CCanvas2D to its technique.
This was SVN commit r26216.
2022-01-14 17:44:42 +00:00
1d9a8b2b0b Splits water surface and shore drawing functions and fixes their switch.
Differential Revision: https://code.wildfiregames.com/D4436
This was SVN commit r26215.
2022-01-14 17:34:58 +00:00
9aedcade7f Draws slider button only inside its element.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4435
This was SVN commit r26213.
2022-01-14 06:50:44 +00:00
5cbd46de94 Removes deprecated GL alpha test.
In GL3.0 alpha test mode was deprecated and removed in GL3.3. We should
use discard/kill in shaders instead.
In shaders alpha test was removed in d3a24c26ba, in FFP it was removed
with FFP in b7e6811ea6.

Differential Revision: https://code.wildfiregames.com/D4434
This was SVN commit r26211.
2022-01-13 17:50:28 +00:00
a2ab6b9b72 Allow to cap FPS up to the current max refresh rates of gaming screens: 360Hz
Patch by: @OptimusShepard
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4366
This was SVN commit r26207.
2022-01-13 14:30:23 +00:00
712b7ebf9a Remove JS_New in favour of JS::Construct in preparation for SM91
Spidermonkey 91, the next ESR, removes JS_New in favour or
JS::Construct.
See
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/migration-guide/docs/Migration%20Guide.md#object-construction
and
https://bugzilla.mozilla.org/show_bug.cgi?id=1491055

This change is SM78 compatible and therefore done beforehand.

Tested by: Freagarach
Refs #5986

Differential Revision: https://code.wildfiregames.com/D4427
This was SVN commit r26205.
2022-01-12 16:51:32 +00:00
6d28c44f0f Removes unused method from CShaderTechnique.
This was SVN commit r26201.
2022-01-11 16:02:27 +00:00
9757cc2539 Removes direct shader binding, uses BeginPass always following e1374252b7.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4431
This was SVN commit r26199.
2022-01-11 05:56:44 +00:00
2e38c117d2 Fixes comments of CLOSTexture and CTerritoryTexture following 57ba7c4a1c.
This was SVN commit r26197.
2022-01-10 17:58:51 +00:00
0cda752ec3 Uses CVertexBufferManager handle instead of raw VBChunk pointer management.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4430
This was SVN commit r26196.
2022-01-10 16:51:43 +00:00
795fb070af Removes asking GL of current bind framebuffer to avoid syncs.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4422
This was SVN commit r26193.
2022-01-09 07:36:56 +00:00
95318d34ff Removes redundant layer check added in f715b73f4f.
Reported By: Freagarach
This was SVN commit r26189.
2022-01-08 13:44:40 +00:00
9924450d36 Moves default GL state setup to GL device.
This was SVN commit r26187.
2022-01-07 22:21:22 +00:00
5610c71fc6 Fixes rendering big screenshot pieces onto screen, refs 52a8793450.
This was SVN commit r26186.
2022-01-07 20:15:48 +00:00
f715b73f4f Uploads cube textures in SkyManager via DeviceCommandContext.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4421
This was SVN commit r26185.
2022-01-07 20:00:41 +00:00
15c40861b4 Separates terrain alphamap combining and uploading.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4419
This was SVN commit r26184.
2022-01-07 14:33:54 +00:00
9d7457da9b Removes ogl_tex usage from CRenderer.
This was SVN commit r26181.
2022-01-06 23:23:36 +00:00
b061a7ead4 Optimizes FBO usages for LOSTexture and water shore foam.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4418
This was SVN commit r26180.
2022-01-06 22:44:54 +00:00
9bc3dd4699 Fixes terrain overlay texture upload after fd976456d7.
Reported By: nwtour
This was SVN commit r26176.
2022-01-06 14:16:32 +00:00
912202ff0c Uses core GL functions for GLSL shaders.
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4416
This was SVN commit r26175.
2022-01-06 11:41:04 +00:00
cee0ce48eb Disables redundant mipmap generation for postprocessing.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4417
This was SVN commit r26174.
2022-01-06 11:09:42 +00:00
27c8771a3a Fixes debug drawing of a null shadow texture introduced in 36107cb7e1, appeared after abc3190c03.
Reported By: nwtour
This was SVN commit r26173.
2022-01-06 11:04:45 +00:00
f07fa81661 Renames LOS framebuffer object to follow CC.
This was SVN commit r26171.
2022-01-05 15:37:59 +00:00
fd976456d7 Performs texture uploads via DeviceCommandContext interface.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4415
This was SVN commit r26170.
2022-01-05 14:49:54 +00:00
0a8d382657 Fix OpenGL ES 2.0 Warnings.
This was SVN commit r26167.
2022-01-04 20:54:37 +00:00
5e3426794c Moves frame rendering function to CRenderer and combines with making screenshots.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4414
This was SVN commit r26166.
2022-01-04 18:13:45 +00:00
87b5c233c5 Splits CRenderer part about scene to CSceneRenderer.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4412
This was SVN commit r26165.
2022-01-04 13:29:01 +00:00
3d2be697a2 Fix OpenGL ES build after ae32055c9b.
This was SVN commit r26163.
2022-01-04 00:21:37 +00:00
2f90becb28 Removes SkipSubmit and unused friends from Renderer.
This was SVN commit r26162.
2022-01-03 12:16:16 +00:00
3e6b0780fa Removes unused Renderer friends of removed classes, refs 8753f881ee, 6bc33fe8bd.
This was SVN commit r26161.
2022-01-03 12:00:37 +00:00
3b8f1cdc04 Moves Renderer internals class out of the global namespace.
This was SVN commit r26160.
2022-01-03 11:11:58 +00:00
6dc0abebdb Removes unused includes from Renderer.
This was SVN commit r26159.
2022-01-03 10:59:41 +00:00