Find the error in each of the following:

a) ```
SceneNode node;
```
b) ```
ColourValue( 0, 0, 255 );
```
c) ```
Root *rootPtr = new Root();
rootPtr->initialize( true, "Window" );
```
d) ```
viewportPtr = sceneManagerPtr->addViewport( cameraPtr );
```

a) The variable node should instead be declared as a pointer to a SceneNode. All of Ogre’s SceneNode functions either take a pointer as a parameter or return a pointer.
b) The ColourValue object can accept parameters only with values between 0 and 1.
c) Ogre uses British spelling, the function is spelled initialise. Also, the render settings must be set before you call initialise.
d) addViewport is a function of the RenderWindow class, not SceneManager.

Computer Science & Information Technology

You might also like to view...

If you want a particular word included in a web search, place a minus sign (-) in front of the word

Indicate whether the statement is true or false

Computer Science & Information Technology

Suppose class Child is derived from class Parent that was in turn derived from class GrandParent. This question concerns order of calls to constructors and destructors for these three classes. Declare an object of class Child. We know that Child, Parent and GrandParent constructors are called. In what order are these constructors are called? When the time comes to destroy the class Child object, we know that Child, Parent and GrandParent destructors are called. In what order are these destructor called?

What will be an ideal response?

Computer Science & Information Technology