00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifdef OSG_WITH_GLUT
00040
00041
00042
00043
00044
00045 #include <stdlib.h>
00046 #include <stdio.h>
00047
00048 #include <OSGConfig.h>
00049
00050 #define OSG_COMPILEWINDOWGLUTINST
00051
00052 #include "OSGGLUTWindow.h"
00053
00054 #include <OSGGLUT.h>
00055
00056 #include "OSGNodePtr.h"
00057 #include "OSGViewport.h"
00058 #include "OSGCamera.h"
00059 #include "OSGBackground.h"
00060 #include "OSGGLUTWindow.h"
00061
00062 OSG_USING_NAMESPACE
00063
00070
00071
00073
00074 GLUTWindow::GLUTWindow(void) :
00075 Inherited()
00076 {
00077 }
00078
00080
00081 GLUTWindow::GLUTWindow(const GLUTWindow &source) :
00082 Inherited(source)
00083 {
00084 }
00085
00087
00088 GLUTWindow::~GLUTWindow(void)
00089 {
00090 }
00091
00092
00093
00095
00096 void GLUTWindow::initMethod (void)
00097 {
00098 }
00099
00101
00102 void GLUTWindow::changed(BitVector whichField, UInt32 origin)
00103 {
00104 Inherited::changed(whichField, origin);
00105 }
00106
00108
00109 void GLUTWindow::dump( UInt32 ,
00110 const BitVector ) const
00111 {
00112 SLOG << "Dump GLUTWindow NI" << std::endl;
00113 }
00114
00115
00116
00117
00118 void GLUTWindow::init(void)
00119 {
00120 activate();
00121 setupGL();
00122 }
00123
00124
00125 void GLUTWindow::activate(void)
00126 {
00127 if(glutGetWindow() != getId())
00128 glutSetWindow(getId());
00129 }
00130
00131
00132 void GLUTWindow::deactivate(void)
00133 {
00134 }
00135
00136
00137 void GLUTWindow::swap(void)
00138 {
00139 glutSwapBuffers();
00140 }
00141
00142 #endif // OSG_WITH_GLUT
00143
00144
00145
00146
00147
00148 #ifdef __sgi
00149 #pragma set woff 1174
00150 #endif
00151
00152 #ifdef OSG_LINUX_ICC
00153 #pragma warning( disable : 177 )
00154 #endif
00155
00156 namespace
00157 {
00158 static char cvsid_cpp[] = "@(#)$Id: $";
00159 static char cvsid_hpp[] = OSGGLUTWINDOW_HEADER_CVSID;
00160 static char cvsid_inl[] = OSGGLUTWINDOW_INLINE_CVSID;
00161
00162 static Char8 cvsid_fields_hpp[] = OSGGLUTWINDOWFIELDS_HEADER_CVSID;
00163 }