Table of contents
The GLOW Toolkit uses a few preprocessor symbols for controlling different compile options and dealing with compatibility issues with older compilers.
These symbols control a few aspects of the behavior of GLOW. You should set them in your makefile or header prefix file.
GLOW_OPTION_DEBUGIf defined, glowDebug debugging facilities will be active.
GLOW_OPTION_NOIOSTREAMSIf defined, GLOW will not emit any code that uses iostreams. This affects the services provided by glowDebug and the code generated by the classes in module glowVectorAlgebra.
GLOW_OPTION_NOEXCEPTIONSIf defined, GLOW code will not throw any exceptions. Currently has no effect, because the current version of GLOW will not throw exceptions anyway, though that may change in a future release. (Note that language and standard library features such as iostreams and operator new may still throw exceptions.)
GLOW_OPTION_USEGLOBALNAMESPACEIf defined, GLOW symbols will be located in the global namespace. Otherwise, they will be located in namespace glow.
GLOW_OPTION_GLUTREDISPLAYFIXIf defined, GLOW will implement a partial workaround for a GLUT bug that sometimes causes GLUT to lose track of windows. The workaround involves preventing a program from reposting a refresh event during the drawing callback for that window. If a program attempts to do so, GLOW will defer the event posting until the next iteration through the event loop. The workaround seems to prevent some cases of the GLUT bug, but not all of them. Versions of GLUT newer than 26 June 2000 may fix the bug, so this workaround may not be necessary if your libraries are new enough.
You may use these symbols to specify details of your development system's ANSI compliance. GLOW for the most part assumes a complete implementation of ANSI/ISO C++, but can tolerate non-compliance in a few details such as namespaces. You should set these defines in your makefile or header prefix file. Some of these symbols are necessary to compile GLOW on compilers that aren't yet completely compliant. Others are not currently necessary, but may be in the future.
GLOW_COMPAT_NOSTDNAMESPACEDefine this symbol if the C++ standard library is not located in namespace std.
GLOW_COMPAT_CLIBNOSTDNAMESPACEDefine this symbol if the C standard library is not located in namespace std. This is necessary for MSVC++ 6.0 and MIPSPro 7.3.
GLOW_COMPAT_USINGSTDINLIBRARYWhen this symbol is defined, GLOW will issue the directive using namespace std; internally. There shouldn't be any reason to use this symbol at this point.
GLOW_COMPAT_BADFORSCOPINGDefine this symbol if your compiler does not use correct scoping of index variables declared in a for loop. Under ANSI/ISO C++, for (int i...) should scope i as if it were declared within the body of the loop, but some older compilers scope i as if it were declared before the for statement. Necessary for MSVC++ 6.0.
GLOW_COMPAT_NOSTDMINMAXDefine this symbol if your development environment doesn't include the min and max templates in the standard library. Necessary for MSVC++ 6.0.
GLOW_COMPAT_NOTEMPLATESPECIALIZATIONSDefine this symbol if your compiler doesn't fully support template specializations. Necessary for MSVC++ 6.0.
You may use these symbols to specify the type of platform you are compiling for. Currently, these are not necessary, but they may be used in the future to tune GLOW's behavior for different platforms.
GLOW_PLATFORM_BIGENDIANBig-endian architecture. (e.g. MIPS, PowerPC)
GLOW_PLATFORM_LITTLEENDIANLittle-endian architecture. (e.g. Intel)
GLOW_PLATFORM_MACOSApple Mac OS.
These macros may be used to handle namespace issues if your program may be compiled under different compilers with different levels of namespace compatibility. They are defined by the GLOW system in the header "glowHeader.h".
GLOW_STDThe name of the standard namespace. If GLOW_COMPAT_NOSTDNAMESPACE is defined, this expands to the empty string "", otherwise it expands to "std".
GLOW_CSTDThe name of the namespace for C library calls. If GLOW_COMPAT_CLIBNOSTDNAMESPACE is defined, this expands to the empty string "", otherwise it expands to "std".
GLOW_NAMESPACEThe name of the GLOW namespace. If GLOW_OPTION_USEGLOBALNAMESPACE is defined, this expands to the empty string "", otherwise it expands to "glow".
GLOW_NAMESPACE_USINGIssues a "using" directive for the GLOW namespace. If GLOW_OPTION_USEGLOBALNAMESPACE is defined, this expands to the empty string "", otherwise it expands to "using namespace glow;"
Other macros are defined by the GLOW system in the header "glowHeader.h".
GLOW_TOOLKITThis symbol is #defined once any of the GLOW headers have been included. The actual string it expands to is a nonzero but otherwise unspecified numeric value.
GLOW_VERSIONThis expands to the version number of the GLOW interfaces being used, as a floating-point constant. The value is of the form a.bbccdd where a is the major release number, b is the major revision number, c is the minor revision number and d is the prerelease number (99 for final). Hence, version 1.3.11pre4 would show up as 1.031104.
Table of contents
The GLOW Toolkit