Skip to end of metadata
Go to start of metadata

Table of Contents


Two new BrightScript objects, roSGScreen and roSGNode, have been defined to allow our Scene Graph technology to be used in scripting.

BrightScript Scene Graph Scene Creation

Currently, a fairly strict ordering must be used in BrightScript to create a screen and set up its Scene node.

roSGNode

The roSGNode object is the BrightScript equivalent of Scene Graph XML file node creation. To create an roSGNode object for a specific node class, call:

CreateObject("roSGNode", "nodetype")

Where nodetype is a string specifying the node class to be created. For example, the following creates an object of the Scene Graph Poster node class:

CreateObject("roSGNode", "Poster")

Reference information on all Scene Graph node classes can be found in Scene Graph API Reference.

Prior to creating an roSGScreen object and calling its show() function, creating roSGNode objects and using their interfaces is not guaranteed to work correctly. If you need to create some roSGNode objects and/or use roSGNode interfaces prior to calling an roSGScreen object show() function, you can use an roSGScreen object createScene() function to create an instance of a Scene Graph XML component that does any required setup and initialization prior to the roSGScreen object being displayed.

roSGScreen

The roSGScreen object is a Scene Graph canvas that displays the contents of a Scene Graph Scene node instance. The object is created by calling:

CreateObject("roSGScreen")

Typical Usage

CreateScene() takes one argument, the name of the scene component.  A channel will typically extend Scene to define its own channel specific Scene type (such as MyScene, etc.)  This Scene component name is passed to CreateScene().

roSGScreen Typical Usage Example


 

  • No labels