With this variable you can set the contents of a view port to draw to a surface. When working with surfaces, it is often required that capture the whole visible region of the screen to the surface, and so you would assign it to a view port using this function. This means that everything that is shown in the chosen port view will now be drawn to the assigned surface and the contents of that view port will no longer be displayed, meaning that you will need to either:
- 启用一个新的视野，在新视野中绘制表面（使用 view_current 检测正在绘制哪个视野）。
When using this function you give the view port index (from 0 to 7) and a surface index (either the application_surface or the unique index value returned by the function surface_create) or, if a surface has previously been assigned and you want to remove it, a value of -1. For further information on setting the view port to a surface see also the variable view_surface_id.
参数 描述 view_port The view port to target (0 - 7)
if view_get_surface_id(0) == -1