Archived
1
Fork 0

Fix metal not getting drawable correctly

This commit is contained in:
Joshua Goins 2022-02-21 12:07:16 -05:00
parent 9b507aa79a
commit 477ea95905
2 changed files with 3 additions and 6 deletions

View file

@ -81,7 +81,7 @@ MTL::SamplerAddressMode toSamplingMode(SamplingMode mode) {
}
#if !defined(PLATFORM_IOS) && !defined(PLATFORM_TVOS)
MTL::SamplerBorderColor toBorderColor(GFXBorderColor color) {
inline MTL::SamplerBorderColor toBorderColor(GFXBorderColor color) {
switch(color) {
case GFXBorderColor::OpaqueWhite:
return MTL::SamplerBorderColorOpaqueWhite;
@ -720,8 +720,7 @@ void GFXMetal::submit(GFXCommandBuffer* command_buffer, const platform::window_p
CA::MetalDrawable* drawable = nullptr;
if(native != nullptr) {
auto next_drawable = (metal_next_image*)platform::get_next_image(window);
drawable = next_drawable->next_drawable;
drawable = (metal_next_image)platform::get_next_image(window);
}
MTL::CommandBuffer* commandBuffer = command_queue->commandBuffer();

View file

@ -111,9 +111,7 @@ struct metal_surface {
MTL::PixelFormat format;
};
struct metal_next_image {
CA::MetalDrawable* next_drawable;
};
using metal_next_image = CA::MetalDrawable*;
#endif
namespace platform {