surface_set_target_ext

此函数与 着色器函数 配合使用,并为原生级别着色器 (OpenGL ES、OpenGL、DX9、DX11) 设置 MRT(0 - 3)。

注意 如果您之前没有使用函数 surface_set_target 设置渲染目标,则使用此函数将静默 (即没有任何错误消息) 结束该函数的所有进一步代码执行事件。

注意HTML5 不支持 MRT。

 

语法:

surface_set_target_ext(index, surface_id);

参数类型描述
indexReal要使用的渲染目标索引(从0到3 )。
surface_idSurface要使用的表面。

 

返回:

Boolean Whether the render target was set successfully

 

例子:

surface_set_target_ext(0, surf);

上述代码将渲染目标 0 设置为存储在变量 surf 中的表面。