Explorar el Código

One step forward to make AnKi library

Panagiotis Christopoulos Charitos hace 14 años
padre
commit
2dbe0c5fc9
Se han modificado 100 ficheros con 290 adiciones y 231 borrados
  1. 5 3
      CMakeLists.txt
  2. 2 1
      anki/CMakeLists.txt
  3. 2 2
      anki/collision/Collision.h
  4. 12 5
      anki/collision/CollisionShape.h
  5. 13 0
      anki/collision/Forward.h
  6. 8 2
      anki/collision/LineSegment.h
  7. 8 2
      anki/collision/Obb.h
  8. 8 3
      anki/collision/PerspectiveCameraShape.h
  9. 8 2
      anki/collision/Plane.h
  10. 8 2
      anki/collision/Ray.h
  11. 8 2
      anki/collision/Sphere.h
  12. 2 2
      anki/core/App.cpp
  13. 2 2
      anki/core/App.h
  14. 2 2
      anki/core/AsyncLoader.h
  15. 2 2
      anki/core/Globals.h
  16. 2 2
      anki/core/Logger.h
  17. 1 1
      anki/core/Object.cpp
  18. 2 2
      anki/core/Object.h
  19. 2 2
      anki/core/ParallelJob.h
  20. 2 2
      anki/core/ParallelManager.h
  21. 2 2
      anki/core/StdinListener.h
  22. 2 2
      anki/event/Event.h
  23. 2 2
      anki/event/EventManager.h
  24. 2 2
      anki/event/MainRendererPpsHdrEvent.h
  25. 2 2
      anki/event/SceneColorEvent.h
  26. 1 1
      anki/gl/BufferObject.cpp
  27. 2 2
      anki/gl/BufferObject.h
  28. 1 1
      anki/gl/Fbo.cpp
  29. 2 2
      anki/gl/Fbo.h
  30. 2 2
      anki/gl/GlException.h
  31. 2 2
      anki/gl/GlStateMachine.h
  32. 2 2
      anki/gl/TimeQuery.h
  33. 2 2
      anki/gl/Vao.cpp
  34. 2 2
      anki/gl/Vao.h
  35. 2 2
      anki/gl/Vbo.h
  36. 2 2
      anki/input/Input.h
  37. 2 2
      anki/math/Axisang.h
  38. 2 2
      anki/math/Euler.h
  39. 2 2
      anki/math/Mat3.h
  40. 2 2
      anki/math/Mat4.h
  41. 2 2
      anki/math/Math.h
  42. 2 2
      anki/math/MathForward.h
  43. 2 2
      anki/math/MathSimd.h
  44. 2 2
      anki/math/Quat.h
  45. 2 2
      anki/math/Transform.h
  46. 2 2
      anki/math/Vec2.h
  47. 2 2
      anki/math/Vec3.h
  48. 2 2
      anki/math/Vec4.h
  49. 3 3
      anki/misc/Parser.h
  50. 2 2
      anki/misc/Parser.inl.h
  51. 2 2
      anki/misc/PropertyTree.cpp
  52. 2 2
      anki/misc/PropertyTree.h
  53. 5 5
      anki/physics/Character.cpp
  54. 2 2
      anki/physics/Character.h
  55. 4 4
      anki/physics/Convertors.h
  56. 3 3
      anki/physics/MotionState.h
  57. 1 1
      anki/physics/PhysWorld.cpp
  58. 4 4
      anki/physics/PhysWorld.h
  59. 2 2
      anki/physics/Ragdoll.h
  60. 5 5
      anki/physics/RigidBody.h
  61. 6 5
      anki/renderer/Bl.cpp
  62. 2 2
      anki/renderer/Bl.h
  63. 2 2
      anki/renderer/Bs.cpp
  64. 2 2
      anki/renderer/Bs.h
  65. 2 2
      anki/renderer/CollisionDbgDrawer.h
  66. 1 1
      anki/renderer/Dbg.cpp
  67. 2 2
      anki/renderer/Dbg.h
  68. 2 2
      anki/renderer/Deformer.h
  69. 1 1
      anki/renderer/Ez.cpp
  70. 2 2
      anki/renderer/Ez.h
  71. 1 1
      anki/renderer/Hdr.cpp
  72. 2 2
      anki/renderer/Hdr.h
  73. 3 3
      anki/renderer/Is.cpp
  74. 2 2
      anki/renderer/Is.h
  75. 5 5
      anki/renderer/MainRenderer.cpp
  76. 2 2
      anki/renderer/MainRenderer.h
  77. 1 1
      anki/renderer/Ms.cpp
  78. 2 2
      anki/renderer/Ms.h
  79. 1 1
      anki/renderer/PhysDbgDrawer.cpp
  80. 2 2
      anki/renderer/PhysDbgDrawer.h
  81. 2 2
      anki/renderer/Pps.cpp
  82. 2 2
      anki/renderer/Pps.h
  83. 1 1
      anki/renderer/Renderer.cpp
  84. 2 2
      anki/renderer/Renderer.h
  85. 2 2
      anki/renderer/RendererInitializer.h
  86. 2 2
      anki/renderer/RenderingPass.h
  87. 2 2
      anki/renderer/SceneDbgDrawer.h
  88. 2 2
      anki/renderer/SceneDrawer.h
  89. 1 1
      anki/renderer/Sm.cpp
  90. 2 2
      anki/renderer/Sm.h
  91. 2 2
      anki/renderer/Smo.h
  92. 1 1
      anki/renderer/Ssao.cpp
  93. 2 2
      anki/renderer/Ssao.h
  94. 2 2
      anki/resource/DummyRsrc.h
  95. 2 2
      anki/resource/Extension.cpp
  96. 2 2
      anki/resource/Extension.h
  97. 23 23
      anki/resource/Image.cpp
  98. 2 2
      anki/resource/Image.h
  99. 3 3
      anki/resource/LightRsrc.cpp
  100. 2 2
      anki/resource/LightRsrc.h

+ 5 - 3
CMakeLists.txt

@@ -1,5 +1,7 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
+PROJECT(ANKI_PROJ)
+
 IF(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
 	ADD_DEFINITIONS("-DPLATFORM_LINUX")
 ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
@@ -29,13 +31,13 @@ ELSE()
 	ADD_DEFINITIONS("-DBOOST_DISABLE_ASSERTS -mtune=core2 -ffast-math")
 ENDIF()
 
-INCLUDE_DIRECTORIES("extern/include")
-INCLUDE_DIRECTORIES("extern/include/bullet")
+INCLUDE_DIRECTORIES("${ANKI_PROJ_SOURCE_DIR}/extern/include")
+INCLUDE_DIRECTORIES("${ANKI_PROJ_SOURCE_DIR}/extern/include/bullet") # Because bullet wants it
 INCLUDE_DIRECTORIES("/usr/include/python2.6")
 INCLUDE_DIRECTORIES("/usr/include/freetype2")
 INCLUDE_DIRECTORIES(.)
 
-LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/extern/lib-x86-64-linux)
+LINK_DIRECTORIES(${ANKI_PROJ_SOURCE_DIR}/extern/lib64)
 
 ADD_SUBDIRECTORY(anki)
 ADD_SUBDIRECTORY(testapp)

+ 2 - 1
anki/CMakeLists.txt

@@ -5,7 +5,8 @@ SUBDIRS(${ANKI_LIBS})
 
 ADD_LIBRARY(anki ${ANKI_LIBS})
 
