Commit 92fa58c9 authored by Robert Menzel's avatar Robert Menzel

reordered files

parent edb91c7f
......@@ -13,8 +13,10 @@
#include <utime.h>
#include <sys/stat.h>
#include <ACGL/ACGL.hh>
namespace ACGL{
namespace Utils{
namespace Base{
namespace FileHelpers
{
......@@ -61,7 +63,7 @@ namespace FileHelpers
FileModificationTime getFileModificationTime( const std::string &fileName ) ;
}
} // Utils
} // Base
} // ACGL
#endif // FILEHELPERS_H
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University //
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
/*
* FileHelpersiOS.h
* iOS-Test
*
*/
......@@ -6,13 +6,19 @@
#ifndef ACGL_UTILS_FILEOPERATIONS_HH
#define ACGL_UTILS_FILEOPERATIONS_HH
#include <ACGL/Types.hh>
#include <ACGL/ACGL.hh>
#include <string>
namespace ACGL{
namespace Base{
namespace FileOperations
{
bool rawData(const std::string& _filename, char*& _pData, ACGL::long_t& _size);
};
}
} // Base
} // ACGL
#endif
......@@ -6,6 +6,7 @@
#ifndef ACGL_BASE_FRAMEWORKSETTINGS_HH
#define ACGL_BASE_FRAMEWORKSETTINGS_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Base/Singleton.hh>
#include <string>
......
......@@ -6,6 +6,7 @@
#ifndef SINGLETON_HH
#define SINGLETON_HH
#include <ACGL/ACGL.hh>
#include <tr1/memory>
namespace ACGL{
......
......@@ -6,14 +6,14 @@
#ifndef ACGL_UTILS_STRINGOPERATIONS_HH
#define ACGL_UTILS_STRINGOPERATIONS_HH
#include <ACGL/Types.hh>
#include <ACGL/ACGL.hh>
#include <sstream>
#include <vector>
#include <string>
namespace ACGL{
namespace Utils{
namespace Base{
namespace StringOperations
{
......@@ -40,7 +40,7 @@ namespace StringOperations
}
}
} // Utils
} // Base
} // ACGL
#endif // ACGL_UTILS_STRINGOPERATIONS_HH
......@@ -6,7 +6,7 @@
#ifndef AE_CONSTANTS_H
#define AE_CONSTANTS_H
#include <ACGL/Types.hh>
#include <ACGL/ACGL.hh>
#include <cmath>
#include <limits>
......
......@@ -6,11 +6,13 @@
#ifndef ACGL_MATH_FUNCTIONS_HH
#define ACGL_MATH_FUNCTIONS_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Math/Constants.hh>
#include <ACGL/Types.hh>
#include <cmath>
#include <limits>
#define GLM_SWIZZL
#include <glm/glm.hpp>
namespace ACGL{
......
......@@ -6,6 +6,8 @@
#ifndef ACGL_MATH_HH
#define ACGL_MATH_HH
#include <ACGL/ACGL.hh>
/*
* For our basic vector math we use the GLM library.
* This library has the advantage that it was designed to mimic the
......
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University //
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
#ifndef ACGL_CONTROLLER_HH
#define ACGL_CONTROLLER_HH
#include <ACGL/ACGL.hh>
#include <ACGL/OpenGL/Objects.hh>
#include <ACGL/Resource/NameManager.hh>
#include <ACGL/Resource/FileManager.hh>
#include <ACGL/OpenGL/Controller/ShaderControlFile.hh>
#include <ACGL/OpenGL/Controller/ShaderProgramControlAutoFiles.hh>
#include <ACGL/OpenGL/Controller/TextureControl.hh>
#include <ACGL/OpenGL/Controller/TextureControlFileJPG.hh>
#include <ACGL/OpenGL/Controller/FrameBufferControl.hh>
#include <ACGL/OpenGL/Controller/RenderBufferControl.hh>
#include <ACGL/OpenGL/Controller/VertexBufferControl.hh>
#include <ACGL/OpenGL/Controller/VertexBufferControlFileOBJ.hh>
#include <ACGL/OpenGL/Controller/ArrayBufferControl.hh>
#include <ACGL/OpenGL/Controller/ElementArrayBufferControl.hh>
#endif // ACGL_CONTROLLER_HH
......@@ -6,15 +6,17 @@
#ifndef ACGL_RESOURCE_ARRAYBUFFERCONTROL_HH
#define ACGL_RESOURCE_ARRAYBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/ArrayBuffer.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/ArrayBuffer.hh>
#include <ACGL/OpenGL/GL.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class ArrayBufferControl : public BasicController<ArrayBuffer>
class ArrayBufferControl : public Resource::BasicController<ArrayBuffer>
{
// ==================================================================================================== \/
// ============================================================================================ STRUCTS \/
......@@ -84,7 +86,7 @@ protected:
AttributeDefineVec mAttributeDefines;
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,15 +6,17 @@
#ifndef ACGL_RESOURCE_ELEMENTARRAYBUFFERCONTROL_HH
#define ACGL_RESOURCE_ELEMENTARRAYBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/ElementArrayBuffer.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/ElementArrayBuffer.hh>
#include <ACGL/OpenGL/GL.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class ElementArrayBufferControl : public BasicController<ElementArrayBuffer>
class ElementArrayBufferControl : public Resource::BasicController<ElementArrayBuffer>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
......@@ -74,7 +76,7 @@ protected:
const GLvoid* mpData;
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,15 +6,20 @@
#ifndef ACGL_RESOURCE_FRAMEBUFFERCONTROL_HH
#define ACGL_RESOURCE_FRAMEBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/FrameBuffer.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/FrameBuffer.hh>
#include <ACGL/OpenGL/GL.hh>
#include <ACGL/OpenGL/Objects/Texture.hh>
#include <ACGL/OpenGL/Objects/RenderBuffer.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class FrameBufferControl : public BasicController<FrameBuffer>
class FrameBufferControl : public Resource::BasicController<FrameBuffer>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
......@@ -26,8 +31,8 @@ public:
mColorAttachments(),
mDepthAttachment()
{
mDepthAttachment.name = "";
mDepthAttachment.texture = SharedTexture();
mDepthAttachment.name = "";
mDepthAttachment.texture = SharedTexture();
mDepthAttachment.renderBuffer = SharedRenderBuffer();
}
virtual ~FrameBufferControl() {}
......@@ -36,7 +41,7 @@ public:
// ============================================================================================ METHODS \/
// ==================================================================================================== \/
public:
inline FrameBufferControl& size (GLsizei _width, GLsizei _height) { mWidth = _width; mHeight = _height; return *this; }
inline FrameBufferControl& size (GLsizei _width, GLsizei _height) { mWidth = _width; mHeight = _height; return *this; }
inline FrameBufferControl& depthTexture (const SharedTexture& _pDepthTexture) { mDepthAttachment.texture = _pDepthTexture; return *this; }
inline FrameBufferControl& depthRenderBuffer (const SharedRenderBuffer& _pDepthRenderBuffer) { mDepthAttachment.renderBuffer = _pDepthRenderBuffer; return *this; }
......@@ -69,7 +74,7 @@ protected:
FrameBuffer::Attachment mDepthAttachment;
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,15 +6,17 @@
#ifndef ACGL_RESOURCE_RENDERBUFFERCONTROL_HH
#define ACGL_RESOURCE_RENDERBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/RenderBuffer.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/RenderBuffer.hh>
#include <ACGL/OpenGL/GL.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class RenderBufferControl : public BasicController<RenderBuffer>
class RenderBufferControl : public Resource::BasicController<RenderBuffer>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
......@@ -55,7 +57,7 @@ protected:
GLenum mInternalFormat;
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,16 +6,18 @@
#ifndef ACGL_RESOURCE_SHADERCONTROLFILE_HH
#define ACGL_RESOURCE_SHADERCONTROLFILE_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/FileController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/Shader.hh>
#include <ACGL/Base/Settings.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/Shader.hh>
#include <ACGL/OpenGL/GL.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class ShaderControlFile : public FileController<Shader>
class ShaderControlFile : public Resource::FileController<Shader>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
......@@ -47,7 +49,7 @@ protected:
GLenum mType;
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,16 +6,19 @@
#ifndef ACGL_RESOURCE_SHADERPROGRAMCONTROLAUTOFILES_HH
#define ACGL_RESOURCE_SHADERPROGRAMCONTROLAUTOFILES_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/FileController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/ShaderProgram.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/ShaderProgram.hh>
#include <ACGL/OpenGL/GL.hh>
#include <vector>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class ShaderProgramControlAutoFiles : public FileController<ShaderProgram>
class ShaderProgramControlAutoFiles : public Resource::FileController<ShaderProgram>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
......@@ -34,7 +37,7 @@ public:
virtual bool update(SharedShaderProgram& shaderProgram);
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,15 +6,17 @@
#ifndef ACGL_RESOURCE_TEXTURECONTROL_HH
#define ACGL_RESOURCE_TEXTURECONTROL_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/Texture.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/Texture.hh>
#include <ACGL/OpenGL/GL.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class TextureControl : public BasicController<Texture>
class TextureControl : public Resource::BasicController<Texture>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
......@@ -86,7 +88,7 @@ protected:
GLint mMagFilter;
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,16 +6,18 @@
#ifndef ACGL_RESOURCE_TEXTURECONTROLFILEJPG_HH
#define ACGL_RESOURCE_TEXTURECONTROLFILEJPG_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/FileController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/Texture.hh>
#include <ACGL/Base/Settings.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/Texture.hh>
#include <ACGL/OpenGL/GL.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class TextureControlFileJPG : public FileController<Texture>
class TextureControlFileJPG : public Resource::FileController<Texture>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
......@@ -53,7 +55,7 @@ protected:
GLint mMagFilter;
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,15 +6,17 @@
#ifndef ACGL_RESOURCE_VERTEXBUFFERCONTROL_HH
#define ACGL_RESOURCE_VERTEXBUFFERCONTROL_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/BasicController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/VertexBuffer.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/VertexBuffer.hh>
#include <ACGL/OpenGL/GL.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class VertexBufferControl : public BasicController<VertexBuffer>
class VertexBufferControl : public Resource::BasicController<VertexBuffer>
{
// ==================================================================================================== \/
// ============================================================================================ STRUCTS \/
......@@ -81,7 +83,7 @@ protected:
AttributeDefineVec mAttributeDefines;
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -6,16 +6,18 @@
#ifndef ACGL_RESOURCE_VERTEXBUFFERCONTROLFILEOBJ_HH
#define ACGL_RESOURCE_VERTEXBUFFERCONTROLFILEOBJ_HH
#include <ACGL/ACGL.hh>
#include <ACGL/Resource/FileController.hh>
#include <ACGL/Resource/ResourceTypes.hh>
#include <ACGL/Resource/VertexBuffer.hh>
#include <ACGL/Base/Settings.hh>
#include <ACGL/GL.hh>
#include <ACGL/OpenGL/ResourceTypes.hh>
#include <ACGL/OpenGL/Objects/VertexBuffer.hh>
#include <ACGL/OpenGL/GL.hh>
namespace ACGL{
namespace Resource{
namespace OpenGL{
class VertexBufferControlFileOBJ : public FileController<VertexBuffer>
class VertexBufferControlFileOBJ : public Resource::FileController<VertexBuffer>
{
// ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/
......@@ -37,7 +39,7 @@ public:
virtual bool update(SharedVertexBuffer& vertexBuffer);
};
} // Resource
} // OpenGL
} // ACGL
#endif // ACGL_RESOURCE_TEXTURE_HH
......@@ -7,124 +7,85 @@
#define ACGL_GL_HH
/*
* This simple OpenGL wrapper is used to include OpenGL, GLU, GLUT and GLEW
* This simple OpenGL wrapper is used to include OpenGL and GLEW
* on different platforms.
*
* While these includes are located in a subdirectory of GL/ on most systems,
* Apple hides them on different locations.
*
* Robert Menzel
*/
/*
* defines, what we need.
* Change this if you like.
* You don't have to include GL extra, if you need GLUT etc...
* This header can get configured via compile-time defines:
*
* QT also includes Glu!
*
* USE_GLEW and USE_GLEW_LOCAL are mutual exclusive, define only one
* change GLEW_LOCAL_PATH if you use USE_GLEW_LOCAL!
* -DCOMPILE_WITH_QT : If using ACGL with QT this will also include the qgl.h
* -DCOMPILED_FOR_OGL : 20 21 30 31 32 33 40 41
* -DCOMPILED_FOR_OGL_PROFILE_FULL : full OpenGL profile (>= 2.1)
* -DCOMPILED_FOR_OGL_PROFILE_CORE : core OpenGL profile (>= 3.2)
* -DCOMPILED_FOR_OGL_PROFILE_ES : embedded profile (OpenGL ES 2.0)
* -DSIMULATE_OGL_ES : Simulate ES feature set with desktop OGL
*
* Not all combinations are valid!
*/
#define USE_GL
//#define USE_GLU
//#define USE_GLUT
#define USE_QT
#define USE_GLEW
//#define USE_GLEW_LOCAL
//#define GLEW_LOCAL_PATH <GL/glew.h>
// TODO: remove and move to cmake:
#define COMPILE_WITH_QT
// We can try to build against OpenGL core profile or compatibility (core means automatically
// 3.2 or higher). On MacOS X 10.7 Lion we can choose between 2.1 or 3.2 core, but 3.2
// compatibility is not an option.
//#define USE_OPENGL_CORE_PROFILE
// If we're compiling for an Apple system we need this to distinquish between Mac and iOS:
#ifdef __APPLE__
#include <TargetConditionals.h>
#endif
// always include glew unless on iOS
#define USE_GLEW
#if (defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR))
#if (TARGET_OS_IPHONE == 1)
#define PLATFORM_IOS
#define OPENGL_ES
#ifdef USE_QT
#undef USE_QT
#endif
#ifdef USE_GLEW
#undef USE_GLEW
#endif
#ifdef USE_GLEW_LOCAL
#undef USE_GLEW_LOCAL
#endif
#define PLATFORM_IOS
#define OPENGL_ES
#undef USE_GLEW // no glew support on iOS
#endif
#endif
/*
* No editing needed from here on!
*/
#ifdef USE_GLEW
#ifdef USE_GLEW_LOCAL
#error "OpenGLWrapper.hh: Don't include glew from your OS AND a local glew version..."
#endif
#endif
// we have allways to include glew first!
#ifdef USE_GLEW
#if defined(__APPLE__) || defined(MACOSX)
#include <OpenGL/glew.h>
#else
#include <GL/glew.h>
#endif
#ifdef GLEW_LOCAL_PATH
#include GLEW_LOCAL_PATH
#else
#if defined(__APPLE__) || defined(MACOSX)
#include <OpenGL/glew.h>
#else
#include <GL/glew.h>
#endif
#endif // !GLEW_LOCAL_PATH
#endif // USE_GLEW
#ifdef USE_GLEW_LOCAL
#include GLEW_LOCAL_PATH
#endif // USE_GLEW_LOCAL
#ifdef USE_GL
#if defined(__APPLE__) || defined(MACOSX)
#ifdef OPENGL_ES
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#else
#ifdef USE_OPENGL_CORE_PROFILE
#include <GL3/gl3.h>
#else
#include <OpenGL/gl.h>
#endif
#endif
#else
#if defined(__APPLE__) || defined(MACOSX)
#ifdef OPENGL_ES