MeVisLab Toolbox Reference
SoGLStateInfo.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2017, 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 
15 
16 #include "SoUtilsSystem.h"
17 
18 #include <Inventor/fields/SoSFVec2s.h>
19 
20 class SOUTILS_EXPORT SoGLStateInfo : public SoNode {
21 
22  SO_NODE_HEADER(SoGLStateInfo);
23 
24 public:
26 
27  SoSFVec2s viewportOffset;
28  SoSFVec2s viewportSize;
29 
30  // TODO: add more useful GL states...
31 
33 
34  // Constructor
36 
38  static void initClass();
39 
41  void GLRender(SoGLRenderAction *action) override;
42 
44  bool affectsState() const override { return false; }
45 
46 protected:
47  ~SoGLStateInfo() override;
48 };
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
Definition: SoUtilsSystem.h:31
static void initClass()
inventor runtime system
void GLRender(SoGLRenderAction *action) override
derived render method that renders the background
bool affectsState() const override
this node does not affect the state, so return false!
Definition: SoGLStateInfo.h:44
SoSFVec2s viewportOffset
Fields.
Definition: SoGLStateInfo.h:27
~SoGLStateInfo() override
SoSFVec2s viewportSize
Definition: SoGLStateInfo.h:28