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)
| Argument | Description |
|---|---|
| view_port | The view port to target (0 - 7) |
Real
if view_get_surface_id(0) == -1
{
view_set_surface_id(0, global.vSurf);
}
The above code will check to see if a surface has been assigned to the view port[0] and if it has not then one is assigned.