Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OgreGTKGLSupport.h

Go to the documentation of this file.
00001 /*
00002 -----------------------------------------------------------------------------
00003 This source file is part of OGRE
00004     (Object-oriented Graphics Rendering Engine)
00005 For the latest info, see http://ogre.sourgeforge.net/
00006 
00007 Copyright © 2000-2003 Steven J. Streeting
00008 Also see acknowledgements in Readme.html
00009 
00010 This program is free software; you can redistribute it and/or modify it under
00011 the terms of the GNU General Public License as published by the Free Software
00012 Foundation; either version 2 of the License, or (at your option) any later
00013 version.
00014 
00015 This program is distributed in the hope that it will be useful, but WITHOUT
00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License along with
00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
00022 http://www.gnu.org/copyleft/gpl.html.
00023 -----------------------------------------------------------------------------
00024 */
00025 
00026 #ifndef INCL_OGRE_GTKGLSUPPORT_H
00027 #define INCL_OGRE_GTKGLSUPPORT_H
00028 
00029 #include "OgreGLSupport.h"
00030 
00031 #include <gtkmm/main.h>
00032 #include <gtkglmm.h>
00033 
00034 namespace Ogre {
00035 
00036 class OGREWidget;
00037 
00038 class GTKGLSupport : public GLSupport
00039 {
00040 public:
00041     GTKGLSupport();
00042     void addConfig();
00043     void setConfigOptions(const String& name, const String& value);
00044     String validateConfig();
00045     RenderWindow* createWindow(bool autoCreateWindow, 
00046                                GLRenderSystem* renderSystem);
00047     RenderWindow* newWindow(const String& name, unsigned int width, unsigned int height, 
00048                             unsigned int colourDepth, bool fullScreen, int left, int top,
00049                             bool depthBuffer, RenderWindow* parentWindowHandle,
00050                             bool vsync);
00051     void start();
00052     void stop();
00053     void begin_context();
00054     void end_context();
00055     void initialiseExtensions(void);
00056     bool checkMinGLVersion(const String& v) const;
00057     bool checkExtension(const String& ext) const;
00058     void* getProcAddress(const String& procname);
00059 private:
00060     Gtk::Main _kit;
00061     int _context_ref;
00062     OGREWidget* _ogre_widget;
00063 }; // class GTKGLSupport
00064 
00065 }; // namespace Ogre
00066 
00067 #endif // INCL_OGRE_GTKGLSUPPORT_H

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:12 2004