This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::Splash Class

Interface for splash screens rendering.This set of functions controls the settings of the splash screen. Demonstration of it gives Unigine the time to load all world and compile shaders. Splash screen is a two-part texture, gradually transitioning from the upper part to the lower one by alpha channel steps.

To use this class, include the UnigineSplash.h file.

Unigine::Splash Class

Members


virtual ~Splash ()

Virtual destructor.

static Splash * get ()

Return a pointer to the existing Splash.

Return value

Pointer to the existing splash.

virtual void setColor (const vec4 & color) const =0

Sets the color of the text LOADING on the black background. This text is displayed, when a splash screen being called is cleared.

Arguments

  • const vec4 & color - Text color.

virtual void setSplash (const char * name, int threshold) const =0

Sets basic properties of a custom splash screen. This splash screen can be called from the script any time you need it. The splash screen can is a two-part texture.

Arguments

  • const char * name - Name of the file with the custom splash screen. If NULL (0) is passed, the splash screen is cleared.
  • int threshold - Amount of blur in the alpha channel when interpolating between states of the splash screen. This is an optional parameter; if it is not passed, 0 will be used instead.

virtual void setSplashImage (const ImagePtr & image, int threshold) const =0

Sets an image for a custom splash screen. This splash screen can be called from the script any time you need it. The splash screen is a two-part texture shown according to the threshold.

Arguments

  • const ImagePtr & image - Image smart pointer to an image to be used as a custom splash screen.
  • int threshold - Amount of blur in the alpha channel when interpolating between states of the splash screen. This is an optional parameter; if it is not passed, 0 will be used instead.

virtual void setSplashTransform (const vec4 & transform) const =0

Sets transformation of the splash.

Arguments

  • const vec4 & transform - Transformation of the splash.

virtual void setSplashBackground (const vec4 & color) const =0

Sets the background color of the splash screen.

Arguments

  • const vec4 & color - Color.

virtual void setSplashText (const char * string) const =0

Sets the text of the splash screen.

Arguments

  • const char * string - Text of the splash screen.

virtual void setSystem (const char * name, int threshold) const =0

Sets basic properties of a system splash screen, which is displayed while resources like shaders and materials are being loaded on the engine start-up. The splash screen is a two-part texture.

Arguments

  • const char * name - Name of the file with the system splash screen. If NULL (0) is passed, the splash screen is cleared.
  • int threshold - Amount of blur in the alpha channel when interpolating between states of the splash screen. This is an optional parameter; if it is not passed, 0 will be used instead.

virtual void setSystemImage (const ImagePtr & image, int threshold) const =0

Sets an image for a system splash screen, which is displayed while resources like shaders and materials are being loaded on the engine start-up. The splash screen is a two-part texture shown according to the threshold.

Arguments

  • const ImagePtr & image - Image smart pointer to an image to be used as a custom splash screen.
  • int threshold - Amount of blur in the alpha channel when interpolating between states of the splash screen. This is an optional parameter; if it is not passed, 0 will be used instead.

virtual void setSystemTransform (const vec4 & transform) const =0

Sets transformation of the system splash.

Arguments

  • const vec4 & transform - Transformation of the system splash.

virtual void setSystemBackground (const vec4 & color) const =0

Sets the background color of the system splash screen.

Arguments

  • const vec4 & color - Color.

virtual void setSystemText (const char * string) const =0

Sets the text of the system splash screen.

Arguments

  • const char * string - Text of the system splash screen.

virtual void setWorld (const char * name, int threshold) const =0

Sets basic properties of a world splash screen, which is displayed while the world is being loaded. The splash screen is a two-part texture. If NULL is set for a splash screen texture, LOADING text will be shown instead.

Arguments

  • const char * name - Name of the file with the world splash screen. If NULL (0) is passed, the splash screen is cleared.
  • int threshold - Amount of blur in the alpha channel when interpolating between states of the splash screen. This is an optional parameter; if it is not passed, 0 will be used instead.

virtual void setWorldImage (const ImagePtr & image, int threshold) const =0

Sets an image for a world splash screen, which is displayed while the world is being loaded. The splash screen is a two-part texture shown according to the threshold.

Arguments

  • const ImagePtr & image - Image smart pointer to an image to be used as a custom splash screen.
  • int threshold - Amount of blur in the alpha channel when interpolating between states of the splash screen. This is an optional parameter; if it is not passed, 0 will be used instead.

virtual void setWorldTransform (const vec4 & transform) const =0

Sets transformation of the world splash.

Arguments

  • const vec4 & transform - Transformation of the world splash.

virtual void setWorldBackground (const vec4 & color) const =0

Sets the background color of the world splash screen.

Arguments

  • const vec4 & color - Color.

virtual void setWorldText (const char * string) const =0

Sets the text of the world splash screen.

Arguments

  • const char * string - Text of the world splash screen

virtual void setEnabled (int enable) const =0

Specifies if manual rendering of a splash screen (on system loading, world loading or of a custom one) can be started or should be stopped. This function is used only together with corresponding render functions (engine.splash.renderSystem(), engine.splash.renderWorld() or engine.splash.renderSplash()). This function cannot be used to enable or disable rendering of a system or a world splash screen during the initialization stage of the script.

Arguments

  • int enable - 1 to enable rendering of the splash screen; 0 to disable.

virtual int isEnabled () const =0

Returns a value indicating if manual rendering of a splash screen (on system loading, world loading or of a custom one) is allowed.

Return value

1 if the rendering of the splash screen was enabled; otherwise, 0.

virtual void renderSplash (int progress) const =0

Renders a custom splash screen in a given progress state. Use this function in a loop to create a gradual change between the initial (upper opaque part) and the final states (bottom transparent part) of the splash screen texture.

Arguments

  • int progress - Progress of alpha blending between 2 splash screens stored in the texture. The value in range [0;100] sets an alpha channel threshold, according to which pixels from the initial (opaque) or final (transparent) splash screen in the texture are rendered. If the value is 0, the initial screen is loaded. If the value is 100, the final screen is loaded.

virtual void renderSystem (int progress) const =0

Renders a splash screen image, that is displayed by the system script reload, in a given progress state. Use this function in a loop to create a gradual change between the initial (upper opaque part) and the final states (bottom transparent part) of the splash screen texture.

Arguments

  • int progress - Progress of alpha blending between 2 splash screens stored in the texture. The value in range [0;100] sets an alpha channel threshold, according to which pixels from the initial (opaque) or final (transparent) parts of the texture are rendered. If the value is 0, the initial screen is loaded. If the value is 100, the final screen is loaded.

virtual void renderWorld (int progress) const =0

Renders a splash screen image, that is displayed by the world load, in a given progress state. Use this function in a loop to create a gradual change between the initial (upper opaque part) and the final states (bottom transparent part) of the splash screen texture.

Arguments

  • int progress - Progress of alpha blending between 2 splash screens stored in the texture. The value in range [0;100] sets an alpha channel threshold, according to which pixels from the initial (opaque) or final (transparent) parts of the texture are rendered. If the value is 0, the initial screen is loaded. If the value is 100, the final screen is loaded.

virtual void renderInterface () const =0

Renders a static splash screen. Such a splash screen does not display any progress.
Last update: 2017-07-03
Build: ()