this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix MTKView, add device and clearColor

Thomas A e1a8af96 e7cd0ed1

+40 -2
+10
src/frameworks/Metal/include/Metal/MTLRenderPass.h
··· 1 + #import <Foundation/Foundation.h> 2 + 3 + typedef struct { 4 + double red; 5 + double green; 6 + double blue; 7 + double alpha; 8 + } MTLClearColor; 9 + 10 + MTLClearColor MTLClearColorMake(double red, double green, double blue, double alpha);
+1
src/frameworks/Metal/include/Metal/Metal.h
··· 142 142 #import <Metal/MTLCommandQueue.h> 143 143 #import <Metal/MTLTexture.h> 144 144 #import <Metal/MTLPixelFormat.h> 145 + #import <Metal/MTLRenderPass.h>
+6
src/frameworks/Metal/src/MTLRenderPass.m
··· 1 + #import <Metal/MTLRenderPass.m> 2 + 3 + MTLClearColor MTLClearColorMake(double red, double green, double blue, double alpha) { 4 + MTLClearColor item = { red, green, blue, alpha, }; 5 + return item; 6 + }
+1
src/frameworks/MetalKit/CMakeLists.txt
··· 31 31 src/MTKView.m 32 32 33 33 DEPENDENCIES 34 + AppKit 34 35 system 35 36 objc 36 37 Foundation
+19 -2
src/frameworks/MetalKit/include/MetalKit/MTKView.h
··· 17 17 along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 18 */ 19 19 20 - #include <Foundation/Foundation.h> 20 + #if TARGET_OS_IPHONE 21 + // #import <IOKit/IOKit.h> 22 + // #define View UIView 23 + #else // TARGET_OS_OSX 24 + #import <AppKit/AppKit.h> 25 + #define View NSView 26 + #endif 27 + 28 + #import <CoreGraphics/CoreGraphics.h> 29 + #import <Foundation/Foundation.h> 30 + #import <Metal/Metal.h> 31 + 21 32 22 - @interface MTKView : NSObject 33 + @interface MTKView : View { 34 + id<MTLDevice> _device; 35 + MTLClearColor _clearColor; 36 + } 37 + 38 + @property(nonatomic, retain) id<MTLDevice> device; 39 + @property(nonatomic) MTLClearColor clearColor; 23 40 24 41 @end
+3
src/frameworks/MetalKit/src/MTKView.m
··· 21 21 22 22 @implementation MTKView 23 23 24 + @synthesize device = _device; 25 + @synthesize clearColor = _clearColor; 26 + 24 27 - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector 25 28 { 26 29 return [NSMethodSignature signatureWithObjCTypes: "v@:"];