00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002 by the OpenSG Forum * 00006 * * 00007 * www.opensg.org * 00008 * * 00009 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00010 * * 00011 \*---------------------------------------------------------------------------*/ 00012 /*---------------------------------------------------------------------------*\ 00013 * License * 00014 * * 00015 * This library is free software; you can redistribute it and/or modify it * 00016 * under the terms of the GNU Library General Public License as published * 00017 * by the Free Software Foundation, version 2. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, but * 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00027 * * 00028 \*---------------------------------------------------------------------------*/ 00029 /*---------------------------------------------------------------------------*\ 00030 * Changes * 00031 * * 00032 * * 00033 * * 00034 * * 00035 * * 00036 * * 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #ifndef _OSG_QGLWIDGET_H_ 00040 #define _OSG_QGLWIDGET_H_ 00041 #ifdef __sgi 00042 #pragma once 00043 #endif 00044 00045 //--------------------------------------------------------------------------- 00046 // Includes 00047 //--------------------------------------------------------------------------- 00048 00049 #ifdef OSG_WITH_QT 00050 00051 #include <stdlib.h> 00052 #include <stdio.h> 00053 00054 #ifdef __sgi 00055 #pragma set woff 1375 00056 #endif 00057 00058 #ifdef OSG_WIN32_ICL 00059 #pragma warning (disable : 171) 00060 #endif 00061 00062 #include <qgl.h> 00063 00064 #ifdef OSG_WIN32_ICL 00065 #pragma warning (default : 171) 00066 #endif 00067 00068 #ifdef __sgi 00069 #pragma reset woff 1375 00070 #endif 00071 00072 #include "OSGConfig.h" 00073 #include <OSGWindowQTDef.h> 00074 #include <OSGBaseTypes.h> 00075 00076 OSG_BEGIN_NAMESPACE 00077 00080 class OSG_WINDOWQTLIB_DLLMAPPING OSGQGLWidget : public QGLWidget 00081 { 00082 Q_OBJECT 00083 00084 /*========================== PUBLIC =================================*/ 00085 public: 00086 00087 /*---------------------------------------------------------------------*/ 00091 OSGQGLWidget( QWidget *parent, 00092 const Char8 *name = 0, 00093 const QGLWidget *shareWidget = 0, 00094 WFlags f = 0); 00095 00096 OSGQGLWidget(const QGLFormat &format = QGLFormat::defaultFormat(), 00097 QWidget *parent = 0, 00098 const Char8 *name = 0, 00099 const QGLWidget *shareWidget = 0, 00100 WFlags f = 0); 00102 /*---------------------------------------------------------------------*/ 00106 virtual ~OSGQGLWidget(); 00107 00109 /*---------------------------------------------------------------------*/ 00113 virtual void makeCurrent(void); 00114 virtual void swapBuffers(void); 00115 00117 /*========================= PROTECTED ===============================*/ 00118 protected: 00119 00120 /*---------------------------------------------------------------------*/ 00124 virtual void initializeGL(void); 00125 virtual void paintGL (void); 00126 virtual void resizeGL (int w, int h); 00127 00129 /*========================== PRIVATE ================================*/ 00130 private: 00131 00132 /* prohibit default function (move to 'public' if needed) */ 00133 OSGQGLWidget(const OSGQGLWidget &source); 00134 /* prohibit default function (move to 'public' if needed) */ 00135 void operator =(const OSGQGLWidget &source); 00136 }; 00137 00138 typedef OSGQGLWidget *OSGQGLWidgetP; 00139 00140 OSG_END_NAMESPACE 00141 00142 #include <OSGQGLWidget_qt.inl> 00143 00144 #define OSGQGLWIDGET_HEADER_CVSID "@(#)$Id: $" 00145 00146 #endif /* OSG_WITH_QT */ 00147 00148 #endif /* _OSG_QGLWIDGET_H_ */ 00149 00150 00151
1.4.3