glDrawPixels equalent for Metal API

34 views Asked by At

I wanna draw a pixel buffer directly on the screen with the Apple Metal API.

in OpenGL I can use glDrawPixels

how to do it in Metal?

Is it only possible to draw my buffer on a texture and than render it with two triangles?

It would be nice to have C/C++ code

1

There are 1 answers

0
Spo1ler On

There isn't a glDrawPixels in Metal, so you would need to actually create a render pipeline, a render target, command queue, buffers and the encoder and then draw the triangles.

And in my opinion, nobody should be using glDrawPixels anyway.