OpenSceneGraph 3.6.5
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
The osgViewer library provides high level viewer functionality designed to make it easier to write a ...
Base class for providing Windowing API agnostic access to creating and managing graphics context.
Definition GraphicsContext:30
GraphicsContext Traits object provides the specification of what type of graphics context is required...
Definition GraphicsContext:70
Object()
Construct an object.
Definition Object:69
Class to encapsulate platform-specific OpenGL context handle variables.
Definition GraphicsHandleWin32:41
virtual void bindPBufferToTextureImplementation(GLenum)
Pure virtual, Bind the graphics context to associated texture implementation.
virtual bool isRealizedImplementation() const
Return true if the graphics context has been realized and is ready to use.
Definition PixelBufferWin32:46
virtual bool releaseContextImplementation()
Release the graphics context.
virtual const char * libraryName() const
return the name of the object's library.
Definition PixelBufferWin32:37
virtual bool makeCurrentImplementation()
Make this graphics context current.
bool _valid
Definition PixelBufferWin32:68
virtual bool isSameKindAs(const Object *object) const
Definition PixelBufferWin32:36
virtual const char * className() const
return the name of the object's class type.
Definition PixelBufferWin32:38
int _boundBuffer
Definition PixelBufferWin32:70
PixelBufferWin32(osg::GraphicsContext::Traits *traits)
virtual void closeImplementation()
Close the graphics context.
virtual bool realizeImplementation()
Realize the GraphicsContext.
virtual bool makeContextCurrentImplementation(GraphicsContext *)
bool _realized
Definition PixelBufferWin32:69
virtual bool valid() const
Return whether a valid and usable GraphicsContext has been created.
Definition PixelBufferWin32:40
bool _initialized
Definition PixelBufferWin32:67
virtual void swapBuffersImplementation()
Swap the front and back buffers.
#define OSGVIEWER_EXPORT
Definition Export:40

osg logo
Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.