scene = Scene Box( 600, 600 ); // make a scene box...holds an OpenGL scene
New Window( "Example 2", scene ); // put the scene in a window
scene << Perspective( 45, 3, 7 );
// the "lens" is 45 degrees, near is 3 units from the camera, far is 7
scene << Translate( 0.0, 0.0, -4.5 );
// move the world so 0,0,0 is visible in the camera
scene << Rotate( 30, 0, 1, 0 );
// rotate the first text about the Y (vertical on screen) axis
scene << Color( 1, 0, 0 ); // pure red
scene << Text( "center", "baseline", .2, "First Red String" );
scene << Translate( 0.0, 0.0, -2.0 );
// the next string is even farther away from the camera
scene << Rotate( 30, 0, 1, 0 );
// rotate the second text about the Y (vertical on screen) axis
scene << Color( 0, 1, 0 ); // pure green
scene << Text( "center", "baseline", .2, "Second Green very long string" );
scene << Update;
// update the displaybox in the window using the current display list
Note the green string is extending backwards beyond the far clipping plane. Change the 7 to 10 in the Perspective command to see the complete string.