This function can be used to retrieve the unique ID value for the surface assigned to the given view port (will return -1 if no surface has been assigned).
view_get_surface_id(view_port)
参数 描述 view_port The view port to target (0 - 7)
Real(实数)
if view_get_surface_id(0) == -1
{
view_set_surface_id(0, global.vSurf);
}
上述代码将会检查是否有表面被分配给view port[0],如果没有就分配一个。