// // Renderer.h // KDE // // Created by Ronja Enseleit on 01.07.23. // #import #include "../cpp/Gfx.h" #include "../cpp/StringRepository.h" // Our platform independent renderer class. Implements the MTKViewDelegate protocol which // allows it to accept per-frame update and drawable resize callbacks. @interface MetalViewDelegate : NSObject -(nonnull instancetype)initWithMetalKitView:(nonnull MTKView *)view; -(void)pushRect:(KDERect)rect withTexture:(KDEStringHandle)texture; -(void)pushRect:(KDERect)rect withFont:(KDEStringHandle)font withCharHeight:(float)char_height withKey:(KDEStringHandle)key; -(nonnull id)createTexture:(nonnull const void*)data width:(unsigned int)width height:(unsigned int)height format:(MTLPixelFormat)format; @end