Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RB_ASSUME_NONNULL_BEGIN
@property NSUInteger backgroundGPUPriority;

/* class methods */
+ (nullable instancetype)sharedDefaultDevice;
+ (nullable instancetype)sharedDefaultDevice RB_SWIFT_NAME(sharedDefault());
+ (NSArray<RBDevice *> *)allDevices;
+ (BOOL)isSupported;
+ (void)setAllowsRenderingInBackground:(BOOL)background;
Expand All @@ -37,20 +37,26 @@ RB_ASSUME_NONNULL_BEGIN
+ (BOOL)isRunningInBackground;
+ (void)setDefaultBackgroundGPUPriority:(NSUInteger)gpupriority;
+ (void)setDefaultGPUPriority:(NSUInteger)gpupriority;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device;
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device RB_SWIFT_NAME(sharedDevice(_:));
#if TARGET_OS_OSX
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display RB_SWIFT_NAME(sharedDevice(forDisplay:));
#endif

/* instance methods */
- (void)dealloc;
- (instancetype)initWithDevice:(id<MTLDevice>)device;
- (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer;
- (void)collectResources;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;

@end

@interface RBDevice (RBShader)

- (void)compileShader:(RBShader *)shader
completionQueue:(nullable dispatch_queue_t)queue
handler:(void (^ _Nullable)(NSError *_Nullable error))handler;
- (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;
- (BOOL)compileShader:(RBShader *)shader error:(NSError * _Nullable * _Nullable)error;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RB_ASSUME_NONNULL_BEGIN
@property NSUInteger backgroundGPUPriority;

/* class methods */
+ (nullable instancetype)sharedDefaultDevice;
+ (nullable instancetype)sharedDefaultDevice RB_SWIFT_NAME(sharedDefault());
+ (NSArray<RBDevice *> *)allDevices;
+ (BOOL)isSupported;
+ (void)setAllowsRenderingInBackground:(BOOL)background;
Expand All @@ -37,20 +37,26 @@ RB_ASSUME_NONNULL_BEGIN
+ (BOOL)isRunningInBackground;
+ (void)setDefaultBackgroundGPUPriority:(NSUInteger)gpupriority;
+ (void)setDefaultGPUPriority:(NSUInteger)gpupriority;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device;
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device RB_SWIFT_NAME(sharedDevice(_:));
#if TARGET_OS_OSX
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display RB_SWIFT_NAME(sharedDevice(forDisplay:));
#endif

/* instance methods */
- (void)dealloc;
- (instancetype)initWithDevice:(id<MTLDevice>)device;
- (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer;
- (void)collectResources;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;

@end

@interface RBDevice (RBShader)

- (void)compileShader:(RBShader *)shader
completionQueue:(nullable dispatch_queue_t)queue
handler:(void (^ _Nullable)(NSError *_Nullable error))handler;
- (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;
- (BOOL)compileShader:(RBShader *)shader error:(NSError * _Nullable * _Nullable)error;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RB_ASSUME_NONNULL_BEGIN
@property NSUInteger backgroundGPUPriority;

/* class methods */
+ (nullable instancetype)sharedDefaultDevice;
+ (nullable instancetype)sharedDefaultDevice RB_SWIFT_NAME(sharedDefault());
+ (NSArray<RBDevice *> *)allDevices;
+ (BOOL)isSupported;
+ (void)setAllowsRenderingInBackground:(BOOL)background;
Expand All @@ -37,20 +37,26 @@ RB_ASSUME_NONNULL_BEGIN
+ (BOOL)isRunningInBackground;
+ (void)setDefaultBackgroundGPUPriority:(NSUInteger)gpupriority;
+ (void)setDefaultGPUPriority:(NSUInteger)gpupriority;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device;
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device RB_SWIFT_NAME(sharedDevice(_:));
#if TARGET_OS_OSX
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display RB_SWIFT_NAME(sharedDevice(forDisplay:));
#endif

/* instance methods */
- (void)dealloc;
- (instancetype)initWithDevice:(id<MTLDevice>)device;
- (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer;
- (void)collectResources;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;

@end

@interface RBDevice (RBShader)

- (void)compileShader:(RBShader *)shader
completionQueue:(nullable dispatch_queue_t)queue
handler:(void (^ _Nullable)(NSError *_Nullable error))handler;
- (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;
- (BOOL)compileShader:(RBShader *)shader error:(NSError * _Nullable * _Nullable)error;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RB_ASSUME_NONNULL_BEGIN
@property NSUInteger backgroundGPUPriority;

/* class methods */
+ (nullable instancetype)sharedDefaultDevice;
+ (nullable instancetype)sharedDefaultDevice RB_SWIFT_NAME(sharedDefault());
+ (NSArray<RBDevice *> *)allDevices;
+ (BOOL)isSupported;
+ (void)setAllowsRenderingInBackground:(BOOL)background;
Expand All @@ -37,20 +37,26 @@ RB_ASSUME_NONNULL_BEGIN
+ (BOOL)isRunningInBackground;
+ (void)setDefaultBackgroundGPUPriority:(NSUInteger)gpupriority;
+ (void)setDefaultGPUPriority:(NSUInteger)gpupriority;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device;
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device RB_SWIFT_NAME(sharedDevice(_:));
#if TARGET_OS_OSX
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display RB_SWIFT_NAME(sharedDevice(forDisplay:));
#endif

/* instance methods */
- (void)dealloc;
- (instancetype)initWithDevice:(id<MTLDevice>)device;
- (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer;
- (void)collectResources;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;

@end

@interface RBDevice (RBShader)

- (void)compileShader:(RBShader *)shader
completionQueue:(nullable dispatch_queue_t)queue
handler:(void (^ _Nullable)(NSError *_Nullable error))handler;
- (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;
- (BOOL)compileShader:(RBShader *)shader error:(NSError * _Nullable * _Nullable)error;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RB_ASSUME_NONNULL_BEGIN
@property NSUInteger backgroundGPUPriority;

/* class methods */
+ (nullable instancetype)sharedDefaultDevice;
+ (nullable instancetype)sharedDefaultDevice RB_SWIFT_NAME(sharedDefault());
+ (NSArray<RBDevice *> *)allDevices;
+ (BOOL)isSupported;
+ (void)setAllowsRenderingInBackground:(BOOL)background;
Expand All @@ -37,20 +37,26 @@ RB_ASSUME_NONNULL_BEGIN
+ (BOOL)isRunningInBackground;
+ (void)setDefaultBackgroundGPUPriority:(NSUInteger)gpupriority;
+ (void)setDefaultGPUPriority:(NSUInteger)gpupriority;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device;
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device RB_SWIFT_NAME(sharedDevice(_:));
#if TARGET_OS_OSX
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display RB_SWIFT_NAME(sharedDevice(forDisplay:));
#endif

/* instance methods */
- (void)dealloc;
- (instancetype)initWithDevice:(id<MTLDevice>)device;
- (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer;
- (void)collectResources;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;

@end

@interface RBDevice (RBShader)

- (void)compileShader:(RBShader *)shader
completionQueue:(nullable dispatch_queue_t)queue
handler:(void (^ _Nullable)(NSError *_Nullable error))handler;
- (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;
- (BOOL)compileShader:(RBShader *)shader error:(NSError * _Nullable * _Nullable)error;

@end

Expand Down
20 changes: 13 additions & 7 deletions RB/2024/Sources/Headers/RBDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RB_ASSUME_NONNULL_BEGIN
@property NSUInteger backgroundGPUPriority;

/* class methods */
+ (nullable instancetype)sharedDefaultDevice;
+ (nullable instancetype)sharedDefaultDevice RB_SWIFT_NAME(sharedDefault());
+ (NSArray<RBDevice *> *)allDevices;
+ (BOOL)isSupported;
+ (void)setAllowsRenderingInBackground:(BOOL)background;
Expand All @@ -37,20 +37,26 @@ RB_ASSUME_NONNULL_BEGIN
+ (BOOL)isRunningInBackground;
+ (void)setDefaultBackgroundGPUPriority:(NSUInteger)gpupriority;
+ (void)setDefaultGPUPriority:(NSUInteger)gpupriority;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device;
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display;
+ (nullable instancetype)sharedDevice:(id<MTLDevice>)device RB_SWIFT_NAME(sharedDevice(_:));
#if TARGET_OS_OSX
+ (nullable instancetype)sharedDeviceForDisplay:(unsigned int)display RB_SWIFT_NAME(sharedDevice(forDisplay:));
#endif

/* instance methods */
- (void)dealloc;
- (instancetype)initWithDevice:(id<MTLDevice>)device;
- (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer;
- (void)collectResources;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;

@end

@interface RBDevice (RBShader)

- (void)compileShader:(RBShader *)shader
completionQueue:(nullable dispatch_queue_t)queue
handler:(void (^ _Nullable)(NSError *_Nullable error))handler;
- (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error;
- (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats;
- (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler;
- (BOOL)compileShader:(RBShader *)shader error:(NSError * _Nullable * _Nullable)error;

@end

Expand Down
Loading