16#ifndef OSGVIEWER_PIXELBUFFERCOCOA
17#define OSGVIEWER_PIXELBUFFERCOCOA 1
31 struct Implementation;
48 getState()->setGraphicsContext(
this);
50 if (_traits.valid() && _traits->sharedContext.valid())
52 getState()->setContextID( _traits->sharedContext->getState()->getContextID() );
53 incrementContextIDUsageCount( getState()->getContextID() );
63 virtual bool isSameKindAs(
const Object*
object)
const {
return dynamic_cast<const PixelBufferCocoa*
>(object)!=0; }
64 virtual const char* libraryName()
const {
return "osgViewer"; }
65 virtual const char* className()
const {
return "PixelBufferCarbon"; }
67 virtual bool valid()
const {
return _valid; }
70 virtual bool realizeImplementation();
73 virtual bool isRealizedImplementation()
const {
return _realized; }
76 virtual void closeImplementation();
79 virtual bool makeCurrentImplementation();
85 virtual bool releaseContextImplementation();
88 virtual void bindPBufferToTextureImplementation( GLenum buffer );
91 virtual void swapBuffersImplementation();
93 NSOpenGLContext* getContext() {
return _context; }
108 NSOpenGLContext* _context;
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
static unsigned int createNewContextID()
Create a contextID for a new graphics context, this contextID is used to set up the osg::State associ...
GraphicsContext Traits object provides the specification of what type of graphics context is required...
Definition GraphicsContext:70
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
Class to encapsulate platform-specific OpenGL context handle variables.
Definition GraphicsHandleCocoa:34
#define NULL
Definition Export:55
#define OSGVIEWER_EXPORT
Definition Export:40