I’d like to rewrite a minimal copy of a framework I’m actually using only calls to the 2d accelerated renderer only. This to prevent me to manage future problems with the eventual ditching of opengl by Apple.

It looks like I can have metal as driver for the 2d accelerated API but when I look in the docs for the render scale quality, only D3D and openGL are mentioned for the linear scaling. SDL_HINT_RENDER_SCALE_QUALITY

Does this means I can only have “nearest” when using metal or is it just some docs not up to date.


METAL_TextureData *texturedata = [[METAL_TextureData alloc] init];
if (texture->scaleMode == SDL_ScaleModeNearest) {
    texturedata.mtlsampler = data.mtlsamplernearest;
} else {
    texturedata.mtlsampler = data.mtlsamplerlinear;

scaleMode comes from:

texture->scaleMode = SDL_GetScaleMode();

…and SDL_GetScaleMode() comes directly from the hint, so it looks like the documents just need updating.