openscenegraph
PixelBufferWin32
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>
24
25namespace osgViewer
26{
27
29{
30 public:
31
33
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
53 virtual bool makeContextCurrentImplementation( GraphicsContext* /*readContext*/ );
54
57
60
61 virtual void bindPBufferToTextureImplementation( GLenum /*buffer*/ );
62
63 protected:
64
65 void init();
66
68 bool _valid;
71};
72
73}
74
75#endif
Definition GraphicsHandleWin32:41
Definition PixelBufferWin32:29
virtual void bindPBufferToTextureImplementation(GLenum)
virtual bool isRealizedImplementation() const
Definition PixelBufferWin32:46
virtual bool releaseContextImplementation()
virtual const char * libraryName() const
Definition PixelBufferWin32:37
virtual bool makeCurrentImplementation()
bool _valid
Definition PixelBufferWin32:68
virtual bool isSameKindAs(const Object *object) const
Definition PixelBufferWin32:36
virtual const char * className() const
Definition PixelBufferWin32:38
int _boundBuffer
Definition PixelBufferWin32:70
PixelBufferWin32(osg::GraphicsContext::Traits *traits)
virtual void closeImplementation()
virtual bool realizeImplementation()
virtual bool makeContextCurrentImplementation(GraphicsContext *)
bool _realized
Definition PixelBufferWin32:69
virtual bool valid() const
Definition PixelBufferWin32:40
bool _initialized
Definition PixelBufferWin32:67
virtual void swapBuffersImplementation()
Definition GraphicsContext:30
#define OSGVIEWER_EXPORT
Definition osgViewer/Export:40
Definition GraphicsContext:70