MeVisLab Resolution Independence API
SoOffscreenViewerProxy.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2013, 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 #ifndef SO_OFFSCREEN_VIEWER_PROXY_H
14 #define SO_OFFSCREEN_VIEWER_PROXY_H
15 
17 #include <SoViewerProxy.h>
18 
19 #include <Inventor/nodes/SoSubNode.h>
20 #include <Inventor/nodes/SoSeparator.h>
21 #include <Inventor/misc/SoState.h>
22 
23 namespace ml {
24  class OffscreenRenderer;
25 }
26 
29 {
30 public:
32  SoOffscreenViewerProxy(ml::OffscreenRenderer *offscreenRenderer = nullptr);
35 
36  bool isHighQualityOffscreenRendering() const override { return true; }
37 
38 protected:
41 };
42 
43 //===========================================================================
44 
48 {
49  SO_NODE_HEADER(SoOffscreenViewerProxyNode);
50 
51 public:
53  SoOffscreenViewerProxyNode(SoOffscreenViewerProxy *proxy = nullptr) : SoSeparator(), _proxy(proxy) {}
55 
57  static void initClass();
58 
60  void GLRender(SoGLRenderAction *action) override;
61 
63  virtual void renderCustom(SoGLRenderAction* /*action*/) {}
64 
65 protected:
67 };
68 
69 #endif // __SoOffscreenViewerProxy_H
#define MLOFFSCREENRENDER_EXPORT
Defines macro needed for Windows (export of classes from this DLL)
SoOffscreenViewerProxyNode will put a SoViewerElement with the given SoOffscreenViewerProxy into the ...
virtual void renderCustom(SoGLRenderAction *)
method that can be implemented to do additional GL rendering or setup state when offscreen rendering
static void initClass()
Initializes this class.
SoOffscreenViewerProxyNode(SoOffscreenViewerProxy *proxy=nullptr)
Constructor.
void GLRender(SoGLRenderAction *action) override
set SoOffscreenViewerProxy before scene traversal
SoOffscreenViewerProxy * _proxy
This class implements access to the state of the SoOffscreenRenderer viewer.
ml::OffscreenRenderer * _offscreenRenderer
Pointer to the actual viewer.
~SoOffscreenViewerProxy() override
Destructor.
bool isHighQualityOffscreenRendering() const override
returns true if high quality offscreen rendering (e.g. for OffscreenRenderer) is desired
SoOffscreenViewerProxy(ml::OffscreenRenderer *offscreenRenderer=nullptr)
Constructor.
OpenInventor Scenes can be rendered to the OffscreenRender who outputs an MLImage.
Platform independent interface class to manage an OpenGL context.
Definition: mlGL2DFont.h:26