1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 //---------------------------------------------------------------------------
41 //---------------------------------------------------------------------------
46 #include "OSGConfig.h"
48 // Forget everything if we're not doing a Mac OS X compile
51 //#import <Cocoa/Cocoa.h>
52 //#import <AppKit/NSOpenGL.h>
54 #include "OSGEAGLWindow.h"
55 #include "OSGEAGLWindowWrapper.h"
59 // Documentation for this class is emitted in the
60 // OSGEAGLWindowBase.cpp file.
61 // To modify it, please change the .fcd file (OSGEAGLWindow.fcd) and
62 // regenerate the base file.
64 /***************************************************************************\
66 \***************************************************************************/
68 /***************************************************************************\
70 \***************************************************************************/
72 void EAGLWindow::initMethod(InitPhase ePhase)
74 Inherited::initMethod(ePhase);
76 if(ePhase == TypeObject::SystemPost)
82 /***************************************************************************\
84 \***************************************************************************/
86 /*-------------------------------------------------------------------------*\
88 \*-------------------------------------------------------------------------*/
90 /*----------------------- constructors & destructors ----------------------*/
92 EAGLWindow::EAGLWindow(void) :
97 EAGLWindow::EAGLWindow(const EAGLWindow &source) :
102 EAGLWindow::~EAGLWindow(void)
106 /*----------------------------- class specific ----------------------------*/
108 void EAGLWindow::changed(ConstFieldMaskArg whichField,
112 Inherited::changed(whichField, origin, details);
115 void EAGLWindow::dump( UInt32 ,
116 const BitVector ) const
118 SLOG << "Dump EAGLWindow NI" << std::endl;
121 /*-------------------------- your_category---------------------------------*/
123 /*! Init the window: create the context and setup the OpenGL.
125 void EAGLWindow::init(GLInitFunctor oFunc)
127 Inherited::init(oFunc);
130 void EAGLWindow::terminate(void)
134 // activate the window: bind the OGL context
135 void EAGLWindow::doActivate(void)
137 // [this->getContext() makeCurrentContext];
140 // activate the window: bind the OGL context
141 void EAGLWindow::doDeactivate(void)
143 // [EAGLContext clearCurrentContext];
146 // swap front and back buffers
147 bool EAGLWindow::doSwap(void)
149 // [this->getContext() flushBuffer];
154 bool EAGLWindow::hasContext(void)
156 // return (this->getContext() != NULL);