00001 /****************************************************************************\ 00002 * * 00003 * 18.06.2003 * 00004 * Definitions - Header File * 00005 * * 00006 * (c) Robert Hausmair * 00007 * * 00008 \****************************************************************************/ 00009 00010 #ifndef __DEFINITIONS_H__ 00011 #define __DEFINITIONS_H__ 00012 00013 //Switch off warnings 00014 #pragma warning(disable: 4786) //Switch off debug length warning (in vector) 00015 #pragma warning(disable :4996) //Depreciated functions 00016 00017 /****************************************************************************\ 00018 * REQUIRED HEADERS * 00019 \****************************************************************************/ 00020 00021 #include <windows.h> 00022 #include <assert.h> 00023 #include <vector> 00024 #include <string> 00025 #include <map> 00026 #include <cmath> 00027 #include <limits> 00028 00029 /****************************************************************************\ 00030 * DEFINITIONS * 00031 \****************************************************************************/ 00032 00033 //Type redefinitions 00034 typedef unsigned char byte; 00035 typedef signed char sbyte; 00036 typedef unsigned short word; 00037 typedef signed short sword; 00038 typedef unsigned long dword; 00039 typedef signed long sdword; 00040 typedef unsigned __int64 qword; 00041 typedef signed __int64 sqword; 00042 00043 //Constants 00044 const float MY_PI = 3.141592654f; 00045 00046 #define SAFE_DELETE(p) { if(p) {delete (p); (p) = NULL;} } 00047 #define SAFE_DELETE_ARRAY(p) { if(p) {delete [] (p); (p) = NULL;} } 00048 00049 //Application 00050 #define MAIN_THREAD 0 00051 #define OPENGL_THREAD 1 00052 00053 //Console 00054 #define LOG_OPENGL 0 00055 #define LOG_OPENGL_ALL 1 00056 00057 //OpenGL 00058 struct OpenGLInfo{ 00059 00060 int gl_VersionMajor; 00061 int gl_VersionMinor; 00062 int glsl_VersionMajor; 00063 int glsl_VersionMinor; 00064 00065 OpenGLInfo() 00066 { 00067 gl_VersionMajor = gl_VersionMinor = glsl_VersionMajor = glsl_VersionMinor = 0; 00068 } 00069 }; 00070 00071 #endif