-TARGET_LINK_LIBRARIES(anki ${ANKI_LIBS} GLEWmx GLU GL jpeg SDL png python2.6
+TARGET_LINK_LIBRARIES(anki ${ANKI_LIBS} BulletSoftBody BulletDynamics 
+	BulletCollision LinearMath GLEWmx GLU GL jpeg SDL png python2.6
 	boost_system boost_python boost_filesystem boost_thread freetype)
 
 SET_TARGET_PROPERTIES(anki PROPERTIES LINKER_LANGUAGE CXX)

+ 2 - 2
anki/collision/Collision.h

@@ -1,5 +1,5 @@
-#ifndef COLLISION_H
-#define COLLISION_H
+#ifndef ANKI_COLLISION_COLLISION_H
+#define ANKI_COLLISION_COLLISION_H
 
 #include "anki/collision/Plane.h"
 #include "anki/collision/Sphere.h"

+ 12 - 5
anki/collision/CollisionShape.h

@@ -1,8 +1,7 @@
-#ifndef COLLISION_SHAPE
-#define COLLISION_SHAPE
+#ifndef ANKI_COLLISION_COLLISION_SHAPE
+#define ANKI_COLLISION_COLLISION_SHAPE
 
-
-class Plane;
+#include "anki/collision/Forward.h"
 
 
 /// @addtogroup Collision
@@ -28,7 +27,12 @@ class CollisionShape
 		class Visitor
 		{
 			public:
-				virtual void visit(class LineSegment&) = 0;
+				virtual void visit(LineSegment&) = 0;
+				virtual void visit(Obb&) = 0;
+				virtual void visit(PerspectiveCameraShape&) = 0;
+				virtual void visit(Plane&) = 0;
+				virtual void visit(Ray&) = 0;
+				virtual void visit(Sphere&) = 0;
 		};
 
 		CollisionShape(CollisionShapeType cid_)
@@ -40,6 +44,9 @@ class CollisionShape
 			return cid;
 		}
 
+		/// Visitor accept
+		virtual void accept(Visitor& v) = 0;
+
 		/// If the bounding volume intersects with the plane then the func
 		/// returns 0, else it returns the distance. If the distance is < 0
 		/// then the collision shape lies behind the plane and if > 0 then in

+ 13 - 0
anki/collision/Forward.h

@@ -0,0 +1,13 @@
+#ifndef ANKI_COLLISION_FORWARD_H
+#define ANKI_COLLISION_FORWARD_H
+
+
+class LineSegment;
+class Obb;
+class PerspectiveCameraShape;
+class Plane;
+class Ray;
+class Sphere;
+
+
+#endif

+ 8 - 2
anki/collision/LineSegment.h

@@ -1,5 +1,5 @@
-#ifndef LINE_SEGMENT_H
-#define LINE_SEGMENT_H
+#ifndef ANKI_COLLISION_LINE_SEGMENT_H
+#define ANKI_COLLISION_LINE_SEGMENT_H
 
 #include "anki/collision/CollisionShape.h"
 #include "anki/math/Vec3.h"
@@ -50,6 +50,12 @@ class LineSegment: public CollisionShape
 		}
 		/// @}
 
+		/// @copydoc CollisionShape::accept
+		void accept(Visitor& v)
+		{
+			v.visit(*this);
+		}
+
 		LineSegment getTransformed(const Transform& transform) const;
 
 		/// Implements CollisionShape::testPlane @see CollisionShape::testPlane

+ 8 - 2
anki/collision/Obb.h

@@ -1,5 +1,5 @@
-#ifndef OBB_H
-#define OBB_H
+#ifndef ANKI_COLLISION_OBB_H
+#define ANKI_COLLISION_OBB_H
 
 #include "anki/collision/CollisionShape.h"
 #include "anki/math/Math.h"
@@ -64,6 +64,12 @@ class Obb: public CollisionShape
 		}
 		/// @}
 
+		/// @copydoc CollisionShape::accept
+		void accept(Visitor& v)
+		{
+			v.visit(*this);
+		}
+
 		Obb getTransformed(const Transform& transform) const;
 
 		/// Get a collision shape that includes this and the given. Its not

+ 8 - 3
anki/collision/PerspectiveCameraShape.h

@@ -1,5 +1,5 @@
-#ifndef PROJECTION_CAMERA_SHAPE_H
-#define PROJECTION_CAMERA_SHAPE_H
+#ifndef ANKI_COLLISION_PROJECTION_CAMERA_SHAPE_H
+#define ANKI_COLLISION_PROJECTION_CAMERA_SHAPE_H
 
 #include "anki/collision/CollisionShape.h"
 #include "anki/math/Math.h"
@@ -24,6 +24,12 @@ class PerspectiveCameraShape: public CollisionShape
 			setAll(fovX, fovY, zNear, zFar, trf);
 		}
 
+		/// @copydoc CollisionShape::accept
+		void accept(Visitor& v)
+		{
+			v.visit(*this);
+		}
+
 		/// @copydoc CollisionShape::testPlane
 		float testPlane(const Plane& p) const;
 
@@ -33,7 +39,6 @@ class PerspectiveCameraShape: public CollisionShape
 		void setAll(float fovX, float fovY, float zNear,
 			float zFar, const Transform& trf);
 
-
 	private:
 		Vec3 eye; ///< The eye point
 		boost::array<Vec3, 4> dirs; ///< Directions

+ 8 - 2
anki/collision/Plane.h

@@ -1,5 +1,5 @@
-#ifndef PLANE_H
-#define PLANE_H
+#ifndef ANKI_COLLISION_PLANE_H
+#define ANKI_COLLISION_PLANE_H
 
 #include "anki/collision/CollisionShape.h"
 #include "anki/math/Math.h"
@@ -62,6 +62,12 @@ class Plane: public CollisionShape
 		}
 		/// @}
 
+		/// @copydoc CollisionShape::accept
+		void accept(Visitor& v)
+		{
+			v.visit(*this);
+		}
+
 		/// Return the transformed
 		Plane getTransformed(const Transform& trf) const;
 

+ 8 - 2
anki/collision/Ray.h

@@ -1,5 +1,5 @@
-#ifndef RAY_H
-#define RAY_H
+#ifndef ANKI_COLLISION_RAY_H
+#define ANKI_COLLISION_RAY_H
 
 #include "anki/collision/CollisionShape.h"
 #include "anki/math/Math.h"
@@ -58,6 +58,12 @@ class Ray: public CollisionShape
 		}
 		/// @}
 
+		/// @copydoc CollisionShape::accept
+		void accept(Visitor& v)
+		{
+			v.visit(*this);
+		}
+
 		Ray getTransformed(const Transform& transform) const;
 
 		/// Implements CollisionShape::testPlane

+ 8 - 2
anki/collision/Sphere.h

@@ -1,5 +1,5 @@
-#ifndef SPHERE_H
-#define SPHERE_H
+#ifndef ANKI_COLLISION_SPHERE_H
+#define ANKI_COLLISION_SPHERE_H
 
 #include "anki/collision/CollisionShape.h"
 #include "anki/math/Math.h"
@@ -59,6 +59,12 @@ class Sphere: public CollisionShape
 		}
 		/// @}
 
+		/// @copydoc CollisionShape::accept
+		void accept(Visitor& v)
+		{
+			v.visit(*this);
+		}
+
 		Sphere getTransformed(const Transform& transform) const;
 
 		/// Get the sphere that includes this sphere and the given. See a

+ 2 - 2
anki/core/App.cpp

@@ -102,7 +102,7 @@ void App::initWindow()
 
 	if(SDL_Init(SDL_INIT_VIDEO) < 0)
 	{
-		throw EXCEPTION("Failed to init SDL_VIDEO");
+		throw ANKI_EXCEPTION("Failed to init SDL_VIDEO");
 	}
 
 	// print driver name
