Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

GLContext.hh

Go to the documentation of this file.
00001 /*
00002  *  Gazebo - Outdoor Multi-Robot Simulator
00003  *  Copyright (C) 2003  
00004  *     Nate Koenig & Andrew Howard
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 /* Desc: OpenGL context wrapper  
00022  * Author: Andrew Howard
00023  * Date: 7 Oct 2004
00024  * CVS: $Id: GLContext.hh,v 1.7 2005/04/26 18:29:46 natepak Exp $
00025  */
00026 
00027 
00028 #ifndef GLCONTEXT_HH
00029 #define GLCONTEXT_HH
00030 
00031 #include <GL/glx.h>
00032 
00033 
00038 class GLContext
00039 {
00041   public: GLContext();
00042 
00044   public: virtual ~GLContext();
00045 
00054   public: int Init(int width, int height, int color, int alpha, int depth,
00055                    const char *method, GLXContext shareList = NULL);
00056 
00058   public: void Fini();
00059 
00061   public: GLXContext GetContext() {return this->context;}
00062 
00064   public: int GetContextIndex() {return this->contextIndex;}
00065 
00068   public: int MakeCurrent();
00069 
00071   private: int InitXlib(GLXContext shareList);
00072 
00074   private: int InitGLXPixmap(GLXContext shareList);
00075 
00077   private: int InitSGIX(GLXContext shareList);
00078 
00080   private: int InitGLXP(GLXContext shareList);
00081 
00082   // Requested properties
00083   private: int reqWidth, reqHeight;
00084   private: int reqColor, reqAlpha, reqDepth;
00085 
00086   // GLUT rendering info
00087   private: int win;
00088   
00089   // Common offscreen rendering info
00090   private: GLXContext context;  
00091   private: GLXDrawable drawable;
00092 
00093   // SGI pbuffer method
00094   private: GLXPbuffer pbuffer;
00095 
00096   // GLX method
00097   private: Pixmap Xpixmap;
00098   private: GLXPixmap pixmap;
00099 
00100   // Context index
00101   private: int contextIndex;
00102 };
00103 
00104 
00105 
00106 #endif
00107 


Last updated $Date: 2004/12/21 01:49:15 $
Generated on Sun May 22 18:39:08 2005 for Gazebo by doxygen 1.4.2