mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
[mac][ios] Was: Silenced annoying deprecation warnings
pastk: removed silencing, left only minor style etc changes Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
committed by
Yannik Bloscheck
parent
c4d5109d5b
commit
9d8e84ae5a
@@ -259,10 +259,9 @@ void MetalBaseContext::Clear(uint32_t clearBits, uint32_t storeBits)
|
||||
void MetalBaseContext::SetViewport(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
|
||||
{
|
||||
id<MTLRenderCommandEncoder> encoder = GetCommandEncoder();
|
||||
[encoder setViewport:(MTLViewport){ static_cast<double>(x), static_cast<double>(y),
|
||||
static_cast<double>(w), static_cast<double>(h),
|
||||
0.0, 1.0 }];
|
||||
[encoder setScissorRect:(MTLScissorRect){ x, y, w, h }];
|
||||
[encoder setViewport:{static_cast<double>(x), static_cast<double>(y), static_cast<double>(w), static_cast<double>(h),
|
||||
0.0, 1.0}];
|
||||
[encoder setScissorRect:{x, y, w, h}];
|
||||
}
|
||||
|
||||
void MetalBaseContext::SetScissor(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
|
||||
@@ -277,7 +276,7 @@ void MetalBaseContext::SetScissor(uint32_t x, uint32_t y, uint32_t w, uint32_t h
|
||||
if (x + w > rpWidth) w = rpWidth - x;
|
||||
if (y + h > rpHeight) h = rpHeight - y;
|
||||
|
||||
[encoder setScissorRect:(MTLScissorRect){ x, y, w, h }];
|
||||
[encoder setScissorRect:{x, y, w, h}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user