MaplyGeomModelGPUInstance
Objective-C
@interface MaplyGeomModelGPUInstance : NSObject
Swift
class MaplyGeomModelGPUInstance : NSObject
Sometimes we don’t know how many instances there will be of a model until some logic runs on the GPU. We can then take that number and run that number of instances of the given model. [Metal only]
-
The model to instance
Declaration
Objective-C
@property (nonatomic, strong, nullable) MaplyGeomModel *model;
Swift
var model: MaplyGeomModel? { get set }
-
Texture to derive the number of instances from (picked out of the highest, smallest level)
Declaration
Objective-C
@property (nonatomic, nullable) MaplyTexture *numInstSource;
Swift
var numInstSource: MaplyTexture? { get set }
-
Need a shader to pull the number of instances out of a texture and shove them in the indirect buffer
Declaration
Objective-C
@property (nonatomic, nullable) MaplyShader *numInstShader;
Swift
var numInstShader: MaplyShader? { get set }
-
Shader to run over for this instance
Declaration
Objective-C
@property (nonatomic, nullable) MaplyShader *shader;
Swift
var shader: MaplyShader? { get set }