mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-11 16:16:39 +00:00
Enforce C++17 standard compliance
This commit is contained in:
parent
66d3561fe8
commit
bd8ebabfee
3 changed files with 10 additions and 4 deletions
|
|
@ -200,6 +200,11 @@ if("${CMAKE_COMPILER_IS_GNUCC}" AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
|
|||
endif()
|
||||
|
||||
target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17)
|
||||
set_target_properties(SRB2SDL2 PROPERTIES
|
||||
CXX_STANDARD 17
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
CXX_EXTENSIONS OFF
|
||||
)
|
||||
|
||||
set(SRB2_ASM_SOURCES vid_copy.s)
|
||||
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ void TwodeeRenderer::flush(Rhi& rhi, Handle<GraphicsContext> ctx, Twodee& twodee
|
|||
else
|
||||
{
|
||||
srb2::NotNull<const PatchAtlas*> atlas = patch_atlas_cache_->find_patch(cmd.patch);
|
||||
typeof(merged_cmd.texture) atlas_index_texture = atlas->texture();
|
||||
std::optional<MergedTwodeeCommand::Texture> atlas_index_texture = atlas->texture();
|
||||
new_cmd_needed = new_cmd_needed || (merged_cmd.texture != atlas_index_texture);
|
||||
}
|
||||
|
||||
|
|
@ -411,7 +411,7 @@ void TwodeeRenderer::flush(Rhi& rhi, Handle<GraphicsContext> ctx, Twodee& twodee
|
|||
}
|
||||
else
|
||||
{
|
||||
typeof(merged_cmd.texture) flat_tex = MergedTwodeeCommandFlatTexture {cmd.flat_lump};
|
||||
std::optional<MergedTwodeeCommand::Texture> flat_tex = MergedTwodeeCommandFlatTexture {cmd.flat_lump};
|
||||
new_cmd_needed |= (merged_cmd.texture != flat_tex);
|
||||
}
|
||||
|
||||
|
|
@ -444,7 +444,7 @@ void TwodeeRenderer::flush(Rhi& rhi, Handle<GraphicsContext> ctx, Twodee& twodee
|
|||
if (cmd.flat_lump != LUMPERROR)
|
||||
{
|
||||
flat_manager_->find_or_create_indexed(rhi, ctx, cmd.flat_lump);
|
||||
typeof(the_new_one.texture) t = MergedTwodeeCommandFlatTexture {cmd.flat_lump};
|
||||
std::optional<MergedTwodeeCommand::Texture> t = MergedTwodeeCommandFlatTexture {cmd.flat_lump};
|
||||
the_new_one.texture = t;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -63,9 +63,10 @@ struct MergedTwodeeCommandFlatTexture
|
|||
|
||||
struct MergedTwodeeCommand
|
||||
{
|
||||
using Texture = std::variant<rhi::Handle<rhi::Texture>, MergedTwodeeCommandFlatTexture>;
|
||||
TwodeePipelineKey pipeline_key = {};
|
||||
rhi::Handle<rhi::BindingSet> binding_set = {};
|
||||
std::optional<std::variant<rhi::Handle<rhi::Texture>, MergedTwodeeCommandFlatTexture>> texture;
|
||||
std::optional<Texture> texture;
|
||||
const uint8_t* colormap;
|
||||
uint32_t index_offset = 0;
|
||||
uint32_t elements = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue