OGLplus (0.45.0) a C++ wrapper for OpenGL

Compile-time configuration

Macros

#define OGLPLUS_DONT_TEST_OBJECT_TYPE
 Compile-time switch disabling the testing of object type on construction. More...
 
#define OGLPLUS_NO_OBJECT_DESCS
 Compile-time switch disabling textual object descriptions. More...
 
#define OGLPLUS_LAZY_STR_LIT
 Compile-time switch enabling lazy implementation of StrLit. More...
 
#define OGLPLUS_NO_ENUM_VALUE_NAMES
 Compile-time switch disabling the functions returning enumerated value names. More...
 
#define OGLPLUS_NO_ENUM_VALUE_RANGES
 Compile-time switch disabling the functions returning enumerated value ranges. More...
 
#define OGLPLUS_NO_UTF8_CHECKS
 Compile-time switch disabling UTF-8 validity checks in various functions. More...
 
#define OGLPLUS_NO_GLFUNC_CHECKS
 Compile-time switch disabling checks of validity of pointers to functions. More...
 
#define OGLPLUS_NO_UNIFORM_TYPECHECK
 Compile-time switch entirely disabling typechecking of uniforms. More...
 
#define OGLPLUS_CUSTOM_ERROR_HANDLING
 Compile-time switch enabling customized Error handling. More...
 
#define OGLPLUS_ERROR_INFO_NO_GL_SYMBOL
 Compile-time switch disabling the ErrorGLSymbol attribute of ErrorInfo. More...
 
#define OGLPLUS_ERROR_INFO_NO_FILE
 Compile-time switch disabling the ErrorFile attribute of ErrorInfo. More...
 
#define OGLPLUS_ERROR_INFO_NO_LINE   OGLPLUS_LOW_PROFILE
 Compile-time switch disabling the ErrorLine attribute of ErrorInfo. More...
 
#define OGLPLUS_ERROR_INFO_NO_FUNC
 Compile-time switch disabling the ErrorFunc attribute of ErrorInfo. More...
 
#define OGLPLUS_ERROR_INFO_NO_CLASS_NAME
 Compile-time switch disabling the ErrorClassName attribute of ErrorInfo. More...
 
#define OGLPLUS_ERROR_INFO_NO_BIND_TARGET   1
 Compile-time switch disabling the ErrorBindTarget attribute of ErrorInfo. More...
 
#define OGLPLUS_ERROR_INFO_NO_BIND_TARGET
 Compile-time switch disabling the ErrorBindTarget attribute of ErrorInfo. More...
 
#define OGLPLUS_ERROR_INFO_NO_OBJECT_DESC
 Compile-time switch disabling the ErrorObjectDescription attribute of ErrorInfo. More...
 
#define OGLPLUS_ERROR_NO_PROPAGATION_INFO
 Compile-time switch disabling the PropagationInfo function in Error. More...
 
#define OGLPLUS_ERROR_NO_PROPERTIES
 Compile-time switch disabling the Properties in Error. More...
 
#define OGLPLUS_LOW_PROFILE
 Compile-time option enabling the low-profile mode. More...
 
#define OGLPLUS_LINK_LIBRARY
 Compile-time switch enabling linking of some parts of OGLplus from a library. More...
 

Detailed Description

Configuration options

This section describes compile-time preprocessor symbols that can be used to configure several aspects of OGLplus.

Most of the options are set either to a zero or a non-zero integer value to disable or enable the behavior controlled by the option.

All options have a default value which can be overriden by setting the option before oglplus/config.hpp is processed either by editing the oglplus/site_config.hpp file or by using the -D compiler option (or its equivalent for defining preprocessor symbols on the command-line).

Macro Definition Documentation

#define OGLPLUS_CUSTOM_ERROR_HANDLING

Compile-time switch enabling customized Error handling.

By default this option is set to 0, i.e. customized error handling is is disabled.

#define OGLPLUS_DONT_TEST_OBJECT_TYPE

Compile-time switch disabling the testing of object type on construction.