@@ -127,7 +127,7 @@ void App::initWindow()
 
 	if(!windowId)
 	{
-		throw EXCEPTION("Cannot create main window");
+		throw ANKI_EXCEPTION("Cannot create main window");
 	}
 
 	glContext = SDL_GL_CreateContext(windowId);

+ 2 - 2
anki/core/App.h

@@ -1,5 +1,5 @@
-#ifndef APP_H
-#define APP_H
+#ifndef ANKI_CORE_APP_H
+#define ANKI_CORE_APP_H
 
 #include <SDL/SDL.h>
 #include <boost/filesystem.hpp>

+ 2 - 2
anki/core/AsyncLoader.h

@@ -1,5 +1,5 @@
-#ifndef ASYNC_LOADER_H
-#define ASYNC_LOADER_H
+#ifndef ANKI_CORE_ASYNC_LOADER_H
+#define ANKI_CORE_ASYNC_LOADER_H
 
 #include <list>
 #include <string>

+ 2 - 2
anki/core/Globals.h

@@ -1,5 +1,5 @@
-#ifndef GLOBALS_H
-#define GLOBALS_H
+#ifndef ANKI_CORE_GLOBALS_H
+#define ANKI_CORE_GLOBALS_H
 
 #include "anki/util/Singleton.h"
 

+ 2 - 2
anki/core/Logger.h

@@ -1,5 +1,5 @@
-#ifndef LOGGER_H
-#define LOGGER_H
+#ifndef ANKI_CORE_LOGGER_H
+#define ANKI_CORE_LOGGER_H
 
 #include <boost/array.hpp>
 #include <boost/signals2.hpp>

+ 1 - 1
anki/core/Object.cpp

@@ -62,7 +62,7 @@ void Object::removeChild(Object* child)
 
 	if(it == objChilds.end())
 	{
-		throw EXCEPTION("Internal error");
+		throw ANKI_EXCEPTION("Internal error");
 	}
 
 	objChilds.erase(it);

+ 2 - 2
anki/core/Object.h

@@ -1,5 +1,5 @@
-#ifndef OBJECT_H
-#define OBJECT_H
+#ifndef ANKI_CORE_OBJECT_H
+#define ANKI_CORE_OBJECT_H
 
 #include <vector>
 

+ 2 - 2
anki/core/ParallelJob.h

@@ -1,5 +1,5 @@
-#ifndef PARALLEL_JOB_H
-#define PARALLEL_JOB_H
+#ifndef ANKI_CORE_PARALLEL_JOB_H
+#define ANKI_CORE_PARALLEL_JOB_H
 
 #include <boost/thread.hpp>
 

+ 2 - 2
anki/core/ParallelManager.h

@@ -1,5 +1,5 @@
-#ifndef PARALLEL_MANAGER_H
-#define PARALLEL_MANAGER_H
+#ifndef ANKI_CORE_PARALLEL_MANAGER_H
+#define ANKI_CORE_PARALLEL_MANAGER_H
 
 #include "anki/core/ParallelJob.h"
 #include <boost/thread.hpp>

+ 2 - 2
anki/core/StdinListener.h

@@ -1,5 +1,5 @@
-#ifndef STDIN_LISTENER_H
-#define STDIN_LISTENER_H
+#ifndef ANKI_CORE_STDIN_LISTENER_H
+#define ANKI_CORE_STDIN_LISTENER_H
 
 #include <boost/thread/thread.hpp>
 #include <boost/thread/mutex.hpp>

+ 2 - 2
anki/event/Event.h

@@ -1,5 +1,5 @@
-#ifndef EVENT_H
-#define EVENT_H
+#ifndef ANKI_EVENT_EVENT_H
+#define ANKI_EVENT_EVENT_H
 
 #include "anki/util/StdTypes.h"
 

+ 2 - 2
anki/event/EventManager.h

@@ -1,5 +1,5 @@
-#ifndef MANAGER_H
-#define MANAGER_H
+#ifndef ANKI_EVENT_MANAGER_H
+#define ANKI_EVENT_MANAGER_H
 
 #include "anki/event/Event.h"
 #include <boost/ptr_container/ptr_deque.hpp>

+ 2 - 2
anki/event/MainRendererPpsHdrEvent.h

@@ -1,5 +1,5 @@
-#ifndef MAIN_RENDERER_PPS_HDR_EVENT_H
-#define MAIN_RENDERER_PPS_HDR_EVENT_H
+#ifndef ANKI_EVENT_MAIN_RENDERER_PPS_HDR_EVENT_H
+#define ANKI_EVENT_MAIN_RENDERER_PPS_HDR_EVENT_H
 
 #include "anki/event/Event.h"
 

+ 2 - 2
anki/event/SceneColorEvent.h

@@ -1,5 +1,5 @@
-#ifndef SCENE_COLOR_EVENT_H
-#define SCENE_COLOR_EVENT_H
+#ifndef ANKI_EVENT_SCENE_COLOR_EVENT_H
+#define ANKI_EVENT_SCENE_COLOR_EVENT_H
 
 #include "anki/event/Event.h"
 #include "anki/math/Math.h"

+ 1 - 1
anki/gl/BufferObject.cpp

