00001 // -*- C++ -*- 00002 /* gdkglextmm - C++ Wrapper for GdkGLExt 00003 * Copyright (C) 2002-2003 Naofumi Yasufuku 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00018 */ 00019 00020 #ifndef _GDKMM_GL_INIT_H 00021 #define _GDKMM_GL_INIT_H 00022 00023 namespace Gdk 00024 { 00025 namespace GL 00026 { 00027 00028 /** Initialize gdkglextmm library. 00029 * 00030 * This function does the same work as Gdk::GL::init() with only a single 00031 * change: It does not terminate the program if the library can't be 00032 * initialized. Instead it returns <tt>false</tt> on failure. 00033 * 00034 * This way the application can fall back to some other means of communication 00035 * with the user - for example a curses or command line interface. 00036 * 00037 * @param argc Reference of the <tt>argc</tt> parameter of your 00038 * <tt>main()</tt> function. Changed if any arguments were 00039 * handled. 00040 * @param argv Reference of the <tt>argv</tt> parameter of 00041 * <tt>main()</tt>. Any parameters understood by Gdk::GL::init() 00042 * are stripped before return. 00043 * @return <tt>true</tt> if the library has been successfully initialized, 00044 * <tt>false</tt> otherwise. 00045 */ 00046 bool init_check(int& argc, char**& argv); 00047 00048 /** Initialize gdkglextmm library. 00049 * 00050 * This function does the same work as Gdk::GL::init() with only a single 00051 * change: It does not terminate the program if the library can't be 00052 * initialized. Instead it returns <tt>false</tt> on failure. 00053 * 00054 * This way the application can fall back to some other means of communication 00055 * with the user - for example a curses or command line interface. 00056 * 00057 * @param argc Address of the <tt>argc</tt> parameter of your 00058 * <tt>main()</tt> function. Changed if any arguments were 00059 * handled. 00060 * @param argv Address of the <tt>argv</tt> parameter of 00061 * <tt>main()</tt>. Any parameters understood by Gdk::GL::init() 00062 * are stripped before return. 00063 * @return <tt>true</tt> if the library has been successfully initialized, 00064 * <tt>false</tt> otherwise. 00065 */ 00066 bool init_check(int* argc, char*** argv); 00067 00068 /** Initialize gdkglextmm library. 00069 * 00070 * Call this function before using any other gdkglextmm functions in your 00071 * applications. It will initialize everything needed to operate the library 00072 * and parses some standard command line options. @a argc and 00073 * @a argv are adjusted accordingly so your own code will 00074 * never see those standard arguments. 00075 * 00076 * This function will terminate your program if it was unable to initialize 00077 * the library for some reason. If you want your program to fall back to a 00078 * textual interface you want to call Gdk::GL::init_check() instead. 00079 * 00080 * @param argc Reference of the <tt>argc</tt> parameter of your 00081 * <tt>main()</tt> function. Changed if any arguments were 00082 * handled. 00083 * @param argv Reference of the <tt>argv</tt> parameter of 00084 * <tt>main()</tt>. Any parameters understood by Gdk::GL::init() 00085 * are stripped before return. 00086 */ 00087 void init(int& argc, char**& argv); 00088 00089 /** Initialize gdkglextmm library. 00090 * 00091 * Call this function before using any other gdkglextmm functions in your 00092 * applications. It will initialize everything needed to operate the library 00093 * and parses some standard command line options. @a argc and 00094 * @a argv are adjusted accordingly so your own code will 00095 * never see those standard arguments. 00096 * 00097 * This function will terminate your program if it was unable to initialize 00098 * the library for some reason. If you want your program to fall back to a 00099 * textual interface you want to call Gdk::GL::init_check() instead. 00100 * 00101 * @param argc Address of the <tt>argc</tt> parameter of your 00102 * <tt>main()</tt> function. Changed if any arguments were 00103 * handled. 00104 * @param argv Address of the <tt>argv</tt> parameter of 00105 * <tt>main()</tt>. Any parameters understood by Gdk::GL::init() 00106 * are stripped before return. 00107 */ 00108 void init(int* argc, char*** argv); 00109 00110 } // namespace GL 00111 } // namespace Gdk 00112 00113 #endif // _GDKMM_GL_INIT_H