1
0
forked from 0ad/0ad
Commit Graph

773 Commits

Author SHA1 Message Date
8e51dfa91a Moves post processing out of scene rendering to avoid framebuffer pass duplicate.
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4827
This was SVN commit r27232.
2022-11-18 19:59:18 +00:00
3a4c8342a0 Makes AcquireNextBackbuffer returns true in case of successful backbuffer acquirement.
This was SVN commit r27184.
2022-10-30 00:38:45 +00:00
8ae3a2bfd6 Adds AcquireNextBackbuffer to CDevice to have something to present.
This was SVN commit r27148.
2022-10-11 22:48:07 +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
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
3ed4eaf247 Removes ogl_WarnIfError from regular renderer code.
This was SVN commit r26850.
2022-05-02 21:52:21 +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
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
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
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
8a63adc40d Uses CDeviceCommandContext as an input parameter for CCanvas2D.
This was SVN commit r26480.
2022-02-25 08:14:11 +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
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
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
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
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
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
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
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
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
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
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
4fba543488 Unifies providing SkyManager and WaterManager like other managers, refs b889826a3d.
This was SVN commit r26158.
2022-01-03 10:49:12 +00:00
273d336364 Removes unused Atlas functionality to set clear color added in 2f53eea71a and removed in 0d6882dad2.
This was SVN commit r26156.
2022-01-03 09:39:54 +00:00
e9070a2630 Removes rand function usage from Atlas and unused rand include from particles.
This was SVN commit r26153.
2022-01-02 22:35:17 +00:00
202e248c93 Removes cinema path recording from atlas added in 2c71c22045 and not removed with ffmpeg in [[SVN:9520]], 4c395f4bf2 and 47b26e56d3.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4411
This was SVN commit r26147.
2021-12-31 10:35:56 +00:00
e4455a8e8f Speedups terrain painting tab in Atlas by asynchronous texture loading.
Tested By: Silier, Stan
Differential Revision: https://code.wildfiregames.com/D4405
This was SVN commit r26142.
2021-12-30 16:24:07 +00:00
9696df3c28 Removes unused ogl/ogl_tex includes.
This was SVN commit r26121.
2021-12-27 10:11:26 +00:00
478164962f Removes static linking of OpenGL library.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4387
This was SVN commit r26104.
2021-12-24 08:02:27 +00:00
c9bea80e0d Use GLAD2 a multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator.
Comments by: @nwtour, @Langbart, @bb
Based on patch by: @echotangoecho
Tested on Windows 7 & 10, Ubuntu and macos.

Differential Revision: https://code.wildfiregames.com/D721
This was SVN commit r26093.
2021-12-21 22:03:31 +00:00
a32ab00f4d Moves backbuffer swap and error check to GL device.
This was SVN commit r26092.
2021-12-21 17:02:04 +00:00
89c181ded1 Encapsulates information about GL inside device.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4375
This was SVN commit r26072.
2021-12-15 06:43:41 +00:00
3809457513 Replaces unclear PreferGLSL by direct renderer backend choice.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4363
This was SVN commit r26069.
2021-12-14 06:34:02 +00:00
a591e5aa69 Removes unused/not implemented hooks from AppHooks. Refs f947fa6afe.
This was SVN commit r26024.
2021-11-29 18:21:49 +00:00
9ee448b377 Removes direct GL calls from Atlas bandbox drawing.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4300
This was SVN commit r25960.
2021-10-11 11:30:50 +00:00
0e599a3176 Moves cursor to VideoMode to draw it via SDL.
It removes the software implementation intentionally. Because it
duplicates SDL functionality. But it might be added in future on demand.

Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4278
This was SVN commit r25936.
2021-09-21 22:44:46 +00:00
96708cc6a5 Adds header for forward declarations of CStr.
This was SVN commit r25905.
2021-09-09 17:39:08 +00:00
dd90dbf8b5 Allow to enable Cartography at the start of a match.
Adds a checkbox to the game setup to allow players to have Cartography
autoresearched from the start of the match.
Refs.
https://wildfiregames.com/forum/topic/27265-theres-any-mod-so-you-can-see-what-your-allies-see-from-the-start.

Patch by: @Jammyjamjamman
Differential revision: https://code.wildfiregames.com/D4191
Reviewed by: @Angen
Comments by: @andy5995, @Langbart
This was SVN commit r25869.
2021-08-28 06:15:36 +00:00
dddaa67abd Fix unicode build for Atlas on OpenSuse.
Based on a patch by: @MatSharrow
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D4178
This was SVN commit r25815.
2021-06-29 12:41:31 +00:00
63c1347ef7 Removes windows enumeration on Windows to retrieve HWND taking it from SDL and wxWidgets.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4064
This was SVN commit r25709.
2021-06-06 15:31:55 +00:00
2c3a49734c Removes ShaderProgram from MiniMap header, removes unnecessary members, removes useless scissoring.
This was SVN commit r25631.
2021-06-01 21:37:14 +00:00
7ce4552f5e Moves partially MiniMap texture rendering into a separate object.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4045
This was SVN commit r25628.
2021-06-01 18:55:35 +00:00
5ff4fa19c0 Removes unused and outdated includes, replaces some includes by forward declarations.
This was SVN commit r25444.
2021-05-15 17:27:01 +00:00
4f972bc623 Split off JSON-related function from ScriptInterface, clean up headers.
Follows 34b1920e7b.

JSON functions and ToString are movec to their own headers.
Also clean out a few PersistentRooted usage to use the 2-phase init to
clean up scriptInterface usage.

With these functions split off, we can finally clean out headers and
remove ScriptInterface.h from most of them, in favour of smaller and
more precise headers.


Take the opportunity to clarify some comments regarding Mutability.

Differential Revision: https://code.wildfiregames.com/D3961
This was SVN commit r25434.
2021-05-14 10:18:03 +00:00
0f60bf3a97 Split off Object-related functions from ScriptInterface
Follows 34b1920e7b.

This splits off the object-related functions, such as
[Set/Get/Has]Property, CreateObject, CreateArray, FreezeObject.

It also puts the definitions in the header itself, which might end up
with faster code here & there, though perhaps slower compilation time
(somewhat doubtful since we already included most things anyways).

Differential Revision: https://code.wildfiregames.com/D3956
This was SVN commit r25430.
2021-05-13 17:23:52 +00:00
6fbf036ae4 Split off StructuredClone from ScriptInterface
Follows 34b1920e7b.

This separates StructuredClone & DeepCopy logic into its own header,
reducing the size of the monolithic ScriptInterface header.

Differential Revision: https://code.wildfiregames.com/D3922
This was SVN commit r25419.
2021-05-10 11:51:32 +00:00
c9a7aabbea Fix enabling / disabling shadows in the actor viewer.
Differential Revision: https://code.wildfiregames.com/D3896
This was SVN commit r25334.
2021-04-28 11:09:16 +00:00
e90aaf6348 Adds line drawing to DebugRenderer.
This was SVN commit r25314.
2021-04-25 20:48:44 +00:00