Fix metal not getting drawable correctly
This commit is contained in:
parent
9b507aa79a
commit
477ea95905
2 changed files with 3 additions and 6 deletions
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
Reference in a new issue