@@ -45,7 +45,7 @@ void BufferObject::create(GLenum target_, uint sizeInBytes_,
 	if(sizeInBytes != (uint)bufferSize)
 	{
 		deleteBuff();
-		throw EXCEPTION("Data size mismatch");
+		throw ANKI_EXCEPTION("Data size mismatch");
 	}
 
 	unbind();

+ 2 - 2
anki/gl/BufferObject.h

@@ -1,5 +1,5 @@
-#ifndef BUFFER_OBJECT_H
-#define BUFFER_OBJECT_H
+#ifndef ANKI_GL_BUFFER_OBJECT_H
+#define ANKI_GL_BUFFER_OBJECT_H
 
 #include <GL/glew.h>
 #include "anki/util/Assert.h"

+ 1 - 1
anki/gl/Fbo.cpp

@@ -26,7 +26,7 @@ void Fbo::checkIfGood() const
 
 	if(status != GL_FRAMEBUFFER_COMPLETE)
 	{
-		throw EXCEPTION("FBO is incomplete: " +
+		throw ANKI_EXCEPTION("FBO is incomplete: " +
 			boost::lexical_cast<std::string>(status));
 	}
 }

+ 2 - 2
anki/gl/Fbo.h

@@ -1,5 +1,5 @@
-#ifndef FBO_H
-#define FBO_H
+#ifndef ANKI_GL_FBO_H
+#define ANKI_GL_FBO_H
 
 #include <GL/glew.h>
 #include "anki/util/Assert.h"

+ 2 - 2
anki/gl/GlException.h

@@ -1,5 +1,5 @@
-#ifndef GL_EXCEPTION_H
-#define GL_EXCEPTION_H
+#ifndef ANKI_GL_GL_EXCEPTION_H
+#define ANKI_GL_GL_EXCEPTION_H
 
 
 /// The function throws an exception if there is an OpenGL error. Use it with

+ 2 - 2
anki/gl/GlStateMachine.h

@@ -1,5 +1,5 @@
-#ifndef GL_STATE_MACHINE_H
-#define GL_STATE_MACHINE_H
+#ifndef ANKI_GL_GL_STATE_MACHINE_H
+#define ANKI_GL_GL_STATE_MACHINE_H
 
 #include <GL/glew.h>
 #include <boost/unordered_map.hpp>

+ 2 - 2
anki/gl/TimeQuery.h

@@ -1,5 +1,5 @@
-#ifndef TIME_QUERY_H
-#define TIME_QUERY_H
+#ifndef ANKI_GL_TIME_QUERY_H
+#define ANKI_GL_TIME_QUERY_H
 
 #include <GL/glew.h>
 #include <boost/array.hpp>

+ 2 - 2
anki/gl/Vao.cpp

@@ -26,7 +26,7 @@ void Vao::attachArrayBufferVbo(const Vbo& vbo, uint attribVarLocation,
 	ASSERT(isCreated());
 	if(vbo.getBufferTarget() != GL_ARRAY_BUFFER)
 	{
-		throw EXCEPTION("Only GL_ARRAY_BUFFER is accepted");
+		throw ANKI_EXCEPTION("Only GL_ARRAY_BUFFER is accepted");
 	}
 
 	ON_GL_FAIL_THROW_EXCEPTION();
@@ -64,7 +64,7 @@ void Vao::attachElementArrayBufferVbo(const Vbo& vbo)
 	ASSERT(isCreated());
 	if(vbo.getBufferTarget() != GL_ELEMENT_ARRAY_BUFFER)
 	{
-		throw EXCEPTION("Only GL_ELEMENT_ARRAY_BUFFER is accepted");
+		throw ANKI_EXCEPTION("Only GL_ELEMENT_ARRAY_BUFFER is accepted");
 	}
 
 	bind();

+ 2 - 2
anki/gl/Vao.h

@@ -1,5 +1,5 @@
-#ifndef VAO_H
-#define VAO_H
+#ifndef ANKI_GL_VAO_H
+#define ANKI_GL_VAO_H
 
 #include "anki/util/StdTypes.h"
 #include "anki/util/Assert.h"

+ 2 - 2
anki/gl/Vbo.h

@@ -1,5 +1,5 @@
-#ifndef VBO_H
-#define VBO_H
+#ifndef ANKI_GL_VBO_H
+#define ANKI_GL_VBO_H
 
 #include "anki/gl/BufferObject.h"
 

+ 2 - 2
anki/input/Input.h

@@ -1,5 +1,5 @@
-#ifndef INPUT_H
-#define INPUT_H
+#ifndef ANKI_INPUT_INPUT_H
+#define ANKI_INPUT_INPUT_H
 
 #include "anki/math/Math.h"
 #include <SDL/SDL_scancode.h>

+ 2 - 2
anki/math/Axisang.h

@@ -1,5 +1,5 @@
-#ifndef AXISANG_H
-#define AXISANG_H
+#ifndef ANKI_MATH_AXISANG_H
+#define ANKI_MATH_AXISANG_H
 
 #include "anki/math/Vec3.h"
 #include "anki/math/MathCommonIncludes.h"

+ 2 - 2
anki/math/Euler.h

@@ -1,5 +1,5 @@
-#ifndef EULER_H
-#define EULER_H
+#ifndef ANKI_MATH_EULER_H
+#define ANKI_MATH_EULER_H
 
 #include "anki/math/MathCommonIncludes.h"
 

+ 2 - 2
anki/math/Mat3.h

@@ -1,5 +1,5 @@
-#ifndef MAT3_H
-#define MAT3_H
+#ifndef ANKI_MATH_MAT3_H
+#define ANKI_MATH_MAT3_H
 
 #include "anki/math/MathCommonIncludes.h"
 

+ 2 - 2
anki/math/Mat4.h

@@ -1,5 +1,5 @@
-#ifndef MAT4_H
-#define MAT4_H
+#ifndef ANKI_MATH_MAT4_H
+#define ANKI_MATH_MAT4_H
 
 #include "anki/math/MathCommonIncludes.h"
 

+ 2 - 2
anki/math/Math.h

@@ -1,5 +1,5 @@
-#ifndef MATH_H
-#define MATH_H
+#ifndef ANKI_MATH_MATH_H
+#define ANKI_MATH_MATH_H
 
 #include "anki/math/MathCommonIncludes.h"
 

+ 2 - 2
anki/math/MathForward.h

@@ -1,5 +1,5 @@
-#ifndef MATH_FORWARD_H
-#define MATH_FORWARD_H
+#ifndef ANKI_MATH_MATH_FORWARD_H
+#define ANKI_MATH_MATH_FORWARD_H
 
 #include <iosfwd>
 

+ 2 - 2
anki/math/MathSimd.h

@@ -1,5 +1,5 @@
-#ifndef MATH_SIMD_H
-#define MATH_SIMD_H
+#ifndef ANKI_MATH_MATH_SIMD_H
+#define ANKI_MATH_MATH_SIMD_H
 
 #if defined(MATH_INTEL_SIMD)
 #	include <smmintrin.h>

+ 2 - 2
anki/math/Quat.h

@@ -1,5 +1,5 @@
-#ifndef QUAT_H
-#define QUAT_H
+#ifndef ANKI_MATH_QUAT_H
+#define ANKI_MATH_QUAT_H
 
 #include "anki/math/MathCommonIncludes.h"
 

+ 2 - 2
anki/math/Transform.h

@@ -1,5 +1,5 @@
-#ifndef TRANSFORM_H
-#define TRANSFORM_H
+#ifndef ANKI_MATH_TRANSFORM_H
+#define ANKI_MATH_TRANSFORM_H
 
 #include "anki/math/Vec3.h"
 #include "anki/math/Mat3.h"

+ 2 - 2
anki/math/Vec2.h

@@ -1,5 +1,5 @@
-#ifndef VEC2_H
-#define VEC2_H
+#ifndef ANKI_MATH_VEC2_H
+#define ANKI_MATH_VEC2_H
 
 #include "anki/math/MathCommonIncludes.h"
 

+ 2 - 2
anki/math/Vec3.h

@@ -1,5 +1,5 @@
-#ifndef VEC3_H
-#define VEC3_H
+#ifndef ANKI_MATH_VEC3_H
+#define ANKI_MATH_VEC3_H
 
 #include "anki/math/MathCommonIncludes.h"
 

+ 2 - 2
anki/math/Vec4.h

@@ -1,5 +1,5 @@
-#ifndef VEC4_H
-#define VEC4_H
+#ifndef ANKI_MATH_VEC4_H
+#define ANKI_MATH_VEC4_H
 
 #include "anki/math/MathCommonIncludes.h"
 

+ 3 - 3
anki/misc/Parser.h

@@ -1,5 +1,5 @@
-#ifndef PARSER_H
-#define PARSER_H
+#ifndef ANKI_MISC_PARSER_H
+#define ANKI_MISC_PARSER_H
 
 #include <boost/lexical_cast.hpp>
 #include "anki/util/Exception.h"
@@ -12,7 +12,7 @@ namespace parser {
 
 /// Parser macros
 #define PARSER_EXCEPTION(x) \
-	EXCEPTION("Parser exception (" + scanner.getScriptName() + ':' + \
+	ANKI_EXCEPTION("Parser exception (" + scanner.getScriptName() + ':' + \
 	boost::lexical_cast<std::string>(scanner.getLineNumber()) + "): " + x)
 
 #define PARSER_EXCEPTION_EXPECTED(x) \

+ 2 - 2
anki/misc/Parser.inl.h

@@ -131,7 +131,7 @@ void parseNumber(scanner::Scanner& scanner, bool sign, Type& out)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION(e.what());
+		throw ANKI_EXCEPTION(e.what());
 	}
 }
 
@@ -170,7 +170,7 @@ void parseMathVector(scanner::Scanner& scanner, Type& out)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION(e.what());
+		throw ANKI_EXCEPTION(e.what());
 	}
 }
 

+ 2 - 2
anki/misc/PropertyTree.cpp

@@ -21,7 +21,7 @@ bool getBool(const boost::property_tree::ptree& pt, const char* tag)
 	}
 	else
 	{
-		throw EXCEPTION("Expected true or false for tag " + tag +
+		throw ANKI_EXCEPTION("Expected true or false for tag " + tag +
 			" and not " + str);
 	}
 }
