Questions tagged [metalkit]

Use this tag for questions MetalKit, a framework that provides functions and classes intended to reduce the effort required to create a Metal application. Consider using a more specific tag such as [mtkview] or [mtktextureloader].

MetalKit is a framework that first appeared in iOS 9 and OS X El Capitan. It provides functions and classes intended to reduce the effort required to create a Metal application.

The following functions are the three key areas MetalKit provides:

  • Texture Loading enables your application to load textures from various sources easily. Loading of textures can be achieved in an asynchronous way with only a few lines of code. For more information, please see the MTKTextureLoader Class Reference.
  • Model Handling enables Metal-specific functionality to easily interface with Model I/O assets; these highly-optimized functions and objects make up of a collection that enables efficient data transfer between Metal buffers and Model I/O.
  • View Management provides a standard implementation of a Metal view and an optional drawing delegate, which reduce greatly the amount of code needed to generate graphics rendering in Metal app. For more information, please see the MTKView Class Reference and MTKViewDelegate Protocol Reference.

This tag is appropriate for general questions about MetalKit. Specific questions about any of the aformentioned functions should use a more specific tag instead, such as or .

400 questions
-1
votes
3 answers

CIFilter color cube data loading

I have around 50 3D LUTs (stored as png images, each being 900KB in size) and use CIColorCube filter to generate a filtered image. I use UICollectionView to display filtered thumbnails (100x100) for each LUT (like in Photos app). The problem is…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
-1
votes
1 answer

Detecting GPU family 3 on iOS reliably at run time

I was using this function to detect A9 device or higher in the code: public static var gpuFamily3AndHigh:Bool = { return ARConfiguration.isSupported //Hack to know A9 or more } But now Apple is rejecting the code since the app has no…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
-1
votes
1 answer

Is the MetalKit framework available for 32 bit apps?

Is the MetalKit framework available for 32 bit apps on macOS? When I try to open it from a 32 bit app I receive: dlopen(/System/Library/Frameworks/MetalKit.framework/MetalKit, 1): no suitable image found. Did find: …
zeus
  • 12,173
  • 9
  • 63
  • 184
-1
votes
1 answer

why sending RGBA data in a BGRA pipelineDescriptor work?

My MTKView is in BGRA and I setup my pipelineDescriptor in BGRA like below : pipelineDescriptor.colorAttachments.objectAtIndexedSubscript(0).setPixelFormat(MTLPixelFormatBGRA8Unorm); now the problem is that if I send data encoded in RGBA (I mean…
zeus
  • 12,173
  • 9
  • 63
  • 184
-1
votes
1 answer

How to use MTKTextureLoader newTextureWithContentsOfURL to retrieve an image from the web?

Is it possible to use MTKTextureLoader.newTextureWithContentsOfURL to retrieve an image from the web (e.g. https://i.stack.imgur.com/EwPfY.jpg?s=48&g=1)? I tried but I didn't succeed, so maybe I did something wrong.
zeus
  • 12,173
  • 9
  • 63
  • 184
-1
votes
1 answer

Reverted PNG Textures with Metal, when compiled with Macos SDK 10.14

I have a very strange problem, which I did not find mentioned anywhere. My company develops plugins for various hosts. Right now we are trying to move our OpenGL code to Metal. I tried with some of hosts (Like Logic and Cubase), and, it worked. Here…
Iron-Eagle
  • 1,707
  • 2
  • 17
  • 34
-1
votes
2 answers

MTKView currentRenderPassDescriptor clear color

I am drawing in an MTKView using override func draw(_ rect: CGRect) { var pixelBuffer: CVPixelBuffer? syncQueue.sync { pixelBuffer = internalPixelBuffer } guard let drawable = currentDrawable, let…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
-1
votes
1 answer

How to create custom color filters by using CoreImage or Metal Performance Shaders?

I need to create color filters based on RGBA values. It's fine for me to either Core Image or Metal Performance Shaders. Core Image providing some default filters. But I need filters with RGBA color codes. Is it possible to create filters like…
-1
votes
2 answers

Rendering 2 separate MtkView with 1 Draw call

Having two different (not overlapping each other) MtkViews running properly. Each with different Uniforms, Vertices and different Primitive Types. Already made one of both Views a combination of different pipelines rendering with one…
Ol Sen
  • 3,163
  • 2
  • 21
  • 30
-3
votes
1 answer

Rendering Vector graphics using Metal/SpriteKit

I wish to render vector shapes (CGPath) using Metal to an offscreen texture. However as I see, it is very difficult to draw thick lines using Metal which takes care of antialiasing and other issues. So it's going to involve lot of work to draw…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
1 2 3
26
27