VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 osg
28 {
29  class GraphicsContext;
30  struct GraphicsContext::Traits;
31 }
32 
33 namespace makVrv
34 {
35 
40  {
41  public:
42 
44  virtual ~DtOsgWindow();
45 
47  virtual osg::GraphicsContext* graphicsContext();
48 
50  virtual const osg::GraphicsContext* graphicsContext() const;
51 
53  virtual bool isValid() const;
54 
58  virtual void sizeChanged(int width,int height);
59 
61  static osg::GraphicsContext::Traits* createDefaultTraits();
62 
63  void adjustPerspective();
64 
66  virtual void clearEmptyWindow();
67 
68  protected:
69 
72 
77  virtual void renderText(int x, int y, const std::string& text);
78 
79  static void setUpAntiAliasingLevels(osg::GraphicsContext::Traits& traits, unsigned short level);
80 
81  protected:
82 
83  osg::ref_ptr<osg::GraphicsContext> myContext;
84 
85  };
86 
87 
89  struct DT_DLL_VRVOSG DtOsgWindowResizeCallback : public osg::GraphicsContext::ResizedCallback
90  {
93 
95  virtual ~DtOsgWindowResizeCallback();
96 
98  virtual void resizedImplementation(osg::GraphicsContext* gc, int x, int y, int width, int height);
99 
100  protected:
102 
103  };
104 }
105 
106 #endif
107 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)