| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tlp::GlOffscreenRenderer Class Reference Render a scene in an image or in a texture. More...
Collaboration diagram for tlp::GlOffscreenRenderer:
Public Member Functions
Static Public Member Functions
Detailed DescriptionRender a scene in an image or in a texture. Here is an example to render a graph in a QImage to use it as preview. //Get the renderer glOffscreenRenderer *glOffscreenRenderer = GlOffscreenRenderer::getInstance(); //Define the viewport size. Needed to initialize the offscreen rederer. glOffscreenRenderer->setViewPortSize(200,200); //Erase old elements glOffscreenRenderer->clearScene(); //Change the background color of the scene to white glOffscreenRenderer->setSceneBackgroundColor(Color(255,255,255,255)); //Add the graph to render. glOffscreenRenderer->addGraphToScene(graph); //Center and render the scene. glOffscreenRenderer->renderScene(true); //Get the result QImage preview = glOffscreenRenderer->getImage(); Constructor & Destructor Documentation
Member Function Documentation
Add an entity to the scene. The scene become the owner of the object.
Add a graph composite to the scene. The scene become the owner of the object.
Add a graph to the scene. Just create a new GraphComposite and call GlGraphComposite.
Delete all the elements of the scene and clear it.
Generate an open gl texture from the scene. You need to call the renderScene function before this function.
Generate a QImage from the scene. You need to call the renderScene function before this function.
Get the renderer instance.
Render the scene in a buffer. You need to call this function before getting the result with getImage or getGlTexture.
Define the viewport size.
|
Tulip Software by LaBRI Visualization Team 2001 - 2012 |