@@ -46,7 +46,7 @@ extern boost::optional<bool> getBoolOptional(
 		}
 		else
 		{
-			throw EXCEPTION("Expected true or false for tag " + tag +
+			throw ANKI_EXCEPTION("Expected true or false for tag " + tag +
 				" and not " + str.get());
 		}
 	}

+ 2 - 2
anki/misc/PropertyTree.h

@@ -1,5 +1,5 @@
-#ifndef PROPERTY_TREE_H
-#define PROPERTY_TREE_H
+#ifndef ANKI_MISC_PROPERTY_TREE_H
+#define ANKI_MISC_PROPERTY_TREE_H
 
 #include <boost/optional.hpp>
 #include <boost/property_tree/ptree_fwd.hpp>

+ 5 - 5
anki/physics/Character.cpp

@@ -1,13 +1,13 @@
-#include <algorithm>
-#include <btBulletCollisionCommon.h>
-#include <btBulletDynamicsCommon.h>
-#include <BulletCollision/CollisionDispatch/btGhostObject.h>
-#include <BulletDynamics/Character/btKinematicCharacterController.h>
 #include "anki/physics/Character.h"
 #include "anki/physics/PhysWorld.h"
 #include "anki/physics/MotionState.h"
 #include "anki/physics/RigidBody.h"
 #include "anki/physics/PhysWorld.h"
+#include <algorithm>
+#include <bullet/btBulletCollisionCommon.h>
+#include <bullet/btBulletDynamicsCommon.h>
+#include <bullet/BulletCollision/CollisionDispatch/btGhostObject.h>
+#include <bullet/BulletDynamics/Character/btKinematicCharacterController.h>
 
 
 //==============================================================================

+ 2 - 2
anki/physics/Character.h

@@ -1,5 +1,5 @@
-#ifndef CHARACTER_H
-#define CHARACTER_H
+#ifndef ANKI_PHYSICS_CHARACTER_H
+#define ANKI_PHYSICS_CHARACTER_H
 
 #include "anki/math/Math.h"
 #include "anki/core/Object.h"

+ 4 - 4
anki/physics/Convertors.h

@@ -1,9 +1,9 @@
-#ifndef CONVERTORS_H
-#define CONVERTORS_H
+#ifndef ANKI_PHYSICS_CONVERTORS_H
+#define ANKI_PHYSICS_CONVERTORS_H
 
-#include <btBulletCollisionCommon.h>
-#include <btBulletDynamicsCommon.h>
 #include "anki/math/Math.h"
+#include <bullet/btBulletCollisionCommon.h>
+#include <bullet/btBulletDynamicsCommon.h>
 
 
 inline Vec3 toAnki(const btVector3& v)

+ 3 - 3
anki/physics/MotionState.h

@@ -1,7 +1,7 @@
-#ifndef MOTION_STATE_H
-#define MOTION_STATE_H
+#ifndef ANKI_PHYSICS_MOTION_STATE_H
+#define ANKI_PHYSICS_MOTION_STATE_H
 
-#include <LinearMath/btMotionState.h>
+#include <bullet/LinearMath/btMotionState.h>
 #include "anki/scene/SceneNode.h"
 
 

+ 1 - 1
anki/physics/PhysWorld.cpp

@@ -1,4 +1,4 @@
-#include <BulletCollision/CollisionDispatch/btGhostObject.h>
+#include <bullet/BulletCollision/CollisionDispatch/btGhostObject.h>
 #include "anki/physics/PhysWorld.h"
 #include "anki/physics/Character.h"
 #include "anki/physics/MotionState.h"

+ 4 - 4
anki/physics/PhysWorld.h

@@ -1,11 +1,11 @@
-#ifndef PHYS_WORLD_H
-#define PHYS_WORLD_H
+#ifndef ANKI_PHYSICS_PHYS_WORLD_H
+#define ANKI_PHYSICS_PHYS_WORLD_H
 
 #include "anki/physics/Convertors.h"
 #include <vector>
 #include <boost/scoped_ptr.hpp>
-#include <btBulletCollisionCommon.h>
-#include <btBulletDynamicsCommon.h>
+#include <bullet/btBulletCollisionCommon.h>
+#include <bullet/btBulletDynamicsCommon.h>
 
 
 class btIDebugDraw;

+ 2 - 2
anki/physics/Ragdoll.h

