Instead query g_VideoMode where needed. As both g_xres and g_yres aren't
global anymore remove static from UpdateRenderer. While at it use more
desicriptive names: GetXRes -> GetWindowWidth, GetYRes ->
GetWindowHeight.
This reduces the amount of variables tracking width and height by one
each.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
We can render the game only with shaders so we don't need to support
fixed function pipeline as a separate render path. We only need to know
when to warn a user.
Fixes#6244
Only used for hw-report and only when using GLX which is for X11 only.
The usefulness of those reported properties is questionable and X11 is
becoming rarer.
This allows us to drop a direct dependency on X11 delegating the
handling to SDL and wxWidgets respectively GTK.
Further SDL3 wont expose supported video driver at compile time making
this step more meaningful.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
We need to check for storage support because we outpout result into a
storage. Note: it seems we might have a bug inside GL backend or inside
Mesa drivers which prevents us from running resolve on compute.
I forgot to finish CSubmitScheduler synchronization in
7c84c23114. Even ++m_FrameID was
forgotten. And it worked at the time. A proper synchronization is
described in renderer/backend/Vulkan/SwapChain.h.
Now we should use material passes instead of context and defines to
select a needed shader. It allows us to reduce the number of
shader combinations we use and reduce memory consumption.
We were unnecessary passing all combinations of our scene shader context
even if we don't need it as for shadows and silhouettes for terrain
rendering. Since we only need to draw a solid color.
This patch splits "cutscene mode" (disabling silhouttes, territory
borders and other visual overlays) from the cinema manager component
and moves it to the renderer, since it doesn't influence the simulation
anyway. The mode can now be independently controlled by the GUI. This
is done so it can also be used for other narrative elements like speech
or dialogue in the future. Cutscene mode is still always enabled while
cinema paths are playing, though.
By design, this also fixes the issue that range overlays weren't hidden
during cutscene mode.
ARB is a legacy backend which uses old assembly shaders. It makes
writing shaders more complex. According to the stats
https://feedback.wildfiregames.com we small amount of players with
ARB.
Fixes#8533
It's better to construct a js-array from a `JS::RootedValueVector`.
Because it is more strongly typed and the index doesn't has to be
specified when appending an element.
Some usages are replaced with `JS::RootedValueArray`.
Fixes: #8702
Currently CRenderingOptions are initialized only once on the application
start. It means changed m_GPUSkinning wasn't reset on the switch to Atlas.
Fixes#8596
Currently we always choose the best device. But it's not always
desirable. A more safe approach is to use the default device (with
index 0). The only downside of that is if a user didn't adjust
settings then the game might run on an integrated GPU instead of a
discrete one. In the future it'll be solved by selecting GPU in
options: #8529Fixes#8455
Now it's possible to destroy the old swapchain before creating a new
one. It might make the swapchain creation a bit slower but with a
lower memory peak.