Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

glutapplication.h

00001 /***************************************************************************
00002                           glutapplication.h  -  description
00003                              -------------------
00004     begin                : Wed Apr 2 2003
00005     copyright            : (C) 2003 by 
00006     email                : jgasseli@localhost.localdomain
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Lesser General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *
00024  *                                                                         *
00025  ***************************************************************************/
00026 
00027 #ifndef GLUTAPPLICATION_H
00028 #define GLUTAPPLICATION_H
00029 
00030 #include <iostream>
00031 #include <GL/glut.h>
00032 #include "gluttglwindow.h"
00033 #include <list>
00034 
00035 //so you need to link with: -lglut -lGLU -lGL -lm
00036 
00044 using namespace std;   
00045   
00046 class GlutApplication
00047 {
00048    //only one application at a time                  
00049    static GlutApplication* currentApp;
00050    
00051 public: 
00052    GlutApplication(int argc, char* argv[]);
00053    virtual ~GlutApplication();
00054 
00055    void setCurrentApp(GlutApplication* glapp) { currentApp = glapp; }
00056    static void idleFunc();
00057    virtual void idle();
00058    static void mainLoop();
00059    static void exit();
00060 };                                                                       
00061 
00062 #endif

Generated on Wed Feb 4 23:11:34 2004 by doxygen 1.3.3