@@ -1,5 +1,5 @@
-/*#ifndef _RAGDOLL_H_
-#define _RAGDOLL_H_
+/*#ifndef ANKI_PHYSICS__RAGDOLL_H_
+#define ANKI_PHYSICS__RAGDOLL_H_
 
 #include "anki/physics/PhyCommon.h"
 

+ 5 - 5
anki/physics/RigidBody.h

@@ -1,10 +1,10 @@
-#ifndef RIGID_BODY_H
-#define RIGID_BODY_H
+#ifndef ANKI_PHYSICS_RIGID_BODY_H
+#define ANKI_PHYSICS_RIGID_BODY_H
 
-#include <boost/scoped_ptr.hpp>
-#include <btBulletDynamicsCommon.h>
-#include <btBulletCollisionCommon.h>
 #include "anki/math/Math.h"
+#include <boost/scoped_ptr.hpp>
+#include <bullet/btBulletDynamicsCommon.h>
+#include <bullet/btBulletCollisionCommon.h>
 
 
 class SceneNode;

+ 6 - 5
anki/renderer/Bl.cpp

@@ -40,8 +40,8 @@ void Bl::init(const RendererInitializer& initializer)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create horizontal blur post-processing stage "
-			"FBO: " + e.what());
+		throw ANKI_EXCEPTION("Cannot create horizontal blur "
+			"post-processing stage FBO: " + e.what());
 	}
 
 	hBlurSProg.loadRsrc(ShaderProgram::createSrcCodeToCache(
@@ -58,8 +58,8 @@ void Bl::init(const RendererInitializer& initializer)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create vertical blur post-processing stage "
-			"FBO: " + e.what());
+		throw ANKI_EXCEPTION("Cannot create vertical blur "
+			"post-processing stage FBO: " + e.what());
 	}
 
 	vBlurSProg.loadRsrc(ShaderProgram::createSrcCodeToCache(
@@ -76,7 +76,8 @@ void Bl::init(const RendererInitializer& initializer)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create side blur post-processing stage FBO: " +
+		throw ANKI_EXCEPTION("Cannot create side blur "
+			"post-processing stage FBO: " +
 			e.what());
 	}
 

+ 2 - 2
anki/renderer/Bl.h

@@ -1,5 +1,5 @@
-#ifndef BL_H
-#define BL_H
+#ifndef ANKI_RENDERER_BL_H
+#define ANKI_RENDERER_BL_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/resource/Texture.h"

+ 2 - 2
anki/renderer/Bs.cpp

@@ -39,7 +39,7 @@ void Bs::createFbo()
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Failed to create blending stage FBO");
+		throw ANKI_EXCEPTION("Failed to create blending stage FBO");
 	}
 }
 
@@ -67,7 +67,7 @@ void Bs::createRefractFbo()
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Failed to create blending stage refract FBO");
+		throw ANKI_EXCEPTION("Failed to create blending stage refract FBO");
 	}
 }
 

+ 2 - 2
anki/renderer/Bs.h

@@ -1,5 +1,5 @@
-#ifndef BS_H
-#define BS_H
+#ifndef ANKI_RENDERER_BS_H
+#define ANKI_RENDERER_BS_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/gl/Fbo.h"

+ 2 - 2
anki/renderer/CollisionDbgDrawer.h

@@ -1,5 +1,5 @@
-#ifndef COLLISION_DBG_DRAWER_H
-#define COLLISION_DBG_DRAWER_H
+#ifndef ANKI_RENDERER_COLLISION_DBG_DRAWER_H
+#define ANKI_RENDERER_COLLISION_DBG_DRAWER_H
 
 
 class Sphere;

+ 1 - 1
anki/renderer/Dbg.cpp

@@ -216,7 +216,7 @@ void Dbg::init(const RendererInitializer& initializer)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create debug FBO: " + e.what());
+		throw ANKI_EXCEPTION("Cannot create debug FBO: " + e.what());
 	}
 
 	//

+ 2 - 2
anki/renderer/Dbg.h

@@ -1,5 +1,5 @@
-#ifndef DBG_H
-#define DBG_H
+#ifndef ANKI_RENDERER_DBG_H
+#define ANKI_RENDERER_DBG_H
 
 #include <boost/array.hpp>
 #include <map>

+ 2 - 2
anki/renderer/Deformer.h

@@ -1,5 +1,5 @@
-#ifndef DEFORMER_H
-#define DEFORMER_H
+#ifndef ANKI_RENDERER_DEFORMER_H
+#define ANKI_RENDERER_DEFORMER_H
 
 #include "anki/resource/RsrcPtr.h"
 

+ 1 - 1
anki/renderer/Ez.cpp

@@ -36,7 +36,7 @@ void Ez::init(const RendererInitializer& initializer)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create EarlyZ FBO");
+		throw ANKI_EXCEPTION("Cannot create EarlyZ FBO");
 	}
 }
 

+ 2 - 2
anki/renderer/Ez.h

@@ -1,5 +1,5 @@
-#ifndef EZ_H
-#define EZ_H
+#ifndef ANKI_RENDERER_EZ_H
+#define ANKI_RENDERER_EZ_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/gl/Fbo.h"

+ 1 - 1
anki/renderer/Hdr.cpp

@@ -51,7 +51,7 @@ void Hdr::initFbo(Fbo& fbo, Texture& fai)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create deferred shading post-processing "
+		throw ANKI_EXCEPTION("Cannot create deferred shading post-processing "
 			"stage HDR passes FBO: " + e.what());
 	}
 }

+ 2 - 2
anki/renderer/Hdr.h

@@ -1,5 +1,5 @@
-#ifndef HDR_H
-#define HDR_H
+#ifndef ANKI_RENDERER_HDR_H
+#define ANKI_RENDERER_HDR_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/gl/Fbo.h"

+ 3 - 3
anki/renderer/Is.cpp

@@ -61,7 +61,7 @@ void Is::initFbo()
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create deferred shading illumination "
+		throw ANKI_EXCEPTION("Cannot create deferred shading illumination "
 			"stage FBO: " + e.what());
 	}
 }
@@ -95,8 +95,8 @@ void Is::initCopy()
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create deferred shading illumination stage "
-			"additional FBO: " + e.what());
+		throw ANKI_EXCEPTION("Cannot create deferred shading "
+			"illumination stage additional FBO: " + e.what());
 	}
 }
 

+ 2 - 2
anki/renderer/Is.h

@@ -1,5 +1,5 @@
-#ifndef IS_H
-#define IS_H
+#ifndef ANKI_RENDERER_IS_H
+#define ANKI_RENDERER_IS_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/gl/Fbo.h"

+ 5 - 5
anki/renderer/MainRenderer.cpp

@@ -67,7 +67,7 @@ void MainRenderer::initGl()
 	GLenum err = glewInit();
 	if(err != GLEW_OK)
 	{
-		throw EXCEPTION("GLEW initialization failed");
+		throw ANKI_EXCEPTION("GLEW initialization failed");
 	}
 
 	// Ignore re first error
@@ -106,7 +106,7 @@ void MainRenderer::initGl()
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("OpenGL initialization failed: " + e.what());
+		throw ANKI_EXCEPTION("OpenGL initialization failed: " + e.what());
 	}
 }
 
@@ -158,7 +158,7 @@ void MainRenderer::takeScreenshotTga(const char* filename)
 	fs.open(filename, std::ios::out | std::ios::binary);
 	if(!fs.is_open())
 	{
-		throw EXCEPTION("Cannot create screenshot. File \"" + filename + "\"");
+		throw ANKI_EXCEPTION("Cannot create screenshot. File \"" + filename + "\"");
 	}
 
 	// write headers
@@ -199,7 +199,7 @@ void MainRenderer::takeScreenshotJpeg(const char* filename)
 
 	if(!outfile)
 	{
-		throw EXCEPTION("Cannot open file \"" + filename + "\"");
+		throw ANKI_EXCEPTION("Cannot open file \"" + filename + "\"");
 	}
 
 	// set jpg params
@@ -260,7 +260,7 @@ void MainRenderer::takeScreenshot(const char* filename)
 	}
 	else
 	{
-		throw EXCEPTION("File \"" + filename + "\": Unsupported extension");
+		throw ANKI_EXCEPTION("File \"" + filename + "\": Unsupported extension");
 	}
 	//INFO("Screenshot \"" << filename << "\" saved");
 }

+ 2 - 2
anki/renderer/MainRenderer.h

@@ -1,5 +1,5 @@
-#ifndef MAIN_RENDERER_H
-#define MAIN_RENDERER_H
+#ifndef ANKI_RENDERER_MAIN_RENDERER_H
+#define ANKI_RENDERER_MAIN_RENDERER_H
 
 #include "anki/renderer/Renderer.h"
 #include <boost/scoped_ptr.hpp>

+ 1 - 1
anki/renderer/Ms.cpp

@@ -71,7 +71,7 @@ void Ms::init(const RendererInitializer& initializer)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create deferred shading material stage FBO: " +
+		throw ANKI_EXCEPTION("Cannot create deferred shading material stage FBO: " +
 			e.what());
 	}
 

+ 2 - 2
anki/renderer/Ms.h

@@ -1,5 +1,5 @@
-#ifndef MS_H
-#define MS_H
+#ifndef ANKI_RENDERER_MS_H
+#define ANKI_RENDERER_MS_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/resource/Texture.h"

+ 1 - 1
anki/renderer/PhysDbgDrawer.cpp

@@ -81,7 +81,7 @@ void PhysDbgDrawer::drawContactPoint(const btVector3& /*pointOnB*/,
 //==============================================================================
 void PhysDbgDrawer::reportErrorWarning(const char* warningString)
 {
-	throw EXCEPTION(warningString);
+	throw ANKI_EXCEPTION(warningString);
 }
 
 

+ 2 - 2
anki/renderer/PhysDbgDrawer.h

@@ -1,5 +1,5 @@
-#ifndef PHY_DBG_DRAWER_H
-#define PHY_DBG_DRAWER_H
+#ifndef ANKI_RENDERER_PHY_DBG_DRAWER_H
+#define ANKI_RENDERER_PHY_DBG_DRAWER_H
 
 #include <LinearMath/btIDebugDraw.h>
 

+ 2 - 2
anki/renderer/Pps.cpp

@@ -50,7 +50,7 @@ void Pps::init(const RendererInitializer& initializer)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create pre-pass post-processing stage FBO: " +
+		throw ANKI_EXCEPTION("Cannot create pre-pass post-processing stage FBO: " +
 			e.what());
 	}
 
@@ -83,7 +83,7 @@ void Pps::init(const RendererInitializer& initializer)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create post-pass post-processing stage FBO: " +
+		throw ANKI_EXCEPTION("Cannot create post-pass post-processing stage FBO: " +
 			e.what());
 	}
 

+ 2 - 2
anki/renderer/Pps.h

