ResourceInteractiveLoader

    Interactive loader.

    Interactive Resource loader. This object is returned by when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages.

    Returns the loaded resource if the load operation completed successfully, otherwise.


    • get_stage ( ) const

    Returns the total amount of stages (calls to poll) needed to completely load this resource.


    • poll ( )

    Polls the loading operation, i.e. loads a data chunk up to the next stage.

    Returns @GlobalScope.OK if the poll is successful but the load operation has not finished yet (intermediate stage). This means will have to be called again until the last stage is completed.

    Returns another Error code if the poll has failed.


    • wait ( )

    Polls the loading operation successively until the resource is completely loaded or a poll fails.

    Returns if the load operation has completed successfully. The loaded resource can be obtained by calling get_resource.