OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PixelBufferWin32.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 /* Note, elements of PixeBufferWin32 have used Producer/RenderSurface_Win32.cpp as both
15  * a guide to use of X11/GLX and copiying directly in the case of setBorder().
16  * These elements are license under OSGPL as above, with Copyright (C) 2001-2004 Don Burns.
17  */
18 
19 #ifndef OSGVIEWER_PIXELBUFFERWIN32
20 #define OSGVIEWER_PIXELBUFFERWIN32 1
21 
22 #include <osg/GraphicsContext>
23 #include <osgViewer/api/Win32/GraphicsHandleWin32>
24 
25 namespace osgViewer
26 {
27 
29 {
30  public:
31 
33 
34  virtual ~PixelBufferWin32();
35 
36  virtual bool isSameKindAs(const Object* object) const { return dynamic_cast<const PixelBufferWin32*>(object)!=0; }
37  virtual const char* libraryName() const { return "osgViewer"; }
38  virtual const char* className() const { return "PixelBufferWin32"; }
39 
40  virtual bool valid() const { return _valid; }
41 
43  virtual bool realizeImplementation();
44 
46  virtual bool isRealizedImplementation() const { return _realized; }
47 
49  virtual void closeImplementation();
50 
52  virtual bool makeCurrentImplementation();
53  virtual bool makeContextCurrentImplementation( GraphicsContext* /*readContext*/ );
54 
56  virtual bool releaseContextImplementation();
57 
59  virtual void swapBuffersImplementation();
60 
61  virtual void bindPBufferToTextureImplementation( GLenum /*buffer*/ );
62 
63  protected:
64 
65  void init();
66 
68  bool _valid;
69  bool _realized;
71 };
72 
73 }
74 
75 #endif
virtual bool isRealizedImplementation() const
virtual const char * libraryName() const
#define OSGVIEWER_EXPORT
Definition: Export.h:40
virtual bool valid() const
virtual bool isSameKindAs(const Object *object) const
virtual const char * className() const