| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //
- // SignatureRenderer.h
- // HelloTriangle
- //
- // Created by Rui Zhang on 4/27/23.
- // Copyright © 2023 Apple. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- @import MetalKit;
- @import simd;
- NS_ASSUME_NONNULL_BEGIN
- typedef enum AAPLVertexInputIndex
- {
- AAPLVertexInputIndexVertices = 0,
- AAPLVertexInputIndexViewportSize = 1,
- } AAPLVertexInputIndex;
- struct PPSSignaturePoint
- {
- // float vertex[2]; // 2D positions,
- // float color[4]; //RGBA colors,
-
- vector_float2 position;
- vector_float4 color;
- };
- typedef struct PPSSignaturePoint PPSSignaturePoint;
- @interface SignatureRenderer : NSObject<MTKViewDelegate>
- - (nonnull instancetype)initWithMetalKitView:(nonnull MTKView *)mtkView;
- @property PPSSignaturePoint* SignatureVertexData;
- @property int vertexTotal;
- @property (strong,nonatomic) NSMutableArray* parts;
- @end
- NS_ASSUME_NONNULL_END
|