OpenGL’s glViewport vs Metal’s setViewport

As mentioned in the previous post, clipping happens after the vertex gets transformed into NDC space, and in OpenGL this is defined as 2x2x2 cube, while in Metal this is defined as a 2x2x1 cube. I had some trouble with enabling depth test due to my setting with setViewport in Metal. Going back to OpenGL, Read more about OpenGL’s glViewport vs Metal’s setViewport[…]

Metal API, vertex interleaved buffer

Haven’t updated my blog for years, here’s a new beginning. Started playing around with Apple’s Metal API recently, and found a lack of information on vertex interleaved buffer, so I thought I could write a post about this helping others who also had issues using an interleaved buffer. As to why I want an interleaved Read more about Metal API, vertex interleaved buffer[…]