|
|
@ -84,12 +84,12 @@ static inline CFTimeInterval GetMachAbsoluteTimeInSeconds() { return s |
|
|
|
|
|
|
|
bool ImGui_ImplMetal_Init(MTL::Device* device) |
|
|
|
{ |
|
|
|
return ImGui_ImplMetal_Init((id<MTLDevice>)(device)); |
|
|
|
return ImGui_ImplMetal_Init((__bridge id<MTLDevice>)(device)); |
|
|
|
} |
|
|
|
|
|
|
|
void ImGui_ImplMetal_NewFrame(MTL::RenderPassDescriptor* renderPassDescriptor) |
|
|
|
{ |
|
|
|
ImGui_ImplMetal_NewFrame((MTLRenderPassDescriptor*)(renderPassDescriptor)); |
|
|
|
ImGui_ImplMetal_NewFrame((__bridge MTLRenderPassDescriptor*)(renderPassDescriptor)); |
|
|
|
} |
|
|
|
|
|
|
|
void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data, |
|
|
@ -97,19 +97,19 @@ void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data, |
|
|
|
MTL::RenderCommandEncoder* commandEncoder) |
|
|
|
{ |
|
|
|
ImGui_ImplMetal_RenderDrawData(draw_data, |
|
|
|
(id<MTLCommandBuffer>)(commandBuffer), |
|
|
|
(id<MTLRenderCommandEncoder>)(commandEncoder)); |
|
|
|
(__bridge id<MTLCommandBuffer>)(commandBuffer), |
|
|
|
(__bridge id<MTLRenderCommandEncoder>)(commandEncoder)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bool ImGui_ImplMetal_CreateFontsTexture(MTL::Device* device) |
|
|
|
{ |
|
|
|
return ImGui_ImplMetal_CreateFontsTexture((id<MTLDevice>)(device)); |
|
|
|
return ImGui_ImplMetal_CreateFontsTexture((__bridge id<MTLDevice>)(device)); |
|
|
|
} |
|
|
|
|
|
|
|
bool ImGui_ImplMetal_CreateDeviceObjects(MTL::Device* device) |
|
|
|
{ |
|
|
|
return ImGui_ImplMetal_CreateDeviceObjects((id<MTLDevice>)(device)); |
|
|
|
return ImGui_ImplMetal_CreateDeviceObjects((__bridge id<MTLDevice>)(device)); |
|
|
|
} |
|
|
|
|
|
|
|
#endif // #ifdef IMGUI_IMPL_METAL_CPP |
|
|
@ -429,8 +429,8 @@ void ImGui_ImplMetal_DestroyDeviceObjects() |
|
|
|
{ |
|
|
|
if ((self = [super init])) |
|
|
|
{ |
|
|
|
_renderPipelineStateCache = [NSMutableDictionary dictionary]; |
|
|
|
_bufferCache = [NSMutableArray array]; |
|
|
|
self.renderPipelineStateCache = [NSMutableDictionary dictionary]; |
|
|
|
self.bufferCache = [NSMutableArray array]; |
|
|
|
_lastBufferCachePurge = GetMachAbsoluteTimeInSeconds(); |
|
|
|
} |
|
|
|
return self; |
|
|
|