MeVisLab Resolution Independence API
SoOffscreenSceneRenderer.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2019, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
16 #include <Inventor/actions/SoGLRenderAction.h>
17 #include "SoOffscreenViewerProxy.h"
18 
21 {
22 public:
27 
30  SoGLRenderAction* getRenderAction() { return _action; }
31 
38  void render(const SbViewportRegion& region = SbViewportRegion(), SoNode* scene = nullptr);
39 
41  virtual void GLRender(SoGLRenderAction* renderAction) {}
42 
43 private:
44  SoGLRenderAction* _action;
45  SoRef<SoOffscreenViewerProxyNode> _root;
46  SoOffscreenViewerProxy* _offscreenProxy;
47 };
#define MLOFFSCREENRENDER_EXPORT
Defines macro needed for Windows (export of classes from this DLL)
This class implements rendering of an offscreen inventor scene.
void render(const SbViewportRegion &region=SbViewportRegion(), SoNode *scene=nullptr)
Renders the given scene, sets the viewport region before rendering.
SoGLRenderAction * getRenderAction()
Returns the render action that is going to be used.
virtual ~SoOffscreenSceneRenderer()
Destructor.
virtual void GLRender(SoGLRenderAction *renderAction)
This method can be reimplemented to implement custom GL rendering or state setup.
SoOffscreenSceneRenderer()
Constructor.
This class implements access to the state of the SoOffscreenRenderer viewer.