I’m trying to add metal support to a plugin I’m writing, and the value being passed to looks like a pointer, but I’m not exactly sure at the moment… Can someone tell me how to get hold of maybe the MTLTexture* for a texture? or what this passes to my C function when used?
Managed to get my code working shortly after posting… In the IOS springboard code are a few metal types, including MTLTextureRef, which can give me access to MTLTexture… so, converted the void* to an obj-c object
OBJC_OBJECT_PTR MTLTextureRef mTexture;
mTexture = (__bridge MTLTextureRef)TexturePtr; // bridge attribute allows conversion with no refcount changes
auto w = [mTexture width]; // and other methods/properties
This has returned my texture’s width, so good start. I’m sure someone could recommend some stable cast-checks though?