mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
hwr2: Only upload lighttable if currently valid
This commit is contained in:
parent
99bc417978
commit
6d94de494e
1 changed files with 5 additions and 2 deletions
|
|
@ -181,8 +181,11 @@ void MainPaletteManager::upload_palette(Rhi& rhi, Handle<TransferContext> ctx)
|
|||
|
||||
void MainPaletteManager::upload_lighttables(Rhi& rhi, Handle<TransferContext> ctx)
|
||||
{
|
||||
tcb::span<const std::byte> colormap_bytes = tcb::as_bytes(tcb::span(colormaps, kPaletteSize * kLighttableRows));
|
||||
rhi.update_texture(ctx, lighttable_, {0, 0, kPaletteSize, kLighttableRows}, PixelFormat::kR8, colormap_bytes);
|
||||
if (colormaps != nullptr)
|
||||
{
|
||||
tcb::span<const std::byte> colormap_bytes = tcb::as_bytes(tcb::span(colormaps, kPaletteSize * kLighttableRows));
|
||||
rhi.update_texture(ctx, lighttable_, {0, 0, kPaletteSize, kLighttableRows}, PixelFormat::kR8, colormap_bytes);
|
||||
}
|
||||
|
||||
if (encoremap != nullptr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue