view_get_surface_id


Description

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).


Syntax:

view_get_surface_id(view_port)


Arguments:

Argument Description
view_port The view port to target (0 - 7)


Returns:

Real


Example:

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.


Back: Cameras
Next: view_set_camera
© Copyright YoYo Games Ltd. 2018 All Rights Reserved