00001 /*************************************************************************** 00002 msgout.h - Basic output system for debuggin and other messages 00003 ------------------- 00004 begin : Fri Aug 3 2001 00005 copyright : (C) 2001 by T Kontkanen 00006 email : tkontkanen@mail.com 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 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 ***************************************************************************/ 00017 00018 #ifndef MSGOUT_H 00019 #define MSGOUT_H 00020 00021 #include <stdio.h> 00022 #include <stdlib.h> 00023 #include <stdarg.h> 00024 #include <GL/gl.h> 00025 00026 namespace msg { 00027 00028 extern FILE *msg_output; 00029 extern int msg_debuglevel; 00030 extern const char *msg_lastfunc; 00031 extern int msg_last_gl_error; 00032 extern bool msg_gl_ready, msg_func_exit; 00033 00034 enum MsgType { MSG_INTERNAL, MSG_FATAL, MSG_FAILURE, MSG_WARN, MSG_INIT, MSG_UNINIT, MSG_DEBUG_1, MSG_DEBUG_2, MSG_DEBUG_3, MSG_DEBUG_4, MSG_DEBUG_5, MSG_INFO, MSG_NOTE, MSG_ERROR }; 00035 00037 extern void setDebugLevel( int level ); 00039 extern void msgOut( enum MsgType messagetype, const char *format, ... ); //func from CrstalSpace 00041 extern void setFuncName( const char *name ); 00043 void exitFunc(); 00045 extern const char* getLastFuncName(); 00047 extern int getLastGlError(); 00049 extern void glReady( bool enabled ); 00050 00051 } //EO namespace 00052 00053 #endif