Setting this preprocessor option to a non-zero integer value disables the additional checking of the type of object returned by OpenGL's glGen*(...) functions during the construction of an Object. Setting it to zero enables the check.

By default this option is set to 1, i.e. object type tests are disabled.

#define OGLPLUS_ERROR_INFO_NO_BIND_TARGET   1

Compile-time switch disabling the ErrorBindTarget attribute of ErrorInfo.

See Also
ErrorBindTarget()

By default this option is set to 0, i.e. ErrorBindTarget is enabled, unless OGLPLUS_NO_ENUM_VALUE_NAMES is set to a non-zero value, in which case ErrorBindTarget is disabled and returns an empty string.

#define OGLPLUS_ERROR_INFO_NO_BIND_TARGET

Compile-time switch disabling the ErrorBindTarget attribute of ErrorInfo.

See Also
ErrorBindTarget()

By default this option is set to 0, i.e. ErrorBindTarget is enabled, unless OGLPLUS_NO_ENUM_VALUE_NAMES is set to a non-zero value, in which case ErrorBindTarget is disabled and returns an empty string.

#define OGLPLUS_ERROR_INFO_NO_CLASS_NAME

Compile-time switch disabling the ErrorClassName attribute of ErrorInfo.

See Also
ErrorClassName()

By default this option is set to 0, i.e. ErrorClassName is enabled.

#define OGLPLUS_ERROR_INFO_NO_FILE

Compile-time switch disabling the ErrorFile attribute of ErrorInfo.

See Also
ErrorFile()

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. ErrorFile is enabled, when not in low-profile and disabled otherwise.

#define OGLPLUS_ERROR_INFO_NO_FUNC

Compile-time switch disabling the ErrorFunc attribute of ErrorInfo.

See Also
ErrorFunc()

By default this option is set to 0, i.e. ErrorFunc is enabled.

#define OGLPLUS_ERROR_INFO_NO_GL_SYMBOL

Compile-time switch disabling the ErrorGLSymbol attribute of ErrorInfo.

See Also
ErrorGLSymbol()

By default this option is set to 0, i.e. ErrorGLSymbol is enabled.

#define OGLPLUS_ERROR_INFO_NO_LINE   OGLPLUS_LOW_PROFILE

Compile-time switch disabling the ErrorLine attribute of ErrorInfo.

See Also
ErrorLine()

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. ErrorLine is enabled, when not in low-profile and disabled otherwise.

#define OGLPLUS_ERROR_INFO_NO_OBJECT_DESC

Compile-time switch disabling the ErrorObjectDescription attribute of ErrorInfo.

See Also
ErrorObjectDescription()

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. ErrorObjectDescription is enabled, when not in low-profile and disabled otherwise and returns an empty string.

#define OGLPLUS_ERROR_NO_PROPAGATION_INFO

Compile-time switch disabling the PropagationInfo function in Error.

See Also
Error::PropagationInfo()

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. Error::PropagationInfo() is enabled, when not in low-profile and disabled otherwise and returns an empty list.

#define OGLPLUS_ERROR_NO_PROPERTIES

Compile-time switch disabling the Properties in Error.

See Also
Error::Properties()

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. Error::Properties() is enabled, when not in low-profile and disabled otherwise and returns an empty map.

#define OGLPLUS_LAZY_STR_LIT

Compile-time switch enabling lazy implementation of StrLit.

The StrLit class has two implementations, one referred to as 'Lazy' which only stores the pointer to the C-string literal where the size is obtained lazily only when required. The other implementation lets the compiler to determine and store the size of the literal during compilation.

The advantage of the lazy implementation is smaller code size and slightly better compilation times, while the calculation of the size of the literal adds run-time overhead. The other implementation results in slightly larger binaries but has the advantage that the size of the literal is pre-calculated.

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. lazy string literals are enabled, when in low-profile mode and disabled otherwise.

See Also
StrLit
#define OGLPLUS_LINK_LIBRARY