@@ -1,5 +1,5 @@
-#ifndef PPS_H
-#define PPS_H
+#ifndef ANKI_RENDERER_PPS_H
+#define ANKI_RENDERER_PPS_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/gl/Fbo.h"

+ 1 - 1
anki/renderer/Renderer.cpp

@@ -40,7 +40,7 @@ void Renderer::init(const RendererInitializer& initializer)
 	// a few sanity checks
 	if(width < 10 || height < 10)
 	{
-		throw EXCEPTION("Incorrect sizes");
+		throw ANKI_EXCEPTION("Incorrect sizes");
 	}
 
 	// init the stages. Careful with the order!!!!!!!!!!

+ 2 - 2
anki/renderer/Renderer.h

@@ -1,5 +1,5 @@
-#ifndef RENDERER_H
-#define RENDERER_H
+#ifndef ANKI_RENDERER_RENDERER_H
+#define ANKI_RENDERER_RENDERER_H
 
 #include "anki/math/Math.h"
 #include "anki/gl/Fbo.h"

+ 2 - 2
anki/renderer/RendererInitializer.h

@@ -1,5 +1,5 @@
-#ifndef RENDERER_INITIALIZER_H
-#define RENDERER_INITIALIZER_H
+#ifndef ANKI_RENDERER_RENDERER_INITIALIZER_H
+#define ANKI_RENDERER_RENDERER_INITIALIZER_H
 
 #include <cstring>
 

+ 2 - 2
anki/renderer/RenderingPass.h

@@ -1,5 +1,5 @@
-#ifndef RENDERING_PASS_H
-#define RENDERING_PASS_H
+#ifndef ANKI_RENDERER_RENDERING_PASS_H
+#define ANKI_RENDERER_RENDERING_PASS_H
 
 
 class Renderer;

+ 2 - 2
anki/renderer/SceneDbgDrawer.h

@@ -1,5 +1,5 @@
-#ifndef SCENE_DBG_DRAWER_H
-#define SCENE_DBG_DRAWER_H
+#ifndef ANKI_RENDERER_SCENE_DBG_DRAWER_H
+#define ANKI_RENDERER_SCENE_DBG_DRAWER_H
 
 
 class Camera;

+ 2 - 2
anki/renderer/SceneDrawer.h

@@ -1,5 +1,5 @@
-#ifndef SCENE_DRAWER_H
-#define SCENE_DRAWER_H
+#ifndef ANKI_RENDERER_SCENE_DRAWER_H
+#define ANKI_RENDERER_SCENE_DRAWER_H
 
 #include "anki/math/Math.h"
 #include "anki/resource/MaterialCommon.h"

+ 1 - 1
anki/renderer/Sm.cpp

@@ -91,7 +91,7 @@ void Sm::initLevel(uint resolution, float distance, bool bilinear, Level& level)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create shadowmapping FBO: " + e.what());
+		throw ANKI_EXCEPTION("Cannot create shadowmapping FBO: " + e.what());
 	}
 }
 

+ 2 - 2
anki/renderer/Sm.h

@@ -1,5 +1,5 @@
-#ifndef SM_H
-#define SM_H
+#ifndef ANKI_RENDERER_SM_H
+#define ANKI_RENDERER_SM_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/gl/Fbo.h"

+ 2 - 2
anki/renderer/Smo.h

@@ -1,5 +1,5 @@
-#ifndef SMO_H
-#define SMO_H
+#ifndef ANKI_RENDERER_SMO_H
+#define ANKI_RENDERER_SMO_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/gl/Fbo.h"

+ 1 - 1
anki/renderer/Ssao.cpp

@@ -38,7 +38,7 @@ void Ssao::createFbo(Fbo& fbo, Texture& fai)
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Cannot create deferred shading post-processing "
+		throw ANKI_EXCEPTION("Cannot create deferred shading post-processing "
 			"stage SSAO blur FBO: " + e.what());
 	}
 }

+ 2 - 2
anki/renderer/Ssao.h

@@ -1,5 +1,5 @@
-#ifndef SSAO_H
-#define SSAO_H
+#ifndef ANKI_RENDERER_SSAO_H
+#define ANKI_RENDERER_SSAO_H
 
 #include "anki/renderer/RenderingPass.h"
 #include "anki/gl/Fbo.h"

+ 2 - 2
anki/resource/DummyRsrc.h

@@ -1,5 +1,5 @@
-#ifndef DUMMY_RSRC_H
-#define DUMMY_RSRC_H
+#ifndef ANKI_RESOURCE_DUMMY_RSRC_H
+#define ANKI_RESOURCE_DUMMY_RSRC_H
 
 
 /// A dummy resource for the unit tests of the ResourceManager

+ 2 - 2
anki/resource/Extension.cpp

@@ -12,14 +12,14 @@ void Extension::load(const char* /*filename*/)
 	libHandle = dlopen(filename, RTLD_LAZY);
 	if(libHandle == NULL)
 	{
-		throw EXCEPTION("File \"" + filename + "\": " + dlerror());
+		throw ANKI_EXCEPTION("File \"" + filename + "\": " + dlerror());
 	}
 	
 	// get FooBar
 	foobarPtr = (int(*)(void*))(dlsym(libHandle, "FooBar"));
 	if(foobarPtr == NULL)
 	{
-		throw EXCEPTION("File \"" + filename +
+		throw ANKI_EXCEPTION("File \"" + filename +
 			"\": \"FooBar\" entry symbol not found: " + dlerror());
 	}*/
 }

+ 2 - 2
anki/resource/Extension.h

@@ -1,5 +1,5 @@
-#ifndef EXTENSION_H
-#define EXTENSION_H
+#ifndef ANKI_RESOURCE_EXTENSION_H
+#define ANKI_RESOURCE_EXTENSION_H
 
 #include "anki/util/StdTypes.h"
 

+ 23 - 23
anki/resource/Image.cpp

@@ -21,7 +21,7 @@ void Image::loadUncompressedTga(std::fstream& fs, uint& bpp)
 	fs.read((char*)&header6[0], sizeof(header6));
 	if(fs.gcount() != sizeof(header6))
 	{
-		throw EXCEPTION("Cannot read info header");
+		throw ANKI_EXCEPTION("Cannot read info header");
 	}
 
 	width  = header6[1] * 256 + header6[0];
@@ -30,7 +30,7 @@ void Image::loadUncompressedTga(std::fstream& fs, uint& bpp)
 
 	if((width <= 0) || (height <= 0) || ((bpp != 24) && (bpp != 32)))
 	{
-		throw EXCEPTION("Invalid image information");
+		throw ANKI_EXCEPTION("Invalid image information");
 	}
 
 	// read the data
@@ -41,7 +41,7 @@ void Image::loadUncompressedTga(std::fstream& fs, uint& bpp)
 	fs.read(reinterpret_cast<char*>(&data[0]), imageSize);
 	if(fs.gcount() != imageSize)
 	{
-		throw EXCEPTION("Cannot read image data");
+		throw ANKI_EXCEPTION("Cannot read image data");
 	}
 
 	// swap red with blue
@@ -63,7 +63,7 @@ void Image::loadCompressedTga(std::fstream& fs, uint& bpp)
 	fs.read((char*)&header6[0], sizeof(header6));
 	if(fs.gcount() != sizeof(header6))
 	{
-		throw EXCEPTION("Cannot read info header");
+		throw ANKI_EXCEPTION("Cannot read info header");
 	}
 
 	width  = header6[1] * 256 + header6[0];
@@ -72,7 +72,7 @@ void Image::loadCompressedTga(std::fstream& fs, uint& bpp)
 
 	if((width <= 0) || (height <= 0) || ((bpp != 24) && (bpp != 32)))
 	{
-		throw EXCEPTION("Invalid texture information");
+		throw ANKI_EXCEPTION("Invalid texture information");
 	}
 
 
@@ -92,7 +92,7 @@ void Image::loadCompressedTga(std::fstream& fs, uint& bpp)
 		fs.read((char*)&chunkheader, sizeof(unsigned char));
 		if(fs.gcount() != sizeof(unsigned char))
 		{
-			throw EXCEPTION("Cannot read RLE header");
+			throw ANKI_EXCEPTION("Cannot read RLE header");
 		}
 
 		if(chunkheader < 128)
@@ -103,7 +103,7 @@ void Image::loadCompressedTga(std::fstream& fs, uint& bpp)
 				fs.read((char*)&colorbuffer[0], bytesPerPxl);
 				if(fs.gcount() != bytesPerPxl)
 				{
-					throw EXCEPTION("Cannot read image data");
+					throw ANKI_EXCEPTION("Cannot read image data");
 				}
 
 				data[currentbyte		] = colorbuffer[2];
@@ -120,7 +120,7 @@ void Image::loadCompressedTga(std::fstream& fs, uint& bpp)
 
 				if(currentpixel > pixelcount)
 				{
-					throw EXCEPTION("Too many pixels read");
+					throw ANKI_EXCEPTION("Too many pixels read");
 				}
 			}
 		}
@@ -130,7 +130,7 @@ void Image::loadCompressedTga(std::fstream& fs, uint& bpp)
 			fs.read((char*)&colorbuffer[0], bytesPerPxl);
 			if(fs.gcount() != bytesPerPxl)
 			{
-				throw EXCEPTION("Cannot read from file");
+				throw ANKI_EXCEPTION("Cannot read from file");
 			}
 
 			for(int counter = 0; counter < chunkheader; counter++)
@@ -149,7 +149,7 @@ void Image::loadCompressedTga(std::fstream& fs, uint& bpp)
 
 				if(currentpixel > pixelcount)
 				{
-					throw EXCEPTION("Too many pixels read");
+					throw ANKI_EXCEPTION("Too many pixels read");
 				}
 			}
 		}
@@ -169,14 +169,14 @@ void Image::loadTga(const char* filename)
 
 	if(!fs.is_open())
 	{
-		throw EXCEPTION("Cannot open file");
+		throw ANKI_EXCEPTION("Cannot open file");
 	}
 
 	fs.read(&myTgaHeader[0], sizeof(myTgaHeader));
 	if(fs.gcount() != sizeof(myTgaHeader))
 	{
 		fs.close();
-		throw EXCEPTION("Cannot read file header");
+		throw ANKI_EXCEPTION("Cannot read file header");
 	}
 
 	if(memcmp(tgaHeaderUncompressed, &myTgaHeader[0], sizeof(myTgaHeader)) == 0)
@@ -190,7 +190,7 @@ void Image::loadTga(const char* filename)
 	}
 	else
 	{
-		throw EXCEPTION("Invalid image header");
+		throw ANKI_EXCEPTION("Invalid image header");
 	}
 
 	if(bpp == 32)
@@ -203,7 +203,7 @@ void Image::loadTga(const char* filename)
 	}
 	else
 	{
-		throw EXCEPTION("Invalid bps");
+		throw ANKI_EXCEPTION("Invalid bps");
 	}
 
 	fs.close();
@@ -264,7 +264,7 @@ bool Image::loadPng(const char* filename, std::string& err) throw()
 	pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
 	if(!pngPtr)
 	{
-		throw EXCEPTION("png_create_read_struct failed");
+		throw ANKI_EXCEPTION("png_create_read_struct failed");
 		goto cleanup;
 	}
 
@@ -330,7 +330,7 @@ bool Image::loadPng(const char* filename, std::string& err) throw()
 				// do nothing
 				break;
 			default:
-				throw EXCEPTION("Forgot to handle a color type");
+				throw ANKI_EXCEPTION("Forgot to handle a color type");
 				break;
 		}
 
@@ -448,7 +448,7 @@ void Image::load(const char* filename)
 			std::string err;
 			if(!loadPng(filename, err))
 			{
-				throw EXCEPTION(err);
+				throw ANKI_EXCEPTION(err);
 			}
 		}
 		else if(ext == ".dds")
@@ -457,12 +457,12 @@ void Image::load(const char* filename)
 		}
 		else
 		{
-			throw EXCEPTION("Unsupported extension");
+			throw ANKI_EXCEPTION("Unsupported extension");
 		}
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("File \"" + filename + "\": " + e.what());
+		throw ANKI_EXCEPTION("File \"" + filename + "\": " + e.what());
 	}
 }
 
@@ -628,7 +628,7 @@ void Image::loadDds(const char* filename)
 
 	if(!in.is_open())
 	{
-		throw EXCEPTION("Cannot open file");
+		throw ANKI_EXCEPTION("Cannot open file");
 	}
 
 	//
@@ -641,7 +641,7 @@ void Image::loadDds(const char* filename)
 		!(hdr.data.dwFlags & DDSD_PIXELFORMAT) ||
 		!(hdr.data.dwFlags & DDSD_CAPS))
 	{
-		throw EXCEPTION("Incorrect DDS header");
+		throw ANKI_EXCEPTION("Incorrect DDS header");
 	}
 
 	//
@@ -666,7 +666,7 @@ void Image::loadDds(const char* filename)
 	}
 	else
 	{
-		throw EXCEPTION("Unsupported DDS format");
+		throw ANKI_EXCEPTION("Unsupported DDS format");
 	}
 
 	//
@@ -676,7 +676,7 @@ void Image::loadDds(const char* filename)
 		hdr.data.dwMipMapCount : 1;
 	if(mipMapCount != 1)
 	{
-		throw EXCEPTION("Currently mipmaps are not supported in DDS");
+		throw ANKI_EXCEPTION("Currently mipmaps are not supported in DDS");
 	}
 
 	uint x = hdr.data.dwWidth;

+ 2 - 2
anki/resource/Image.h

@@ -1,5 +1,5 @@
-#ifndef IMAGE_H
-#define IMAGE_H
+#ifndef ANKI_RESOURCE_IMAGE_H
+#define ANKI_RESOURCE_IMAGE_H
 
 #include "anki/util/StdTypes.h"
 #include "anki/util/Util.h"

+ 3 - 3
anki/resource/LightRsrc.cpp

@@ -54,7 +54,7 @@ void LightRsrc::load(const char* filename)
 		}
 		else
 		{
-			throw EXCEPTION("Incorrect type: " + type_);
+			throw ANKI_EXCEPTION("Incorrect type: " + type_);
 		}
 
 		//
@@ -210,13 +210,13 @@ void LightRsrc::load(const char* filename)
 			}
 			else
 			{
-				throw EXCEPTION("Incorrect cameraYype: " + cam.get());
+				throw ANKI_EXCEPTION("Incorrect cameraYype: " + cam.get());
 			}
 		}
 
 	}
 	catch(std::exception& e)
 	{
-		throw EXCEPTION("Material \"" + filename + "\": " + e.what());
+		throw ANKI_EXCEPTION("Material \"" + filename + "\": " + e.what());
 	}
 }

+ 2 - 2
anki/resource/LightRsrc.h

@@ -1,5 +1,5 @@
-#ifndef LIGHT_PROPS_H
-#define LIGHT_PROPS_H
+#ifndef ANKI_RESOURCE_LIGHT_PROPS_H
+#define ANKI_RESOURCE_LIGHT_PROPS_H
 
 #include "anki/math/Math.h"
 #include "anki/resource/RsrcPtr.h"

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio