如何以编程方式获取最大纹理大小(宽度和高度) [英] How to get programmatically the maximum texture size (width and height)

查看:225
本文介绍了如何以编程方式获取最大纹理大小(宽度和高度)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以编程方式获得金属的最大纹理大小(宽度和高度)?使用openGL我可以做到:glGetIntegerv(GL_MAX_TEXTURE_SIZE, ...)但是如何用Metal做到这一点?

How to get programmatically the maximum texture size (width and height) with metal? with openGL i can do: glGetIntegerv(GL_MAX_TEXTURE_SIZE, ...) but how to do it with Metal ?

推荐答案

当前没有用于检索Metal设备最大纹理尺寸的API.您应该参考金属功能集表,并而是将其添加到您的应用中.

There is currently no API for retrieving the maximum texture dimensions of a Metal device. You should consult the Metal Feature Set Tables for this information and include it in your app instead.

对于运行当前版本的iOS/tvOS/iPadOS的A9和更新的GPU,2D纹理的最大大小为16384×16384.

For A9 and newer GPUs running current versions of iOS/tvOS/iPadOS, the maximum size of a 2D texture is 16384×16384.

这篇关于如何以编程方式获取最大纹理大小(宽度和高度)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