Compile-time switch enabling linking of some parts of OGLplus from a library.

Certain parts of OGLplus (mostly complicated functions and functions where static variables are used) can be built into a separate library that can be then linked to applications. If the OGLPLUS_LINK_LIBRARY is set to zero, then everything is inlined. If it is set to a nonzero integer value, then some functions are just declared and must be built separatelly and linked to the final executable.

The oglplus/lib.hpp file can be included when building the library or the final executable to include the implementations of all such functions.

By default this option is set to 0.

#define OGLPLUS_LOW_PROFILE

Compile-time option enabling the low-profile mode.

In the low-profile mode some features (like object descriptions, enumeration value names, some file and line info atached to exceptions, etc. useful during development and debugging) are disabled, resulting in both smaller binary executable sizes and lower run-time overhead for release builds of applications using OGLplus.

Setting this option to a non-zero integer value enables the low-profile mode, setting it to zero disables it. By default the low-profile mode is disabled.

This option influences the default value of several other configuration options. Their values can of course be set independently if required.

#define OGLPLUS_NO_ENUM_VALUE_NAMES

Compile-time switch disabling the functions returning enumerated value names.

Setting this preprocessor symbol to a nonzero value causes that the EnumValueName(Enum) functions always return an empty string. When set to zero these functions return a textual name of an enumerated value passed as argument.

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. enumeration value names are enabled, when not in low-profile mode and disabled otherwise.

#define OGLPLUS_NO_ENUM_VALUE_RANGES

Compile-time switch disabling the functions returning enumerated value ranges.

Setting this preprocessor symbol to a nonzero value causes that the EnumValueRange<Enum>() functions always return an empty range. When set to zero these functions return a range of all values in the enumeration passed as template argument.

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. enumeration value ranges are enabled, when not in low-profile mode and disabled otherwise.

#define OGLPLUS_NO_GLFUNC_CHECKS

Compile-time switch disabling checks of validity of pointers to functions.

Setting this preprocessor symbol to a nonzero value causes that if the OpenGL functions are called through a pointer then the pointer is checked before it is used to call the function. If enabled and a pointer to GL function is nullptr then the MissingFunction exception is thrown.

This check can safely be disabled if functions from the GL API are not called through pointers.

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. the function pointer checks are enabled, when not in low-profile mode, and disabled otherwise. The check however requires variadic templates. If variadic templates are not available then the checks are disabled.

#define OGLPLUS_NO_OBJECT_DESCS

Compile-time switch disabling textual object descriptions.

Setting this preprocessor option to a non-zero integer value disables the Optional object description attached to various specializations of Object (like Program, Shader, Texture, etc.) during construction by the means of the ObjectDesc parameter in constructor of Object.

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. objects descriptions are enabled, when not in low-profile mode and disabled otherwise.

Note
Object descriptions use statically initialized data which may cause problems if the final executable is built together from several different object files. Because of this, if object descriptions are enabled it is recommended that OGLplus applications are built with OGLPLUS_LINK_LIBRARY set to non-zero or are built as a single translation unit.
See Also
OGLPLUS_LINK_LIBRARY
#define OGLPLUS_NO_UNIFORM_TYPECHECK

Compile-time switch entirely disabling typechecking of uniforms.

Setting this preprocessor symbol to a nonzero value causes that even the Uniform variables that are declared with UniformTypecheckingLevel other than None, are not typechecked.

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. typechecking of uniforms is enabled when not in low-profile mode, and disabled otherwise.

#define OGLPLUS_NO_UTF8_CHECKS

Compile-time switch disabling UTF-8 validity checks in various functions.

Setting this preprocessor symbol to a nonzero value causes that the StrLit and String constructors skip the UTF-8 validity checks.

By default this option is set to the same value as OGLPLUS_LOW_PROFILE, i.e. the UTF-8 validity checks are enabled, when not in low-profile mode and disabled otherwise.

See Also
String
StrLit

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Wed Apr 30 2014 by Doxygen (version 1.8.4).