Commit ed97990b authored by Robert Menzel's avatar Robert Menzel
Browse files

corrected include guards, added comments

parent b77d4d33
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_HH
#define ACGL_HH
#ifndef ACGL_ACGL_HH
#define ACGL_ACGL_HH
/*
* Include this in all ACGL (header)-files. It will include stuff that is used in
......@@ -12,6 +12,8 @@
* the used datatypes
* macros and defines used at compile-time
* logging
*
* Also the librarys init function is defined here.
*/
#include <ACGL/Base/CompileTimeSettings.hh>
......@@ -21,9 +23,15 @@
namespace ACGL
{
/*
* This should get called as soon as a valid OpenGL context exists,
* it will init glew (if used).
* Call this before calling any OpenGL functions or OpenGL related
* ACGL stuff.
*/
void init(void);
};
#endif // ACGL_HH
#endif // ACGL_ACGL_HH
......@@ -3,11 +3,11 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef COMPILETIMESETTINGS_HH
#define COMPILETIMESETTINGS_HH
#ifndef ACGL_BASE_COMPILETIMESETTINGS_HH
#define ACGL_BASE_COMPILETIMESETTINGS_HH
/*
* OpenGL error checking
* OpenGL error checking defines
*
* By default, only critical errors will get checked in release build
* and critical&common in debug build.
......@@ -71,5 +71,5 @@
#endif // COMPILETIMESETTINGS_HH
#endif // ACGL_BASE_COMPILETIMESETTINGS_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_UTILS_FILEHELPERS_HH
#define ACGL_UTILS_FILEHELPERS_HH
#ifndef ACGL_BASE_FILEHELPERS_HH
#define ACGL_BASE_FILEHELPERS_HH
#include <string>
#include <vector>
......
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_UTILS_FILEOPERATIONS_HH
#define ACGL_UTILS_FILEOPERATIONS_HH
#ifndef ACGL_BASE_FILEOPERATIONS_HH
#define ACGL_BASE_FILEOPERATIONS_HH
#include <ACGL/ACGL.hh>
......@@ -21,4 +21,4 @@ namespace FileOperations
} // Base
} // ACGL
#endif
#endif // ACGL_BASE_FILEOPERATIONS_HH
......@@ -6,6 +6,11 @@
#ifndef ACGL_BASE_FRAMEWORKSETTINGS_HH
#define ACGL_BASE_FRAMEWORKSETTINGS_HH
/*
* This class manages a few runtime settings for the application which can change the
* behavior of the ACGL library.
*/
#include <ACGL/ACGL.hh>
#include <ACGL/Base/Singleton.hh>
#include <string>
......
......@@ -3,8 +3,13 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef SINGLETON_HH
#define SINGLETON_HH
#ifndef ACGL_BASE_SINGLETON_HH
#define ACGL_BASE_SINGLETON_HH
/*
* A very simple Singleton as a template.
* Not thread save etc.
*/
#include <ACGL/ACGL.hh>
#include <tr1/memory>
......
......@@ -3,8 +3,13 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_UTILS_STRINGOPERATIONS_HH
#define ACGL_UTILS_STRINGOPERATIONS_HH
#ifndef ACGL_BASE_STRINGOPERATIONS_HH
#define ACGL_BASE_STRINGOPERATIONS_HH
/*
* Provides a set of primitive functions which operate on std::strings which are
* used at multiple points within the library.
*/
#include <ACGL/ACGL.hh>
......@@ -43,4 +48,4 @@ namespace StringOperations
} // Base
} // ACGL
#endif // ACGL_UTILS_STRINGOPERATIONS_HH
#endif // ACGL_BASE_STRINGOPERATIONS_HH
......@@ -3,8 +3,14 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef AE_CONSTANTS_H
#define AE_CONSTANTS_H
#ifndef ACGL_MATH_CONSTANTS_HH
#define ACGL_MATH_CONSTANTS_HH
/*
* Some mathmatical constants, for example readable degree to rad conversion.
*
* DON'T INCLUDE THIS DIRECTLY! Include <ACGL/Math.hh> instead!
*/
#include <ACGL/ACGL.hh>
......@@ -67,4 +73,4 @@ template<> inline double RED_TO_DEG<double>(void) { return RAD_TO_DEG_DOUBLE; }
} // Math
} // ACGL
#endif // AECONSTANTS_H
#endif // ACGL_MATH_CONSTANTS_HH
......@@ -6,12 +6,22 @@
#ifndef ACGL_MATH_FUNCTIONS_HH
#define ACGL_MATH_FUNCTIONS_HH
/*
* Some basic math functions.
*
* DON'T INCLUDE THIS DIRECTLY! Include <ACGL/Math.hh> instead!
*/
#include <ACGL/ACGL.hh>
#include <ACGL/Math/Constants.hh>
#include <cmath>
#include <limits>
/*
* Swizzling has to be defined before the glm.hpp gets first included, no not forget
* this, you should never include glm yourself, but include always our ACGL/Math.hh!
*/
#define GLM_SWIZZL
#include <glm/glm.hpp>
......@@ -120,4 +130,4 @@ inline glm::mat3 normalMatrix(const glm::mat4& matrix)
} // Math
} // ACGL
#endif
#endif // ACGL_MATH_FUNCTIONS_HH
......@@ -13,6 +13,9 @@
* This library has the advantage that it was designed to mimic the
* syntax of GLSL for datatypes (vectors, matrices etc.) as well as functions.
* It also supports swizzling similar to GLSL.
*
* Swizzling has to be defined before the glm.hpp gets first included, no not forget
* this, you should never include glm yourself, but include always our ACGL/Math.hh!
*/
#define GLM_SWIZZL
#include <glm/glm.hpp>
......@@ -21,4 +24,4 @@
#include <ACGL/Math/Constants.hh>
#include <ACGL/Math/Functions.hh>
#endif
#endif // ACGL_MATH_HH
......@@ -3,8 +3,13 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_CONTROLLER_HH
#define ACGL_CONTROLLER_HH
#ifndef ACGL_OPENGL_CONTROLLER_HH
#define ACGL_OPENGL_CONTROLLER_HH
/*
* A shortcut to include all controller of OpenGL objects.
* Will also include the objects themself!
*/
#include <ACGL/ACGL.hh>
......@@ -24,4 +29,4 @@
#include <ACGL/OpenGL/Controller/ArrayBufferControl.hh>
#include <ACGL/OpenGL/Controller/ElementArrayBufferControl.hh>
#endif // ACGL_CONTROLLER_HH
#endif // ACGL_OPENGL_CONTROLLER_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_ARRAYBUFFERCONTROL_HH
#define ACGL_RESOURCE_ARRAYBUFFERCONTROL_HH
#ifndef ACGL_OPENGL_CONTROLLER_ARRAYBUFFERCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_ARRAYBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
......@@ -88,4 +88,4 @@ protected:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_ARRAYBUFFERCONTROL_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_ELEMENTARRAYBUFFERCONTROL_HH
#define ACGL_RESOURCE_ELEMENTARRAYBUFFERCONTROL_HH
#ifndef ACGL_OPENGL_CONTROLLER_ELEMENTARRAYBUFFERCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_ELEMENTARRAYBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
......@@ -78,4 +78,4 @@ protected:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_ELEMENTARRAYBUFFERCONTROL_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_FRAMEBUFFERCONTROL_HH
#define ACGL_RESOURCE_FRAMEBUFFERCONTROL_HH
#ifndef ACGL_OPENGL_CONTROLLER_FRAMEBUFFERCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_FRAMEBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
......@@ -76,4 +76,4 @@ protected:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_FRAMEBUFFERCONTROL_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_RENDERBUFFERCONTROL_HH
#define ACGL_RESOURCE_RENDERBUFFERCONTROL_HH
#ifndef ACGL_OPENGL_CONTROLLER_RENDERBUFFERCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_RENDERBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
......@@ -59,4 +59,4 @@ protected:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_RENDERBUFFERCONTROL_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_SHADERCONTROLFILE_HH
#define ACGL_RESOURCE_SHADERCONTROLFILE_HH
#ifndef ACGL_OPENGL_CONTROLLER_SHADERCONTROLFILE_HH
#define ACGL_OPENGL_CONTROLLER_SHADERCONTROLFILE_HH
#include <ACGL/ACGL.hh>
......@@ -51,4 +51,4 @@ protected:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_SHADERCONTROLFILE_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_SHADERPROGRAMCONTROLAUTOFILES_HH
#define ACGL_RESOURCE_SHADERPROGRAMCONTROLAUTOFILES_HH
#ifndef ACGL_OPENGL_CONTROLLER_SHADERPROGRAMCONTROLAUTOFILES_HH
#define ACGL_OPENGL_CONTROLLER_SHADERPROGRAMCONTROLAUTOFILES_HH
#include <ACGL/ACGL.hh>
......@@ -39,4 +39,4 @@ public:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_SHADERPROGRAMCONTROLAUTOFILES_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_TEXTURECONTROL_HH
#define ACGL_RESOURCE_TEXTURECONTROL_HH
#ifndef ACGL_OPENGL_CONTROLLER_TEXTURECONTROL_HH
#define ACGL_OPENGL_CONTROLLER_TEXTURECONTROL_HH
#include <ACGL/ACGL.hh>
......@@ -90,4 +90,4 @@ protected:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_TEXTURECONTROL_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_TEXTURECONTROLFILEJPG_HH
#define ACGL_RESOURCE_TEXTURECONTROLFILEJPG_HH
#ifndef ACGL_OPENGL_CONTROLLER_TEXTURECONTROLFILEJPG_HH
#define ACGL_OPENGL_CONTROLLER_TEXTURECONTROLFILEJPG_HH
#include <ACGL/ACGL.hh>
......@@ -57,4 +57,4 @@ protected:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_TEXTURECONTROLFILEJPG_HH
......@@ -3,8 +3,8 @@
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_RESOURCE_VERTEXBUFFERCONTROL_HH
#define ACGL_RESOURCE_VERTEXBUFFERCONTROL_HH
#ifndef ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
......@@ -85,4 +85,4 @@ protected:
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
#endif // ACGL_OPENGL_CONTROLLER_VERTEXBUFFERCONTROL_HH
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment