VR-Vantage API Documentation
DtOsgWindow.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgWindow.h,v $ $Revision: 1.24 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtOsgWindow_H_
14 #define DtOsgWindow_H_
15 
16 #include <vrvOsg/vrvOsg.h>
17 #include <vrvCore/DtWindow.h>
18 #include <osg/ref_ptr>
19 #include <osg/GraphicsContext>
21 
22 namespace osgViewer
23 {
24  class GraphicsWindow;
25 }
26 
27 namespace makVrv
28 {
29 
34  {
35  public:
36 
38  virtual ~DtOsgWindow();
39 
41  virtual osg::GraphicsContext* graphicsContext();
42 
44  virtual const osg::GraphicsContext* graphicsContext() const;
45 
47  virtual bool isValid() const;
48 
52  virtual void sizeChanged(int width,int height);
53 
55  static osg::GraphicsContext::Traits* createDefaultTraits();
56 
57  void adjustPerspective();
58 
60  virtual void clearEmptyWindow();
61 
62  protected:
63 
66 
71  virtual void renderText(int x, int y, const std::string& text);
72 
73  protected:
74 
75  osg::ref_ptr<osg::GraphicsContext> myContext;
76 
77  };
78 
79 
81  struct DT_DLL_VRVOSG DtOsgWindowResizeCallback : public osg::GraphicsContext::ResizedCallback
82  {
85 
87  virtual ~DtOsgWindowResizeCallback();
88 
90  virtual void resizedImplementation(osg::GraphicsContext* gc, int x, int y, int width, int height);
91 
92  protected:
94 
95  };
96 }
97 
98 #endif
99 


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)