Banuba SDK
Public Member Functions | List of all members
bnb::interfaces::effect Class Referenceabstract

Public Member Functions

virtual std::string url ()=0
 Thread-safe. More...
 
virtual void call_js_method (const std::string &method_name, const std::string &params)=0
 Adds js method call to call queue. More...
 
virtual void reset ()=0
 reset effect state MUST be called from the render thread
 
virtual std::shared_ptr<::bnb::interfaces::scene > scene ()=0
 If effect is based on Scene engine and it is activated completly - returns Scene object from the effect. More...
 
virtual void deserialize (const std::string &resolved_url)=0
 deserialize effect from config.json. More...
 
virtual void activate (int32_t fx_width, int32_t fx_height, int32_t surface_width, int32_t surface_height)=0
 activate current effect MUST be called from the render thread for OpenGL backends.
 
virtual void dump_fs (const std::string &out_dir)=0
 
virtual void dump ()=0
 
virtual std::string dump_json ()=0
 

Detailed Description

Definition at line 18 of file effect.hpp.

Member Function Documentation

◆ call_js_method()

virtual void bnb::interfaces::effect::call_js_method ( const std::string &  method_name,
const std::string &  params 
)
pure virtual

Adds js method call to call queue.

Queue is performed during the draw operation. If there is an effect in loading state, all calls will be performed when the effect loading is finished. Thread-safe. May be called from any thread

Parameters
method_nameJS global function name. Member functions are not supported.
paramsFunction arguments as JSON string.

◆ deserialize()

virtual void bnb::interfaces::effect::deserialize ( const std::string &  resolved_url)
pure virtual

deserialize effect from config.json.

can be called from any thread

◆ scene()

virtual std::shared_ptr<::bnb::interfaces::scene> bnb::interfaces::effect::scene ( )
pure virtual

If effect is based on Scene engine and it is activated completly - returns Scene object from the effect.

Otherwise returns null. MUST be called from the render thread Returned Scene object MUST be used only from the render thread and only while the effect is in the activated state.

◆ url()

virtual std::string bnb::interfaces::effect::url ( )
pure virtual

Thread-safe.

May be called from any thread


The documentation for this class was generated from the following file: