swCreateScene
Creates the scene for a SceneLib window.
cScene* swCreateScene (
cWind* window, // pointer to a SceneLib window
tINT draw_to); // (SL_OPENGL_BUFFER, SL_BITMAP_BUFFER)
Return value: Pointer to an node of the class cScene.
Remarks: Use this function only with the SceneLib window. For Windows
applications the scene creation and initialization happens within the seOnCreate window event handler.
The parameter draw_to specifies the rendering buffer for the 3D scene:
- With the constant SL_OPENGL_BUFFER (default) the 3D objects are rendered into a double
or single buffered OpenGL rendering context. If double buffering is used and 2D and 3D
objects are combined the 2D objects are draw after the 3D scene has been swapped into the
front buffer. This causes flickering of the 2D scene.
- With the constant SL_BITMAP_BUFFER the 3D scene is drawn into a bitmap of a device
context that is compatible with the device context of the window. 2D objects are drawn
into the same bitmap. At the end the bitmap is swapped into the DC of the window witch
avoids any flickering. No single buffering is available in this mode.