00001 /****************************************************************************\ 00002 * VRVis * 00003 * http://vrvis.sourceforge.net * 00004 * (C) 2004 by Alex Loeffler * 00005 * mailto:aloeffler@users.sourceforge.net * 00006 **************************************************************************** 00007 * License * 00008 * * 00009 * This library is free software; you can redistribute it and/or modify it * 00010 * under the terms of the GNU Library General Public License as published * 00011 * by the Free Software Foundation, version 2. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, but * 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Library General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Library General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00021 \****************************************************************************/ 00022 00023 #ifndef VISAPP_HPP 00024 #define VISAPP_HPP 00025 00026 #include <vrj/vrjConfig.h> 00027 #include <vrj/Draw/OGL/GlApp.h> 00028 #include "Common.hpp" 00029 00030 namespace vrvis 00031 { 00032 00033 class Vis; 00034 00036 class VisApp : public vrj::GlApp 00037 { 00038 // ================================================================== PUBLIC 00039 00040 public: 00041 00042 // ----------------------------------------------- Constructor & Destructor. 00043 00045 VisApp(Vis* pVis); 00047 ~VisApp(void); 00048 00049 // --------------------------------------------------------- Execution Loop. 00050 00052 void exec(void); 00053 00054 // ================================================================= PRIVATE 00055 00056 private: 00057 00058 // ------------------------------- Juggler Init (Inherited from vrj::GlApp). 00060 00062 void init(void); 00064 void contextInit(void); 00065 00067 // ----------------------- Juggler Drawing Loop (Inherited from vrj::GlApp). 00069 00071 void preFrame(void); 00073 void bufferPreDraw(void); 00075 void contextPreDraw(void); 00077 void draw(void); 00078 00080 // ------------------------------- Juggler Exit (Inherited from vrj::GlApp). 00082 00084 void exit(); 00085 00087 // ------------------------------ Juggler Units (Inherited from vrj::GlApp). 00089 00091 float getDrawScaleFactor(void); 00092 00094 // ---------------------------------------------------------- Init GL State. 00096 00098 void initGLState(void); 00099 00100 // -------------------------------------------------------- Status messages. 00101 00103 void msg(const char* pMsg) const; 00104 00106 // ---------------------------------------------------------------- Members. 00107 00109 Vis* mpVis; 00110 }; 00111 00112 // ==================================================================== GLOBAL 00113 00115 void visInit(int argc, char** argv); 00116 00117 } // End namespace. 00118 00119 #endif // VISAPP_HPP