From b4963acab8d4031d1bdee54aeed0bcdbf6ccd34b Mon Sep 17 00:00:00 2001 From: melonman <3318004856@qq.com> Date: Sat, 12 Feb 2022 16:45:29 +0800 Subject: WebGL_best_practices Untranslated paragraph (#4102) --- files/zh-cn/web/api/webgl_api/webgl_best_practices/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/zh-cn/web/api/webgl_api/webgl_best_practices/index.html b/files/zh-cn/web/api/webgl_api/webgl_best_practices/index.html index 65072d91a0..17e5c7816b 100644 --- a/files/zh-cn/web/api/webgl_api/webgl_best_practices/index.html +++ b/files/zh-cn/web/api/webgl_api/webgl_best_practices/index.html @@ -20,11 +20,11 @@ translation_of: Web/API/WebGL_API/WebGL_best_practices
getParameter()
function to determine what values are supported on the client. For example, the maximum size of a 2D texture is given by webgl.getParameter(webgl.MAX_TEXTURE_SIZE)
. Starting in Firefox 10, the webgl.min_capability_mode
preference allows simulating minimal values for these capabilities, to test portability.webgl.getParameter(webgl.MAX_VERTEX_TEXTURE_IMAGE_UNITS)
is greater than zero. Typically, this fails on current mobile hardware.webgl.disable-extensions
preference allows simulating the absence of all extensions, to test portability.OES_texture_float
extension is supported. Typically, this fails on current mobile hardware. To check if this is supported, you have to call the WebGL checkFramebufferStatus()
function.getParameter()
方法,获取此类参数的范围,这些数据反映了你的客户端能够支持的真实应用范围。例如,使用 webgl.getParameter(webgl.MAX_TEXTURE_SIZE)
可以查询设备上支持的最大的2D纹理尺寸。从Firefox 10开始,WebGL 属性 webgl.min_capability_mode
则可以被用来测试最小性能模式下的实际表现,以测试可移植性。webgl.getParameter(webgl.MAX_VERTEX_TEXTURE_IMAGE_UNITS)
大于零时,才能使用vertex shaders中的纹理。然而,目前的移动硬件上是不支持的 (译者:待确认文档时效性)。webgl.disable-extensions
允许模拟列出哪些扩展是不支持的,以测试可移植性。OES_texture_float
扩展,也可能不支持渲染浮点类型数据的纹理。 通常,这在当前的移动硬件上是不支持的 (译者:待确认文档时效性)。 要检查是否支持浮点类型数据,必须调用 checkFramebufferStatus()
来验证.