ViewerUIFramework.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Visualization
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2014, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeVisualization/Base.h"
16 #include "CeeVisualization/Viewer.h"
17 #include "CeeVisualization/OpenGLInfo.h"
18 
19 namespace cee {
20 namespace vis {
21 
22 class OpenGLContextGroup;
23 
24 
25 
26 //==================================================================================================
27 //
28 //
29 //
30 //==================================================================================================
31 class CEE_VIS_EXPORT ViewerUIFramework : public Viewer
32 {
33 public:
36 
37 protected:
38  virtual void doRequestRedraw() = 0;
39  virtual void doRequestImmediateRedraw() = 0;
40  virtual bool doMakeCurrent() = 0;
41  virtual bool doIsCurrent() = 0;
42  virtual unsigned int doGetDefaultFramebufferObject() = 0;
43 
44 protected:
45  bool initializeComponentInternalOpenGL();
46  void shutdownComponentInternalOpenGL();
47  OpenGLInfo openGLInfo() const;
48 
49 private:
50  virtual void internal_requestRedraw();
51  virtual void internal_requestImmediateRedraw();
52  virtual bool internal_makeOpenGLContextCurrent();
53  virtual cvf::OpenGLContext* internal_cvfOpenGLContext();
54 
55 private:
56  CEE_BASE_F(ForwardingOpenGLContext);
57  CEE_PRIVATE_IMPL(ViewerUIFramework);
58  CEE_DISALLOW_COPY_AND_ASSIGN(ViewerUIFramework);
59 };
60 
61 
62 //==================================================================================================
63 //
64 //
65 //
66 //==================================================================================================
67 #ifdef CEE_MONO
68 class CEE_VIS_EXPORT ViewerUIFrameworkMono : public ViewerUIFramework
69 {
70 public:
71  ViewerUIFrameworkMono (OpenGLContextGroup* contextGroup);
72  ~ViewerUIFrameworkMono ();
73 
74 protected:
75  virtual void doRequestRedraw();
76  virtual void doRequestImmediateRedraw();
77  virtual bool doMakeCurrent();
78  virtual bool doIsCurrent();
79 };
80 #endif
81 
82 } // namespace vis
83 } // namespace cee
84 
85 
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Class containing OpenGL renderer and version information for an OpenGLContextGroup.
Definition: OpenGLInfo.h:32
Thin wrapper class for integrating Ceetron Desktop Components with a UI toolkit.
Definition: Viewer.h:30
A context group associates OpenGLContext instances that share OpenGL resources such as shader objects...
Definition: OpenGLContextGroup.h:32
A base class used for integrating Ceetron Desktop Components with a UI Toolkit.
Definition: ViewerUIFramework.h:31