Explorar o código

*Working on new coding style
*Improving the SSAO bluring
*Working on the first Bullet demo. Its working

Panagiotis Christopoulos Charitos %!s(int64=16) %!d(string=hai) anos
pai
achega
7a26d33dd4

+ 4 - 4
build/README

@@ -13,16 +13,16 @@ make
 
 And the build will will begin. 
 
-Sometimes I forget to update all the targets. The debug is always updated though.
+Sometimes I forget to update all the targets. The debug is always updated though
 
-The gen.cfg.py files contain the build options of every target. Their format is pretty straightforward and minimal.
+The gen.cfg.py files contain the build options of every target. Their format is pretty straightforward and minimal
 
 
 ---------------------------------------------------------------------------------------------------------------------------------------
 HOW TO BUILD BULLET PHYSICS
 ---------------------------------------------------------------------------------------------------------------------------------------
 
-From now on the AnKi requires the Bullet Physics library. Bullet dev files does not ship with any distribution for now so you have to download it manually and build it. Here is how:
+From now on the AnKi requires the Bullet Physics library. Bullet dev files do not ship with any Linux distribution, for now, so you have to download it manually and build it. Here is how:
 
 1) Go to the root AnKi path (where src, shaders and blenderscripts are)
 2) cd ..
@@ -31,4 +31,4 @@ From now on the AnKi requires the Bullet Physics library. Bullet dev files does
 5) cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release
 6) make
 
-The above steps build Bullet statically in a certain dir. If you want to change the default dirs prepare to make changes in the gen.cfg.py files
+The above steps build Bullet statically. If you want to download bullet in a different dir then make the apropriate changes in the gen.cfg.py files

+ 370 - 370
build/debug/Makefile

@@ -5,8 +5,8 @@ PHFLAGS = $(CFLAGS) -x c++-header
 LFLAGS = $(COMMONFLAGS) -rdynamic -L../../../bullet_svn/src/BulletSoftBody -L../../../bullet_svn/src/BulletDynamics -L../../../bullet_svn/src/BulletCollision -L../../../bullet_svn/src/LinearMath -Wl,-Bstatic -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath -lGLEW -lSDL_image -lGLU -Wl,-Bdynamic -lSDL -lGL -ljpeg -lpng -ltiff
 EXECUTABLE = AnKi.bin
 INCPATH = -I../../src/math/ -I../../src/tokenizer/ -I../../src/uncategorized/ -I../../src/ -I../../src/renderer/ -I../../src/scene/ -I../../src/ui/ -I../../src/resources/ -I../../src/utility/ -I../../src/controllers/ -I../../../bullet_svn/src/ 
-SOURCES = ../../src/tokenizer//Scanner.cpp ../../src/uncategorized//skybox.cpp ../../src/uncategorized//particles.cpp ../../src/uncategorized//memory.cpp ../../src/uncategorized//collision.cpp ../../src/uncategorized//map.cpp ../../src//main.cpp ../../src/renderer//r_ms.cpp ../../src/renderer//renderer.cpp ../../src/renderer//r_bs2.cpp ../../src/renderer//r_pps_ssao.cpp ../../src/renderer//r_dbg.cpp ../../src/renderer//r_pps_hdr.cpp ../../src/renderer//r_pps.cpp ../../src/renderer//r_is_shadows.cpp ../../src/renderer//BulletDebuger.cpp ../../src/renderer//r_bs.cpp ../../src/renderer//r_ms_earlyz.cpp ../../src/renderer//r_is.cpp ../../src/renderer//r_pps_lscatt.cpp ../../src/scene//MeshNode.cpp ../../src/scene//SkelNode.cpp ../../src/scene//Node.cpp ../../src/scene//SkelModelNode.cpp ../../src/scene//Light.cpp ../../src/scene//Camera.cpp ../../src/scene//Scene.cpp ../../src/ui//Ui.cpp ../../src/resources//Material.cpp ../../src/resources//ShaderProg.cpp ../../src/resources//Texture.cpp ../../src/resources//SkelAnim.cpp ../../src/resources//Extension.cpp ../../src/resources//ShaderParser.cpp ../../src/resources//Skeleton.cpp ../../src/resources//Resource.cpp ../../src/resources//LightProps.cpp ../../src/resources//Mesh.cpp ../../src/utility//Input.cpp ../../src/utility//App.cpp ../../src/utility//Common.cpp ../../src/utility//Util.cpp ../../src/controllers//Controller.cpp ../../src/controllers//SkelAnimCtrl.cpp 
-OBJECTS = Scanner.o skybox.o particles.o memory.o collision.o map.o main.o r_ms.o renderer.o r_bs2.o r_pps_ssao.o r_dbg.o r_pps_hdr.o r_pps.o r_is_shadows.o BulletDebuger.o r_bs.o r_ms_earlyz.o r_is.o r_pps_lscatt.o MeshNode.o SkelNode.o Node.o SkelModelNode.o Light.o Camera.o Scene.o Ui.o Material.o ShaderProg.o Texture.o SkelAnim.o Extension.o ShaderParser.o Skeleton.o Resource.o LightProps.o Mesh.o Input.o App.o Common.o Util.o Controller.o SkelAnimCtrl.o 
+SOURCES = ../../src/tokenizer//Scanner.cpp ../../src/uncategorized//collision.cpp ../../src/uncategorized//skybox.cpp ../../src/uncategorized//map.cpp ../../src/uncategorized//memory.cpp ../../src/uncategorized//particles.cpp ../../src//main.cpp ../../src/renderer//Dbg.cpp ../../src/renderer//BulletDebuger.cpp ../../src/renderer//Shadows.cpp ../../src/renderer//Hdr.cpp ../../src/renderer//Ssao.cpp ../../src/renderer//Lscatt.cpp ../../src/renderer//Bs2.cpp ../../src/renderer//Ms.cpp ../../src/renderer//Pps.cpp ../../src/renderer//Earlyz.cpp ../../src/renderer//Bs.cpp ../../src/renderer//Is.cpp ../../src/renderer//Renderer.cpp ../../src/scene//SkelNode.cpp ../../src/scene//Light.cpp ../../src/scene//SkelModelNode.cpp ../../src/scene//Scene.cpp ../../src/scene//MeshNode.cpp ../../src/scene//Camera.cpp ../../src/scene//Node.cpp ../../src/ui//Ui.cpp ../../src/resources//LightProps.cpp ../../src/resources//SkelAnim.cpp ../../src/resources//Mesh.cpp ../../src/resources//ShaderProg.cpp ../../src/resources//Material.cpp ../../src/resources//ShaderParser.cpp ../../src/resources//Extension.cpp ../../src/resources//Skeleton.cpp ../../src/resources//Texture.cpp ../../src/resources//Resource.cpp ../../src/utility//Input.cpp ../../src/utility//App.cpp ../../src/utility//Common.cpp ../../src/utility//Util.cpp ../../src/controllers//SkelAnimCtrl.cpp ../../src/controllers//Controller.cpp 
+OBJECTS = Scanner.o collision.o skybox.o map.o memory.o particles.o main.o Dbg.o BulletDebuger.o Shadows.o Hdr.o Ssao.o Lscatt.o Bs2.o Ms.o Pps.o Earlyz.o Bs.o Is.o Renderer.o SkelNode.o Light.o SkelModelNode.o Scene.o MeshNode.o Camera.o Node.o Ui.o LightProps.o SkelAnim.o Mesh.o ShaderProg.o Material.o ShaderParser.o Extension.o Skeleton.o Texture.o Resource.o Input.o App.o Common.o Util.o SkelAnimCtrl.o Controller.o 
 PRECOMPILED_HEADERS = 
 
 all: $(PRECOMPILED_HEADERS) $(SOURCES) $(EXECUTABLE)
@@ -22,6 +22,26 @@ Scanner.o: ../../src/tokenizer//Scanner.cpp \
 	@echo Compiling ../../src/tokenizer//Scanner.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/tokenizer//Scanner.cpp -o Scanner.o
 
+collision.o: ../../src/uncategorized//collision.cpp \
+ ../../src/uncategorized//collision.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/math/Math.h \
+ ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
+ ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
+ ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/renderer/Renderer.h \
+ ../../src/resources/ShaderProg.h ../../src/resources/Resource.h \
+ ../../src/utility/Util.h ../../src/utility/Common.h \
+ ../../src/scene/Camera.h ../../src/uncategorized/collision.h \
+ ../../src/scene/Node.h
+	@echo Compiling ../../src/uncategorized//collision.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/uncategorized//collision.cpp -o collision.o
+
 skybox.o: ../../src/uncategorized//skybox.cpp \
  ../../src/uncategorized//skybox.h ../../src/utility/Common.h \
  ../../src/uncategorized/memory.h ../../src/resources/Texture.h \
@@ -37,43 +57,13 @@ skybox.o: ../../src/uncategorized//skybox.cpp \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
  ../../src/math/MathFuncs.inl.h ../../src/resources/Resource.h \
- ../../src/renderer/renderer.h ../../src/resources/ShaderProg.h \
+ ../../src/renderer/Renderer.h ../../src/resources/ShaderProg.h \
  ../../src/scene/Camera.h ../../src/uncategorized/collision.h \
  ../../src/scene/Node.h ../../src/scene/Scene.h \
  ../../src/uncategorized/skybox.h
 	@echo Compiling ../../src/uncategorized//skybox.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/uncategorized//skybox.cpp -o skybox.o
 
-particles.o: ../../src/uncategorized//particles.cpp
-	@echo Compiling ../../src/uncategorized//particles.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/uncategorized//particles.cpp -o particles.o
-
-memory.o: ../../src/uncategorized//memory.cpp \
- ../../src/uncategorized//memory.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h
-	@echo Compiling ../../src/uncategorized//memory.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/uncategorized//memory.cpp -o memory.o
-
-collision.o: ../../src/uncategorized//collision.cpp \
- ../../src/uncategorized//collision.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
- ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
- ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
- ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/renderer/renderer.h \
- ../../src/resources/ShaderProg.h ../../src/resources/Resource.h \
- ../../src/utility/Util.h ../../src/utility/Common.h \
- ../../src/scene/Camera.h ../../src/uncategorized/collision.h \
- ../../src/scene/Node.h
-	@echo Compiling ../../src/uncategorized//collision.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/uncategorized//collision.cpp -o collision.o
-
 map.o: ../../src/uncategorized//map.cpp ../../src/uncategorized//map.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
  ../../src/uncategorized//collision.h ../../src/math/Math.h \
@@ -96,6 +86,16 @@ map.o: ../../src/uncategorized//map.cpp ../../src/uncategorized//map.h \
 	@echo Compiling ../../src/uncategorized//map.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/uncategorized//map.cpp -o map.o
 
+memory.o: ../../src/uncategorized//memory.cpp \
+ ../../src/uncategorized//memory.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h
+	@echo Compiling ../../src/uncategorized//memory.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/uncategorized//memory.cpp -o memory.o
+
+particles.o: ../../src/uncategorized//particles.cpp
+	@echo Compiling ../../src/uncategorized//particles.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/uncategorized//particles.cpp -o particles.o
+
 main.o: ../../src//main.cpp ../../src/utility/Common.h \
  ../../src/uncategorized/memory.h ../../src/utility/Input.h \
  ../../src/utility/Common.h ../../src/utility/App.h ../../src/math/Math.h \
@@ -110,7 +110,7 @@ main.o: ../../src//main.cpp ../../src/utility/Common.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
  ../../src/math/MathFuncs.inl.h ../../src/scene/Camera.h \
  ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/renderer/renderer.h ../../src/resources/ShaderProg.h \
+ ../../src/renderer/Renderer.h ../../src/resources/ShaderProg.h \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/ui/Ui.h ../../src/utility/App.h \
  ../../src/uncategorized/particles.h ../../src/resources/Texture.h \
@@ -257,97 +257,7 @@ main.o: ../../src//main.cpp ../../src/utility/Common.h \
 	@echo Compiling ../../src//main.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src//main.cpp -o main.o
 
-r_ms.o: ../../src/renderer//r_ms.cpp ../../src/renderer//renderer.h \
- ../../src/utility/Common.h ../../src/uncategorized/memory.h \
- ../../src/math/Math.h ../../src/math/Vec2.h \
- ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
- ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
- ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
- ../../src/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
- ../../src/resources/Texture.h ../../src/resources/Mesh.h \
- ../../src/renderer/Vbo.h ../../src/renderer//Fbo.h \
- ../../src/resources/Material.h ../../src/scene/MeshNode.h
-	@echo Compiling ../../src/renderer//r_ms.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_ms.cpp -o r_ms.o
-
-renderer.o: ../../src/renderer//renderer.cpp \
- ../../src/renderer//renderer.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
- ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
- ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
- ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
- ../../src/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/resources/Texture.h ../../src/scene/Scene.h \
- ../../src/uncategorized/skybox.h ../../src/utility/App.h
-	@echo Compiling ../../src/renderer//renderer.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//renderer.cpp -o renderer.o
-
-r_bs2.o: ../../src/renderer//r_bs2.cpp ../../src/renderer//renderer.h \
- ../../src/utility/Common.h ../../src/uncategorized/memory.h \
- ../../src/math/Math.h ../../src/math/Vec2.h \
- ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
- ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
- ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
- ../../src/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
- ../../src/resources/Texture.h ../../src/resources/Mesh.h \
- ../../src/renderer/Vbo.h ../../src/resources/Resource.h \
- ../../src/renderer//Fbo.h ../../src/scene/MeshNode.h \
- ../../src/resources/Material.h
-	@echo Compiling ../../src/renderer//r_bs2.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_bs2.cpp -o r_bs2.o
-
-r_pps_ssao.o: ../../src/renderer//r_pps_ssao.cpp \
- ../../src/renderer//renderer.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
- ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
- ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
- ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
- ../../src/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/resources/Resource.h ../../src/resources/Texture.h \
- ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
- ../../src/renderer//Fbo.h
-	@echo Compiling ../../src/renderer//r_pps_ssao.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_pps_ssao.cpp -o r_pps_ssao.o
-
-r_dbg.o: ../../src/renderer//r_dbg.cpp ../../src/renderer//renderer.h \
+Dbg.o: ../../src/renderer//Dbg.cpp ../../src/renderer//Renderer.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
  ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
@@ -496,12 +406,21 @@ r_dbg.o: ../../src/renderer//r_dbg.cpp ../../src/renderer//renderer.h \
  ../../../bullet_svn/src/BulletDynamics/Dynamics/btRigidBody.h \
  ../../src/renderer//BulletDebuger.h \
  ../../../bullet_svn/src/LinearMath/btIDebugDraw.h
-	@echo Compiling ../../src/renderer//r_dbg.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_dbg.cpp -o r_dbg.o
+	@echo Compiling ../../src/renderer//Dbg.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Dbg.cpp -o Dbg.o
 
-r_pps_hdr.o: ../../src/renderer//r_pps_hdr.cpp \
- ../../src/renderer//renderer.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
+BulletDebuger.o: ../../src/renderer//BulletDebuger.cpp \
+ ../../src/renderer//BulletDebuger.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h \
+ ../../../bullet_svn/src/LinearMath/btIDebugDraw.h \
+ ../../../bullet_svn/src/LinearMath/btVector3.h \
+ ../../../bullet_svn/src/LinearMath/btScalar.h \
+ ../../../bullet_svn/src/LinearMath/btMinMax.h \
+ ../../../bullet_svn/src/LinearMath/btTransform.h \
+ ../../../bullet_svn/src/LinearMath/btMatrix3x3.h \
+ ../../../bullet_svn/src/LinearMath/btQuaternion.h \
+ ../../../bullet_svn/src/LinearMath/btQuadWord.h \
+ ../../src/renderer//Renderer.h ../../src/math/Math.h \
  ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
  ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
  ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
@@ -514,14 +433,11 @@ r_pps_hdr.o: ../../src/renderer//r_pps_hdr.cpp \
  ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/utility/Common.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/resources/Resource.h ../../src/resources/Texture.h \
- ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
- ../../src/renderer//Fbo.h
-	@echo Compiling ../../src/renderer//r_pps_hdr.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_pps_hdr.cpp -o r_pps_hdr.o
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h
+	@echo Compiling ../../src/renderer//BulletDebuger.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//BulletDebuger.cpp -o BulletDebuger.o
 
-r_pps.o: ../../src/renderer//r_pps.cpp ../../src/renderer//renderer.h \
+Shadows.o: ../../src/renderer//Shadows.cpp ../../src/renderer//Renderer.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
  ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
@@ -537,49 +453,19 @@ r_pps.o: ../../src/renderer//r_pps.cpp ../../src/renderer//renderer.h \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/utility/Common.h ../../src/scene/Camera.h \
  ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/resources/Resource.h ../../src/resources/Texture.h \
- ../../src/renderer//Fbo.h
-	@echo Compiling ../../src/renderer//r_pps.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_pps.cpp -o r_pps.o
-
-r_is_shadows.o: ../../src/renderer//r_is_shadows.cpp \
- ../../src/renderer//renderer.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
- ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
- ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
- ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
- ../../src/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h \
  ../../src/resources/Texture.h ../../src/scene/Scene.h \
  ../../src/uncategorized/skybox.h ../../src/resources/Resource.h \
  ../../src/renderer//Fbo.h ../../src/resources/Material.h \
  ../../src/scene/MeshNode.h
-	@echo Compiling ../../src/renderer//r_is_shadows.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_is_shadows.cpp -o r_is_shadows.o
+	@echo Compiling ../../src/renderer//Shadows.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Shadows.cpp -o Shadows.o
 
-BulletDebuger.o: ../../src/renderer//BulletDebuger.cpp \
- ../../src/renderer//BulletDebuger.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h \
- ../../../bullet_svn/src/LinearMath/btIDebugDraw.h \
- ../../../bullet_svn/src/LinearMath/btVector3.h \
- ../../../bullet_svn/src/LinearMath/btScalar.h \
- ../../../bullet_svn/src/LinearMath/btMinMax.h \
- ../../../bullet_svn/src/LinearMath/btTransform.h \
- ../../../bullet_svn/src/LinearMath/btMatrix3x3.h \
- ../../../bullet_svn/src/LinearMath/btQuaternion.h \
- ../../../bullet_svn/src/LinearMath/btQuadWord.h \
- ../../src/renderer//renderer.h ../../src/math/Math.h \
- ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
- ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
- ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+Hdr.o: ../../src/renderer//Hdr.cpp ../../src/renderer//Renderer.h \
+ ../../src/utility/Common.h ../../src/uncategorized/memory.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
  ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
  ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
  ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
@@ -589,11 +475,14 @@ BulletDebuger.o: ../../src/renderer//BulletDebuger.cpp \
  ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/utility/Common.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h
-	@echo Compiling ../../src/renderer//BulletDebuger.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//BulletDebuger.cpp -o BulletDebuger.o
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h \
+ ../../src/resources/Resource.h ../../src/resources/Texture.h \
+ ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
+ ../../src/renderer//Fbo.h
+	@echo Compiling ../../src/renderer//Hdr.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Hdr.cpp -o Hdr.o
 
-r_bs.o: ../../src/renderer//r_bs.cpp ../../src/renderer//renderer.h \
+Ssao.o: ../../src/renderer//Ssao.cpp ../../src/renderer//Renderer.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
  ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
@@ -609,20 +498,18 @@ r_bs.o: ../../src/renderer//r_bs.cpp ../../src/renderer//renderer.h \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/utility/Common.h ../../src/scene/Camera.h \
  ../../src/uncategorized/collision.h ../../src/scene/Node.h \
+ ../../src/resources/Resource.h ../../src/resources/Texture.h \
  ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
- ../../src/resources/Texture.h ../../src/resources/Mesh.h \
- ../../src/renderer/Vbo.h ../../src/resources/Resource.h \
- ../../src/renderer//Fbo.h ../../src/scene/MeshNode.h \
- ../../src/resources/Material.h
-	@echo Compiling ../../src/renderer//r_bs.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_bs.cpp -o r_bs.o
+ ../../src/renderer//Fbo.h
+	@echo Compiling ../../src/renderer//Ssao.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Ssao.cpp -o Ssao.o
 
-r_ms_earlyz.o: ../../src/renderer//r_ms_earlyz.cpp \
- ../../src/renderer//renderer.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
- ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
- ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
- ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+Lscatt.o: ../../src/renderer//Lscatt.cpp ../../src/renderer//Renderer.h \
+ ../../src/utility/Common.h ../../src/uncategorized/memory.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
  ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
  ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
  ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
@@ -636,10 +523,10 @@ r_ms_earlyz.o: ../../src/renderer//r_ms_earlyz.cpp \
  ../../src/resources/Resource.h ../../src/resources/Texture.h \
  ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
  ../../src/renderer//Fbo.h
-	@echo Compiling ../../src/renderer//r_ms_earlyz.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_ms_earlyz.cpp -o r_ms_earlyz.o
+	@echo Compiling ../../src/renderer//Lscatt.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Lscatt.cpp -o Lscatt.o
 
-r_is.o: ../../src/renderer//r_is.cpp ../../src/renderer//renderer.h \
+Bs2.o: ../../src/renderer//Bs2.cpp ../../src/renderer//Renderer.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
  ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
@@ -657,18 +544,18 @@ r_is.o: ../../src/renderer//r_is.cpp ../../src/renderer//renderer.h \
  ../../src/uncategorized/collision.h ../../src/scene/Node.h \
  ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
  ../../src/resources/Texture.h ../../src/resources/Mesh.h \
- ../../src/renderer/Vbo.h ../../src/scene/Light.h \
- ../../src/scene/Camera.h ../../src/resources/Resource.h \
- ../../src/renderer//Fbo.h ../../src/resources/LightProps.h
-	@echo Compiling ../../src/renderer//r_is.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_is.cpp -o r_is.o
+ ../../src/renderer/Vbo.h ../../src/resources/Resource.h \
+ ../../src/renderer//Fbo.h ../../src/scene/MeshNode.h \
+ ../../src/resources/Material.h
+	@echo Compiling ../../src/renderer//Bs2.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Bs2.cpp -o Bs2.o
 
-r_pps_lscatt.o: ../../src/renderer//r_pps_lscatt.cpp \
- ../../src/renderer//renderer.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
- ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
- ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
- ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+Ms.o: ../../src/renderer//Ms.cpp ../../src/renderer//Renderer.h \
+ ../../src/utility/Common.h ../../src/uncategorized/memory.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
  ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
  ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
  ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
@@ -679,15 +566,16 @@ r_pps_lscatt.o: ../../src/renderer//r_pps_lscatt.cpp \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/utility/Common.h ../../src/scene/Camera.h \
  ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/resources/Resource.h ../../src/resources/Texture.h \
  ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
- ../../src/renderer//Fbo.h
-	@echo Compiling ../../src/renderer//r_pps_lscatt.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_pps_lscatt.cpp -o r_pps_lscatt.o
+ ../../src/resources/Texture.h ../../src/resources/Mesh.h \
+ ../../src/renderer/Vbo.h ../../src/renderer//Fbo.h \
+ ../../src/resources/Material.h ../../src/scene/MeshNode.h
+	@echo Compiling ../../src/renderer//Ms.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Ms.cpp -o Ms.o
 
-MeshNode.o: ../../src/scene//MeshNode.cpp ../../src/scene//MeshNode.h \
+Pps.o: ../../src/renderer//Pps.cpp ../../src/renderer//Renderer.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
- ../../src/scene//Node.h ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
  ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
  ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
@@ -697,22 +585,18 @@ MeshNode.o: ../../src/scene//MeshNode.cpp ../../src/scene//MeshNode.h \
  ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/resources/Material.h \
+ ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/resources/Resource.h \
- ../../src/resources/Mesh.h ../../src/renderer/Vbo.h \
- ../../src/uncategorized/collision.h ../../src/renderer/renderer.h \
- ../../src/resources/ShaderProg.h ../../src/scene/Camera.h \
- ../../src/scene/Node.h ../../src/scene//SkelNode.h \
- ../../src/controllers/Controller.h ../../src/resources/Skeleton.h \
- ../../src/controllers/MeshSkelNodeCtrl.h \
- ../../src/controllers/Controller.h ../../src/controllers/SkelAnimCtrl.h
-	@echo Compiling ../../src/scene//MeshNode.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//MeshNode.cpp -o MeshNode.o
+ ../../src/utility/Common.h ../../src/scene/Camera.h \
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h \
+ ../../src/resources/Resource.h ../../src/resources/Texture.h \
+ ../../src/renderer//Fbo.h
+	@echo Compiling ../../src/renderer//Pps.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Pps.cpp -o Pps.o
 
-SkelNode.o: ../../src/scene//SkelNode.cpp ../../src/scene//SkelNode.h \
+Earlyz.o: ../../src/renderer//Earlyz.cpp ../../src/renderer//Renderer.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
- ../../src/scene//Node.h ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
  ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
  ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
@@ -722,17 +606,17 @@ SkelNode.o: ../../src/scene//SkelNode.cpp ../../src/scene//SkelNode.h \
  ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/controllers/Controller.h \
- ../../src/renderer/renderer.h ../../src/resources/ShaderProg.h \
+ ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/utility/Common.h ../../src/scene/Camera.h \
  ../../src/uncategorized/collision.h ../../src/scene/Node.h \
- ../../src/resources/SkelAnim.h ../../src/resources/Skeleton.h \
- ../../src/controllers/SkelAnimCtrl.h ../../src/controllers/Controller.h
-	@echo Compiling ../../src/scene//SkelNode.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//SkelNode.cpp -o SkelNode.o
+ ../../src/resources/Resource.h ../../src/resources/Texture.h \
+ ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
+ ../../src/renderer//Fbo.h
+	@echo Compiling ../../src/renderer//Earlyz.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Earlyz.cpp -o Earlyz.o
 
-Node.o: ../../src/scene//Node.cpp ../../src/scene//Node.h \
+Bs.o: ../../src/renderer//Bs.cpp ../../src/renderer//Renderer.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
  ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
@@ -744,13 +628,105 @@ Node.o: ../../src/scene//Node.cpp ../../src/scene//Node.h \
  ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/renderer/renderer.h \
- ../../src/resources/ShaderProg.h ../../src/resources/Resource.h \
+ ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
+ ../../src/resources/Resource.h ../../src/utility/Util.h \
+ ../../src/utility/Common.h ../../src/scene/Camera.h \
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h \
+ ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
+ ../../src/resources/Texture.h ../../src/resources/Mesh.h \
+ ../../src/renderer/Vbo.h ../../src/resources/Resource.h \
+ ../../src/renderer//Fbo.h ../../src/scene/MeshNode.h \
+ ../../src/resources/Material.h
+	@echo Compiling ../../src/renderer//Bs.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Bs.cpp -o Bs.o
+
+Is.o: ../../src/renderer//Is.cpp ../../src/renderer//Renderer.h \
+ ../../src/utility/Common.h ../../src/uncategorized/memory.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
+ ../../src/resources/Resource.h ../../src/utility/Util.h \
+ ../../src/utility/Common.h ../../src/scene/Camera.h \
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h \
+ ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
+ ../../src/resources/Texture.h ../../src/resources/Mesh.h \
+ ../../src/renderer/Vbo.h ../../src/scene/Light.h \
+ ../../src/scene/Camera.h ../../src/resources/Resource.h \
+ ../../src/renderer//Fbo.h ../../src/resources/LightProps.h
+	@echo Compiling ../../src/renderer//Is.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Is.cpp -o Is.o
+
+Renderer.o: ../../src/renderer//Renderer.cpp \
+ ../../src/renderer//Renderer.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/math/Math.h \
+ ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
+ ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
+ ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
+ ../../src/resources/Resource.h ../../src/utility/Util.h \
+ ../../src/utility/Common.h ../../src/scene/Camera.h \
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h \
+ ../../src/resources/Texture.h ../../src/scene/Scene.h \
+ ../../src/uncategorized/skybox.h ../../src/utility/App.h
+	@echo Compiling ../../src/renderer//Renderer.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//Renderer.cpp -o Renderer.o
+
+SkelNode.o: ../../src/scene//SkelNode.cpp ../../src/scene//SkelNode.h \
+ ../../src/utility/Common.h ../../src/uncategorized/memory.h \
+ ../../src/scene//Node.h ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/controllers/Controller.h \
+ ../../src/renderer/Renderer.h ../../src/resources/ShaderProg.h \
+ ../../src/resources/Resource.h ../../src/utility/Util.h \
+ ../../src/utility/Common.h ../../src/scene/Camera.h \
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h \
+ ../../src/resources/SkelAnim.h ../../src/resources/Skeleton.h \
+ ../../src/controllers/SkelAnimCtrl.h ../../src/controllers/Controller.h
+	@echo Compiling ../../src/scene//SkelNode.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//SkelNode.cpp -o SkelNode.o
+
+Light.o: ../../src/scene//Light.cpp ../../src/scene//Light.h \
+ ../../src/utility/Common.h ../../src/uncategorized/memory.h \
+ ../../src/resources/Texture.h ../../src/resources/Resource.h \
  ../../src/utility/Util.h ../../src/utility/Common.h \
- ../../src/scene/Camera.h ../../src/uncategorized/collision.h \
- ../../src/scene/Node.h ../../src/controllers/Controller.h
-	@echo Compiling ../../src/scene//Node.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Node.cpp -o Node.o
+ ../../src/scene//Node.h ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/scene//Camera.h \
+ ../../src/uncategorized/collision.h ../../src/renderer/Renderer.h \
+ ../../src/resources/ShaderProg.h ../../src/scene/Camera.h \
+ ../../src/resources/LightProps.h
+	@echo Compiling ../../src/scene//Light.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Light.cpp -o Light.o
 
 SkelModelNode.o: ../../src/scene//SkelModelNode.cpp \
  ../../src/scene//SkelModelNode.h ../../src/utility/Common.h \
@@ -775,10 +751,30 @@ SkelModelNode.o: ../../src/scene//SkelModelNode.cpp \
 	@echo Compiling ../../src/scene//SkelModelNode.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//SkelModelNode.cpp -o SkelModelNode.o
 
-Light.o: ../../src/scene//Light.cpp ../../src/scene//Light.h \
+Scene.o: ../../src/scene//Scene.cpp ../../src/scene//Scene.h \
+ ../../src/utility/Common.h ../../src/uncategorized/memory.h \
+ ../../src/uncategorized/skybox.h ../../src/resources/Texture.h \
+ ../../src/resources/Resource.h ../../src/utility/Util.h \
+ ../../src/utility/Common.h ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/scene//SkelNode.h \
+ ../../src/scene//Node.h ../../src/controllers/Controller.h \
+ ../../src/scene//Camera.h ../../src/uncategorized/collision.h \
+ ../../src/scene//MeshNode.h ../../src/resources/Material.h \
+ ../../src/scene//Light.h
+	@echo Compiling ../../src/scene//Scene.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Scene.cpp -o Scene.o
+
+MeshNode.o: ../../src/scene//MeshNode.cpp ../../src/scene//MeshNode.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
- ../../src/resources/Texture.h ../../src/resources/Resource.h \
- ../../src/utility/Util.h ../../src/utility/Common.h \
  ../../src/scene//Node.h ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
  ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
@@ -789,12 +785,18 @@ Light.o: ../../src/scene//Light.cpp ../../src/scene//Light.h \
  ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/scene//Camera.h \
- ../../src/uncategorized/collision.h ../../src/renderer/renderer.h \
+ ../../src/math/MathFuncs.inl.h ../../src/resources/Material.h \
+ ../../src/resources/Resource.h ../../src/utility/Util.h \
+ ../../src/utility/Common.h ../../src/resources/Resource.h \
+ ../../src/resources/Mesh.h ../../src/renderer/Vbo.h \
+ ../../src/uncategorized/collision.h ../../src/renderer/Renderer.h \
  ../../src/resources/ShaderProg.h ../../src/scene/Camera.h \
- ../../src/resources/LightProps.h
-	@echo Compiling ../../src/scene//Light.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Light.cpp -o Light.o
+ ../../src/scene/Node.h ../../src/scene//SkelNode.h \
+ ../../src/controllers/Controller.h ../../src/resources/Skeleton.h \
+ ../../src/controllers/MeshSkelNodeCtrl.h \
+ ../../src/controllers/Controller.h ../../src/controllers/SkelAnimCtrl.h
+	@echo Compiling ../../src/scene//MeshNode.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//MeshNode.cpp -o MeshNode.o
 
 Camera.o: ../../src/scene//Camera.cpp ../../src/scene//Camera.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
@@ -809,17 +811,15 @@ Camera.o: ../../src/scene//Camera.cpp ../../src/scene//Camera.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
  ../../src/math/MathFuncs.inl.h ../../src/scene//Node.h \
- ../../src/renderer/renderer.h ../../src/resources/ShaderProg.h \
+ ../../src/renderer/Renderer.h ../../src/resources/ShaderProg.h \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/utility/Common.h ../../src/scene/Camera.h
 	@echo Compiling ../../src/scene//Camera.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Camera.cpp -o Camera.o
 
-Scene.o: ../../src/scene//Scene.cpp ../../src/scene//Scene.h \
+Node.o: ../../src/scene//Node.cpp ../../src/scene//Node.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
- ../../src/uncategorized/skybox.h ../../src/resources/Texture.h \
- ../../src/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
  ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
  ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
@@ -829,16 +829,16 @@ Scene.o: ../../src/scene//Scene.cpp ../../src/scene//Scene.h \
  ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/scene//SkelNode.h \
- ../../src/scene//Node.h ../../src/controllers/Controller.h \
- ../../src/scene//Camera.h ../../src/uncategorized/collision.h \
- ../../src/scene//MeshNode.h ../../src/resources/Material.h \
- ../../src/scene//Light.h
-	@echo Compiling ../../src/scene//Scene.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Scene.cpp -o Scene.o
+ ../../src/math/MathFuncs.inl.h ../../src/renderer/Renderer.h \
+ ../../src/resources/ShaderProg.h ../../src/resources/Resource.h \
+ ../../src/utility/Util.h ../../src/utility/Common.h \
+ ../../src/scene/Camera.h ../../src/uncategorized/collision.h \
+ ../../src/scene/Node.h ../../src/controllers/Controller.h
+	@echo Compiling ../../src/scene//Node.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Node.cpp -o Node.o
 
 Ui.o: ../../src/ui//Ui.cpp ../../src/ui//Ui.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/renderer/renderer.h \
+ ../../src/uncategorized/memory.h ../../src/renderer/Renderer.h \
  ../../src/math/Math.h ../../src/math/Vec2.h \
  ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
  ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
@@ -857,33 +857,71 @@ Ui.o: ../../src/ui//Ui.cpp ../../src/ui//Ui.h ../../src/utility/Common.h \
 	@echo Compiling ../../src/ui//Ui.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/ui//Ui.cpp -o Ui.o
 
-Material.o: ../../src/resources//Material.cpp \
- ../../src/resources//Material.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
- ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
- ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
- ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+LightProps.o: ../../src/resources//LightProps.cpp \
+ ../../src/resources//LightProps.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
+ ../../src/utility/Util.h ../../src/utility/Common.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
  ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
  ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
  ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
  ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/resources//Resource.h \
+ ../../src/math/MathFuncs.inl.h ../../src/tokenizer/parser.h \
+ ../../src/tokenizer/Scanner.h ../../src/resources//Texture.h
+	@echo Compiling ../../src/resources//LightProps.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//LightProps.cpp -o LightProps.o
+
+SkelAnim.o: ../../src/resources//SkelAnim.cpp \
+ ../../src/resources//SkelAnim.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
  ../../src/utility/Util.h ../../src/utility/Common.h \
- ../../src/tokenizer/Scanner.h ../../src/tokenizer/parser.h \
- ../../src/tokenizer/Scanner.h ../../src/resources//Texture.h \
- ../../src/resources//ShaderProg.h ../../src/renderer/renderer.h \
- ../../src/resources/ShaderProg.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h
-	@echo Compiling ../../src/resources//Material.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Material.cpp -o Material.o
+ ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/tokenizer/Scanner.h \
+ ../../src/tokenizer/parser.h ../../src/tokenizer/Scanner.h
+	@echo Compiling ../../src/resources//SkelAnim.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//SkelAnim.cpp -o SkelAnim.o
+
+Mesh.o: ../../src/resources//Mesh.cpp ../../src/resources//Mesh.h \
+ ../../src/utility/Common.h ../../src/uncategorized/memory.h \
+ ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/renderer/Vbo.h \
+ ../../src/resources//Resource.h ../../src/utility/Util.h \
+ ../../src/utility/Common.h ../../src/uncategorized/collision.h \
+ ../../src/renderer/Renderer.h ../../src/resources/ShaderProg.h \
+ ../../src/resources/Resource.h ../../src/scene/Camera.h \
+ ../../src/scene/Node.h ../../src/tokenizer/Scanner.h \
+ ../../src/tokenizer/parser.h ../../src/tokenizer/Scanner.h
+	@echo Compiling ../../src/resources//Mesh.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Mesh.cpp -o Mesh.o
 
 ShaderProg.o: ../../src/resources//ShaderProg.cpp \
  ../../src/resources//ShaderProg.h ../../src/utility/Common.h \
  ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
  ../../src/utility/Util.h ../../src/utility/Common.h \
- ../../src/renderer/renderer.h ../../src/math/Math.h \
+ ../../src/renderer/Renderer.h ../../src/math/Math.h \
  ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
  ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
  ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
@@ -900,11 +938,9 @@ ShaderProg.o: ../../src/resources//ShaderProg.cpp \
 	@echo Compiling ../../src/resources//ShaderProg.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//ShaderProg.cpp -o ShaderProg.o
 
-Texture.o: ../../src/resources//Texture.cpp \
- ../../src/resources//Texture.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
- ../../src/utility/Util.h ../../src/utility/Common.h \
- ../../src/renderer/renderer.h ../../src/math/Math.h \
+Material.o: ../../src/resources//Material.cpp \
+ ../../src/resources//Material.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/math/Math.h \
  ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
  ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
  ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
@@ -914,37 +950,15 @@ Texture.o: ../../src/resources//Texture.cpp \
  ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
- ../../src/resources/Resource.h ../../src/scene/Camera.h \
- ../../src/uncategorized/collision.h ../../src/scene/Node.h
-	@echo Compiling ../../src/resources//Texture.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Texture.cpp -o Texture.o
-
-SkelAnim.o: ../../src/resources//SkelAnim.cpp \
- ../../src/resources//SkelAnim.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
+ ../../src/math/MathFuncs.inl.h ../../src/resources//Resource.h \
  ../../src/utility/Util.h ../../src/utility/Common.h \
- ../../src/math/Math.h ../../src/math/Vec2.h \
- ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
- ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
- ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/tokenizer/Scanner.h \
- ../../src/tokenizer/parser.h ../../src/tokenizer/Scanner.h
-	@echo Compiling ../../src/resources//SkelAnim.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//SkelAnim.cpp -o SkelAnim.o
-
-Extension.o: ../../src/resources//Extension.cpp \
- ../../src/resources//Extension.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
- ../../src/utility/Util.h ../../src/utility/Common.h
-	@echo Compiling ../../src/resources//Extension.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Extension.cpp -o Extension.o
+ ../../src/tokenizer/Scanner.h ../../src/tokenizer/parser.h \
+ ../../src/tokenizer/Scanner.h ../../src/resources//Texture.h \
+ ../../src/resources//ShaderProg.h ../../src/renderer/Renderer.h \
+ ../../src/resources/ShaderProg.h ../../src/scene/Camera.h \
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h
+	@echo Compiling ../../src/resources//Material.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Material.cpp -o Material.o
 
 ShaderParser.o: ../../src/resources//ShaderParser.cpp \
  ../../src/resources//ShaderParser.h ../../src/utility/Common.h \
@@ -954,6 +968,13 @@ ShaderParser.o: ../../src/resources//ShaderParser.cpp \
 	@echo Compiling ../../src/resources//ShaderParser.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//ShaderParser.cpp -o ShaderParser.o
 
+Extension.o: ../../src/resources//Extension.cpp \
+ ../../src/resources//Extension.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
+ ../../src/utility/Util.h ../../src/utility/Common.h
+	@echo Compiling ../../src/resources//Extension.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Extension.cpp -o Extension.o
+
 Skeleton.o: ../../src/resources//Skeleton.cpp \
  ../../src/resources//Skeleton.h ../../src/utility/Common.h \
  ../../src/uncategorized/memory.h ../../src/math/Math.h \
@@ -973,6 +994,26 @@ Skeleton.o: ../../src/resources//Skeleton.cpp \
 	@echo Compiling ../../src/resources//Skeleton.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Skeleton.cpp -o Skeleton.o
 
+Texture.o: ../../src/resources//Texture.cpp \
+ ../../src/resources//Texture.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
+ ../../src/utility/Util.h ../../src/utility/Common.h \
+ ../../src/renderer/Renderer.h ../../src/math/Math.h \
+ ../../src/math/Vec2.h ../../src/math/MathForwardDecls.h \
+ ../../src/math/Vec2.inl.h ../../src/math/MathDfltHeader.h \
+ ../../src/math/Vec3.h ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h ../../src/resources/ShaderProg.h \
+ ../../src/resources/Resource.h ../../src/scene/Camera.h \
+ ../../src/uncategorized/collision.h ../../src/scene/Node.h
+	@echo Compiling ../../src/resources//Texture.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Texture.cpp -o Texture.o
+
 Resource.o: ../../src/resources//Resource.cpp \
  ../../src/resources//Resource.h ../../src/utility/Common.h \
  ../../src/uncategorized/memory.h ../../src/utility/Util.h \
@@ -994,47 +1035,6 @@ Resource.o: ../../src/resources//Resource.cpp \
 	@echo Compiling ../../src/resources//Resource.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Resource.cpp -o Resource.o
 
-LightProps.o: ../../src/resources//LightProps.cpp \
- ../../src/resources//LightProps.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/resources//Resource.h \
- ../../src/utility/Util.h ../../src/utility/Common.h \
- ../../src/math/Math.h ../../src/math/Vec2.h \
- ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
- ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
- ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/tokenizer/parser.h \
- ../../src/tokenizer/Scanner.h ../../src/resources//Texture.h
-	@echo Compiling ../../src/resources//LightProps.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//LightProps.cpp -o LightProps.o
-
-Mesh.o: ../../src/resources//Mesh.cpp ../../src/resources//Mesh.h \
- ../../src/utility/Common.h ../../src/uncategorized/memory.h \
- ../../src/math/Math.h ../../src/math/Vec2.h \
- ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
- ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
- ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/renderer/Vbo.h \
- ../../src/resources//Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/uncategorized/collision.h \
- ../../src/renderer/renderer.h ../../src/resources/ShaderProg.h \
- ../../src/resources/Resource.h ../../src/scene/Camera.h \
- ../../src/scene/Node.h ../../src/tokenizer/Scanner.h \
- ../../src/tokenizer/parser.h ../../src/tokenizer/Scanner.h
-	@echo Compiling ../../src/resources//Mesh.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Mesh.cpp -o Mesh.o
-
 Input.o: ../../src/utility//Input.cpp ../../src/utility//Input.h \
  ../../src/utility//Common.h ../../src/uncategorized/memory.h \
  ../../src/utility/Common.h ../../src/utility//App.h \
@@ -1048,7 +1048,7 @@ Input.o: ../../src/utility//Input.cpp ../../src/utility//Input.h \
  ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
  ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
  ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h ../../src/renderer/renderer.h \
+ ../../src/math/MathFuncs.inl.h ../../src/renderer/Renderer.h \
  ../../src/resources/ShaderProg.h ../../src/resources/Resource.h \
  ../../src/utility/Util.h ../../src/utility/Common.h \
  ../../src/scene/Camera.h ../../src/uncategorized/collision.h \
@@ -1072,25 +1072,6 @@ Util.o: ../../src/utility//Util.cpp ../../src/utility//Util.h \
 	@echo Compiling ../../src/utility//Util.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/utility//Util.cpp -o Util.o
 
-Controller.o: ../../src/controllers//Controller.cpp \
- ../../src/controllers//Controller.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/scene/Scene.h \
- ../../src/uncategorized/skybox.h ../../src/resources/Texture.h \
- ../../src/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/math/Math.h ../../src/math/Vec2.h \
- ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
- ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
- ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
- ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
- ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
- ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
- ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
- ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
- ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
- ../../src/math/MathFuncs.inl.h
-	@echo Compiling ../../src/controllers//Controller.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/controllers//Controller.cpp -o Controller.o
-
 SkelAnimCtrl.o: ../../src/controllers//SkelAnimCtrl.cpp \
  ../../src/controllers//SkelAnimCtrl.h ../../src/utility/Common.h \
  ../../src/uncategorized/memory.h ../../src/controllers//Controller.h \
@@ -1108,12 +1089,31 @@ SkelAnimCtrl.o: ../../src/controllers//SkelAnimCtrl.cpp \
  ../../src/resources/Resource.h ../../src/utility/Util.h \
  ../../src/utility/Common.h ../../src/scene/SkelNode.h \
  ../../src/scene/Node.h ../../src/controllers/Controller.h \
- ../../src/resources/Skeleton.h ../../src/renderer/renderer.h \
+ ../../src/resources/Skeleton.h ../../src/renderer/Renderer.h \
  ../../src/resources/ShaderProg.h ../../src/scene/Camera.h \
  ../../src/uncategorized/collision.h
 	@echo Compiling ../../src/controllers//SkelAnimCtrl.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/controllers//SkelAnimCtrl.cpp -o SkelAnimCtrl.o
 
+Controller.o: ../../src/controllers//Controller.cpp \
+ ../../src/controllers//Controller.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/scene/Scene.h \
+ ../../src/uncategorized/skybox.h ../../src/resources/Texture.h \
+ ../../src/resources/Resource.h ../../src/utility/Util.h \
+ ../../src/utility/Common.h ../../src/math/Math.h ../../src/math/Vec2.h \
+ ../../src/math/MathForwardDecls.h ../../src/math/Vec2.inl.h \
+ ../../src/math/MathDfltHeader.h ../../src/math/Vec3.h \
+ ../../src/math/Vec3.inl.h ../../src/math/Vec4.h \
+ ../../src/math/Vec4.inl.h ../../src/math/Quat.h \
+ ../../src/math/Quat.inl.h ../../src/math/Axisang.h \
+ ../../src/math/Axisang.inl.h ../../src/math/Euler.h \
+ ../../src/math/Euler.inl.h ../../src/math/Mat3.h \
+ ../../src/math/Mat3.inl.h ../../src/math/Mat4.h \
+ ../../src/math/Mat4.inl.h ../../src/math/MathFuncs.h \
+ ../../src/math/MathFuncs.inl.h
+	@echo Compiling ../../src/controllers//Controller.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/controllers//Controller.cpp -o Controller.o
+
 clean:
 	rm -f *.o
 	rm -f *.gch

+ 7 - 0
shaders/ms_mp_d.glsl

@@ -0,0 +1,7 @@
+#define _DIFFUSE_MAPPING_
+
+#pragma anki include "shaders/ms_mp_generic.glsl"
+
+
+
+

+ 12 - 1
shaders/pps_ssao_blur.glsl

@@ -13,5 +13,16 @@ uniform sampler2D tex;
 
 void main()
 {
-	gl_FragData[0].a = MedianAndBlurA( tex, tex_coords );
+	//gl_FragData[0].a = MedianAndBlurA( tex, tex_coords );
+	float offset = 1.0 / float(textureSize(tex,0).x);
+	const int KERNEL_SIZE = 9;
+	float kernel[KERNEL_SIZE] = float[]( -3.0 * offset, -2.0 * offset, -1.0 * offset, 0.0 * offset, 1.0 * offset, 2.0 * offset,
+																				3.0 * offset, -4.0 * offset, 4.0 * offset );
+
+	float factor = 0.0;
+	for( int i=0; i<KERNEL_SIZE; i++ )
+	{
+		factor += texture2D( tex, tex_coords + vec2(kernel[i], 0.0) ).a;
+	}
+	gl_FragData[0].a = factor / KERNEL_SIZE;
 }

+ 28 - 0
shaders/pps_ssao_blur2.glsl

@@ -0,0 +1,28 @@
+#pragma anki vertShaderBegins
+
+#pragma anki include "shaders/simple_vert.glsl"
+
+#pragma anki fragShaderBegins
+
+#pragma anki include "shaders/median_filter.glsl"
+
+varying vec2 tex_coords;
+
+#pragma anki uniform tex 0
+uniform sampler2D tex;
+
+void main()
+{
+	//gl_FragData[0].a = MedianAndBlurA( tex, tex_coords );
+	float offset = 1.0 / float(textureSize(tex,0).y);
+	const int KERNEL_SIZE = 9;
+	float kernel[KERNEL_SIZE] = float[]( -3.0 * offset, -2.0 * offset, -1.0 * offset, 0.0 * offset, 1.0 * offset, 2.0 * offset,
+																				3.0 * offset, -4.0 * offset, 4.0 * offset );
+
+	float factor = 0.0;
+	for( int i=0; i<KERNEL_SIZE; i++ )
+	{
+		factor += texture2D( tex, tex_coords + vec2(0.0, kernel[i]) ).a;
+	}
+	gl_FragData[0].a = factor / KERNEL_SIZE;
+}

+ 19 - 0
src/NAMING

@@ -0,0 +1,19 @@
+This file contains some of the naming convention we use in AnKi
+
+Shader Program     : shaderProg or sProg
+Material           : mtl
+Property           : prop
+Controller         : ctrl
+Skeleton           : skel
+Animation          : anim
+Skeletal Animation : sAnim
+Application        : app
+Transformation     : trf
+Translation        : tsl
+Rotation           : rot
+Vector             : vec
+Matrix             : mat
+Camera             : cam
+Utility            : util
+Texture            : tex
+Text               : txt

+ 2 - 2
src/controllers/SkelAnimCtrl.cpp

@@ -2,7 +2,7 @@
 #include "SkelAnim.h"
 #include "SkelNode.h"
 #include "Skeleton.h"
-#include "renderer.h"
+#include "Renderer.h"
 
 
 //=====================================================================================================================================
@@ -160,7 +160,7 @@ void SkelAnimCtrl::update( float )
 
 	interpolate( skelAnim, frame );
 	updateBoneTransforms();
-	if( r::dbg::showSkeletons )
+	if( R::Dbg::showSkeletons )
 	{
 		deform();
 	}

+ 32 - 28
src/main.cpp

@@ -7,7 +7,7 @@
 #include "Input.h"
 #include "Camera.h"
 #include "Math.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "Ui.h"
 #include "App.h"
 #include "particles.h"
@@ -37,7 +37,7 @@
 // map (hard coded)
 Camera* mainCam;
 MeshNode* floor__,* sarge,* horse;
-skelModelNode* imp;
+SkelModelNode* imp;
 PointLight* point_lights[10];
 SpotLight* spot_lights[2];
 
@@ -46,12 +46,12 @@ class floor_t: public Camera
 	public:
 		void render()
 		{
-			r::dbg::renderCube( true, 1.0 );
+			R::Dbg::renderCube( true, 1.0 );
 		}
 
 		void renderDepth()
 		{
-			r::dbg::renderCube( true, 1.0 );
+			R::Dbg::renderCube( true, 1.0 );
 		}
 }* floor_;
 
@@ -124,14 +124,10 @@ void initPhysics()
 		btTransform startTransform;
 		startTransform.setIdentity();
 
-		btScalar	mass(1.f);
-
-		//rigidbody is dynamic if and only if mass is non zero, otherwise static
-		bool isDynamic = (mass != 0.f);
+		btScalar	mass(1.0);
 
 		btVector3 localInertia(0,0,0);
-		if (isDynamic)
-			colShape->calculateLocalInertia(mass,localInertia);
+		colShape->calculateLocalInertia(mass,localInertia);
 
 		float start_x = START_POS_X - ARRAY_SIZE_X/2;
 		float start_y = START_POS_Y;
@@ -154,10 +150,10 @@ void initPhysics()
 					btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,colShape,localInertia);
 					btRigidBody* body = new btRigidBody(rbInfo);
 
-					body->setActivationState(ISLAND_SLEEPING);
+					//body->setActivationState(ISLAND_SLEEPING);
 
 					dynamicsWorld->addRigidBody(body);
-					body->setActivationState(ISLAND_SLEEPING);
+					//body->setActivationState(ISLAND_SLEEPING);
 				}
 			}
 		}
@@ -182,11 +178,11 @@ void init()
 	App::initWindow();
 	uint ticks = App::getTicks();
 
-	r::init();
+	R::init();
 	Ui::init();
 
 	// camera
-	mainCam = new Camera( r::aspectRatio*toRad(60.0), toRad(60.0), 0.5, 100.0 );
+	mainCam = new Camera( R::aspectRatio*toRad(60.0), toRad(60.0), 0.5, 200.0 );
 	mainCam->moveLocalY( 3.0 );
 	mainCam->moveLocalZ( 5.7 );
 	mainCam->moveLocalX( -0.3 );
@@ -223,15 +219,20 @@ void init()
 	floor__->setLocalTransformation( Vec3(0.0, -0.19, 0.0), Mat3( Euler(-M::PI/2, 0.0, 0.0) ), 0.8 );
 
 	// imp	
-	imp = new skelModelNode();
+	imp = new SkelModelNode();
 	imp->init( "models/imp/imp.smdl" );
 	imp->setLocalTransformation( Vec3( 0.0, 2.11, 0.0 ), Mat3( Euler(-M::PI/2, 0.0, 0.0) ), 0.7 );
 	imp->meshNodes[0]->meshSkelCtrl->skelNode->skelAnimCtrl->skelAnim = rsrc::skelAnims.load( "models/imp/walk.imp.anim" );
 	imp->meshNodes[0]->meshSkelCtrl->skelNode->skelAnimCtrl->step = 0.8;
 
+	// crate
+	MeshNode* crate = new MeshNode;
+	crate->init( "models/crate0/crate0.mesh" );
+	crate->scaleLspace = 1.0;
+
 
 	//
-	floor_ = new floor_t;
+	//floor_ = new floor_t;
 	//floor_->material = rsrc::materials.load( "materials/default.mtl" );
 
 	const char* skybox_fnames [] = { "textures/env/hellsky4_forward.tga", "textures/env/hellsky4_back.tga", "textures/env/hellsky4_left.tga",
@@ -257,11 +258,12 @@ int main( int /*argc*/, char* /*argv*/[] )
 
 	PRINT( "Entering main loop" );
 	int ticks = App::getTicks();
+	uint ms = 0;
 	do
 	{
 		int ticks_ = App::getTicks();
 		I::handleEvents();
-		r::prepareNextFrame();
+		R::prepareNextFrame();
 
 		float dist = 0.2;
 		float ang = toRad(3.0);
@@ -309,9 +311,11 @@ int main( int /*argc*/, char* /*argv*/[] )
 		Scene::updateAllControllers();
 		Scene::updateAllWorldStuff();
 
-		dynamicsWorld->stepSimulation( 1 );
 
-		r::render( *mainCam );
+		dynamicsWorld->stepSimulation( App::timerTick );
+		dynamicsWorld->debugDrawWorld();
+
+		R::render( *mainCam );
 
 		//map.octree.root->bounding_box.render();
 
@@ -319,32 +323,32 @@ int main( int /*argc*/, char* /*argv*/[] )
 		Ui::setColor( Vec4(1.0, 1.0, 1.0, 1.0) );
 		Ui::setPos( -0.98, 0.95 );
 		Ui::setFontWidth( 0.03 );
-		Ui::printf( "frame:%d time:%dms\n", r::framesNum, App::getTicks()-ticks_ );
+		Ui::printf( "frame:%d time:%dms\n", R::framesNum, App::getTicks()-ticks_ );
 		//Ui::print( "Movement keys: arrows,w,a,s,d,q,e,shift,space\nSelect objects: keys 1 to 5\n" );
 		Ui::printf( "Mover: Pos(%.2f %.2f %.2f) Angs(%.2f %.2f %.2f)", mover->translationWspace.x, mover->translationWspace.y, mover->translationWspace.z,
 								 toDegrees(Euler(mover->rotationWspace).x), toDegrees(Euler(mover->rotationWspace).y), toDegrees(Euler(mover->rotationWspace).z) );
 
 		if( I::keys[SDLK_ESCAPE] ) break;
 		if( I::keys[SDLK_F11] ) App::togleFullScreen();
-		if( I::keys[SDLK_F12] == 1 ) r::takeScreenshot("gfx/screenshot.jpg");
+		if( I::keys[SDLK_F12] == 1 ) R::takeScreenshot("gfx/screenshot.jpg");
 
 		/*char str[128];
-		if( r::framesNum < 1000 )
-			sprintf( str, "capt/%06d.jpg", r::framesNum );
+		if( R::framesNum < 1000 )
+			sprintf( str, "capt/%06d.jpg", R::framesNum );
 		else
-			sprintf( str, "capt2/%06d.jpg", r::framesNum );
-		r::takeScreenshot(str);*/
+			sprintf( str, "capt2/%06d.jpg", R::framesNum );
+		R::takeScreenshot(str);*/
 
 		// std stuff follow
 		SDL_GL_SwapBuffers();
-		r::printLastError();
+		R::printLastError();
 		if( 1 )
 		{
-			//if( r::framesNum == 10 ) r::takeScreenshot("gfx/screenshot.tga");
+			//if( R::framesNum == 10 ) R::takeScreenshot("gfx/screenshot.tga");
 			App::waitForNextFrame();
 		}
 		else
-			if( r::framesNum == 5000 ) break;
+			if( R::framesNum == 5000 ) break;
 	}while( true );
 	PRINT( "Exiting main loop (" << App::getTicks()-ticks << ")" );
 

+ 7 - 7
src/renderer/r_bs.cpp → src/renderer/Bs.cpp

@@ -3,7 +3,7 @@
  * The blending stage comes after the illumination stage. All the objects that are transculent will be drawn here.
  */
 
-#include "renderer.h"
+#include "Renderer.h"
 #include "Camera.h"
 #include "Scene.h"
 #include "Mesh.h"
@@ -13,8 +13,8 @@
 #include "Material.h"
 
 
-namespace r {
-namespace bs {
+namespace R {
+namespace Bs {
 
 //=====================================================================================================================================
 // VARS                                                                                                                               =
@@ -35,8 +35,8 @@ void init()
 	fbo.setNumOfColorAttachements(1);
 
 	// attach the texes
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, r::is::fai.getGlId(), 0 );
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,  GL_TEXTURE_2D, r::ms::depthFai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, R::Is::fai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,  GL_TEXTURE_2D, R::Ms::depthFai.getGlId(), 0 );
 
 	// test if success
 	if( !fbo.isGood() )
@@ -53,8 +53,8 @@ void init()
 void runStage( const Camera& cam )
 {
 	// OGL stuff
-	r::setProjectionViewMatrices( cam );
-	r::setViewport( 0, 0, r::w, r::h );
+	R::setProjectionViewMatrices( cam );
+	R::setViewport( 0, 0, R::w, R::h );
 
 	glEnable( GL_DEPTH_TEST );
 	glDepthMask( false );

+ 10 - 10
src/renderer/r_bs2.cpp → src/renderer/Bs2.cpp

@@ -3,7 +3,7 @@
  * The blending stage comes after the illumination stage. All the objects that are transculent will be drawn here.
  */
 
-#include "renderer.h"
+#include "Renderer.h"
 #include "Camera.h"
 #include "Scene.h"
 #include "Mesh.h"
@@ -13,8 +13,8 @@
 #include "Material.h"
 
 
-namespace r {
-namespace bs {
+namespace R {
+namespace Bs {
 
 //=====================================================================================================================================
 // VARS                                                                                                                               =
@@ -39,8 +39,8 @@ void init2()
 	fbo.setNumOfColorAttachements(1);
 
 	// attach the texes
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, r::pps::fai.getGlId(), 0 );
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,  GL_TEXTURE_2D, r::ms::depthFai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, R::Pps::fai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,  GL_TEXTURE_2D, R::Ms::depthFai.getGlId(), 0 );
 
 	// test if success
 	if( !fbo.isGood() )
@@ -56,11 +56,11 @@ void init2()
 
 	// texture
 	intermid_fbo.setNumOfColorAttachements(1);
-	fai.createEmpty2D( r::w, r::h, GL_RGBA8, GL_RGBA );
+	fai.createEmpty2D( R::w, R::h, GL_RGBA8, GL_RGBA );
 	glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fai.getGlId(), 0 );
 
 	// attach the texes
-	glFramebufferTexture2D( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,  GL_TEXTURE_2D, r::ms::depthFai.getGlId(), 0 );
+	glFramebufferTexture2D( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,  GL_TEXTURE_2D, R::Ms::depthFai.getGlId(), 0 );
 
 	// test if success
 	if( !intermid_fbo.isGood() )
@@ -78,8 +78,8 @@ void init2()
 //=====================================================================================================================================
 void runStage2( const Camera& cam )
 {
-	r::setProjectionViewMatrices( cam );
-	r::setViewport( 0, 0, r::w, r::h );
+	R::setProjectionViewMatrices( cam );
+	R::setViewport( 0, 0, R::w, R::h );
 
 
 	glDepthMask( false );
@@ -102,7 +102,7 @@ void runStage2( const Camera& cam )
 			glDisable( GL_DEPTH_TEST );
 			shader_prog->bind();
 			shader_prog->locTexUnit( shader_prog->GetUniLoc(0), fai, 0 );
-			r::DrawQuad( shader_prog->getAttribLoc(0) );
+			R::DrawQuad( shader_prog->getAttribLoc(0) );
 		}
 	}
 

+ 1 - 1
src/renderer/BulletDebuger.cpp

@@ -1,5 +1,5 @@
 #include "BulletDebuger.h"
-#include "renderer.h"
+#include "Renderer.h"
 
 BulletDebuger::BulletDebuger() :
 	m_debugMode( 0 )

+ 19 - 62
src/renderer/r_dbg.cpp → src/renderer/Dbg.cpp

@@ -1,4 +1,4 @@
-#include "renderer.h"
+#include "Renderer.h"
 #include "Fbo.h"
 #include "Scene.h"
 #include "Texture.h"
@@ -19,6 +19,7 @@ extern btDiscreteDynamicsWorld* dynamicsWorld;
 
 void renderscene( int pass )
 {
+	return;
 	btScalar m[16];
 	btMatrix3x3 rot;
 	rot.setIdentity();
@@ -39,57 +40,13 @@ void renderscene( int pass )
 			colObj->getWorldTransform().getOpenGLMatrix( m );
 			rot = colObj->getWorldTransform().getBasis();
 		}
-		btVector3 wireColor( 1.f, 1.0f, 0.5f ); //wants deactivation
-		if( i & 1 ) wireColor = btVector3( 0.f, 0.0f, 1.f );
-		///color differently for active, sleeping, wantsdeactivation states
-		if( colObj->getActivationState() == 1 ) //active
-		{
-			if( i & 1 )
-			{
-				wireColor += btVector3( 1.f, 0.f, 0.f );
-			}
-			else
-			{
-				wireColor += btVector3( .5f, 0.f, 0.f );
-			}
-		}
-		if( colObj->getActivationState() == 2 ) //ISLAND_SLEEPING
-		{
-			if( i & 1 )
-			{
-				wireColor += btVector3( 0.f, 1.f, 0.f );
-			}
-			else
-			{
-				wireColor += btVector3( 0.f, 0.5f, 0.f );
-			}
-		}
-
-		btVector3 aabbMin, aabbMax;
-		dynamicsWorld->getBroadphase()->getBroadphaseAabb( aabbMin, aabbMax );
 
-		aabbMin -= btVector3( BT_LARGE_FLOAT, BT_LARGE_FLOAT, BT_LARGE_FLOAT );
-		aabbMax += btVector3( BT_LARGE_FLOAT, BT_LARGE_FLOAT, BT_LARGE_FLOAT );
-		//		printf("aabbMin=(%f,%f,%f)\n",aabbMin.getX(),aabbMin.getY(),aabbMin.getZ());
-		//		printf("aabbMax=(%f,%f,%f)\n",aabbMax.getX(),aabbMax.getY(),aabbMax.getZ());
-		//		m_dynamicsWorld->getDebugDrawer()->drawAabb(aabbMin,aabbMax,btVector3(1,1,1));
+		glPushMatrix();
+		glMultMatrixf(m);
 
+		R::Dbg::renderCube( true, 2.0 );
 
-		if( 1 )
-		{
-			switch( pass )
-			{
-				case 0:
-					//m_shapeDrawer->drawOpenGL( m, colObj->getCollisionShape(), wireColor, getDebugMode(), aabbMin, aabbMax );
-					break;
-				case 1:
-					//m_shapeDrawer->drawShadow( m, m_sundirection * rot, colObj->getCollisionShape(), aabbMin, aabbMax );
-					break;
-				case 2:
-					//m_shapeDrawer->drawOpenGL( m, colObj->getCollisionShape(), wireColor * btScalar( 0.3 ), 0, aabbMin, aabbMax );
-					break;
-			}
-		}
+		glPopMatrix();
 	}
 }
 
@@ -98,11 +55,11 @@ void renderscene( int pass )
 
 
 
-namespace r {
-namespace dbg {
+namespace R {
+namespace Dbg {
 
 
-static void RenderSun();
+static void renderSun();
 
 //=====================================================================================================================================
 // DATA VARS                                                                                                                          =
@@ -136,8 +93,8 @@ void init()
 	fbo.setNumOfColorAttachements(1);
 
 	// attach the textures
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, r::pps::fai.getGlId(), 0 );
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,  GL_TEXTURE_2D, r::ms::depthFai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, R::Pps::fai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,  GL_TEXTURE_2D, R::Ms::depthFai.getGlId(), 0 );
 
 	// test if success
 	if( !fbo.isGood() )
@@ -163,13 +120,13 @@ void runStage( const Camera& cam )
 	shdr->bind();
 
 	// OGL stuff
-	setProjectionViewMatrices( cam );
-	setViewport( 0, 0, r::w, r::h );
+	R::setProjectionViewMatrices( cam );
+	R::setViewport( 0, 0, R::w, R::h );
 
 	glEnable( GL_DEPTH_TEST );
 	glDisable( GL_BLEND );
 
-	//r::renderGrid();
+	//R::renderGrid();
 	for( uint i=0; i<Scene::nodes.size(); i++ )
 	{
 		if
@@ -398,14 +355,14 @@ void renderCube( bool cols, float size )
 //=====================================================================================================================================
 // RenderSun                                                                                                                          =
 //=====================================================================================================================================
-static void RenderSun()
+static void renderSun()
 {
 	glPushMatrix();
 
-	r::multMatrix( Mat4( Scene::getSunPos(), Mat3::getIdentity(), 50.0 ) );
+	R::multMatrix( Mat4( Scene::getSunPos(), Mat3::getIdentity(), 50.0 ) );
 
-	r::color3( Vec3(1.0, 1.0, 0.0) );
-	r::dbg::renderSphere( 1.0/8.0, 8 );
+	R::color3( Vec3(1.0, 1.0, 0.0) );
+	R::Dbg::renderSphere( 1.0/8.0, 8 );
 
 	glPopMatrix();
 
@@ -427,7 +384,7 @@ static void RenderSun()
 
 	glPointSize( 10 );
 	glBegin( GL_POINTS );
-		r::color3( Vec3(0.0,1.0,0.0) );
+		R::color3( Vec3(0.0,1.0,0.0) );
 		glVertex3fv( &p[0] );
 	glEnd();
 

+ 5 - 5
src/renderer/r_ms_earlyz.cpp → src/renderer/Earlyz.cpp

@@ -2,7 +2,7 @@
 The file contains functions and vars used for the deferred shading/material stage/early z pass.
 */
 
-#include "renderer.h"
+#include "Renderer.h"
 #include "Resource.h"
 #include "Texture.h"
 #include "Scene.h"
@@ -10,7 +10,7 @@ The file contains functions and vars used for the deferred shading/material stag
 
 #if defined(_EARLY_Z_)
 
-namespace r {
+namespace R {
 namespace ms {
 namespace earlyz {
 
@@ -40,7 +40,7 @@ void init()
 	fbo.setNumOfColorAttachements(0);
 
 	// attach the texture
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, r::ms::depthFai.glId, 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, R::Ms::depthFai.glId, 0 );
 
 	// test if success
 	if( !fbo.CheckStatus() )
@@ -67,8 +67,8 @@ void runPass( const Camera& cam )
 
 	// matrix
 	glClear( GL_DEPTH_BUFFER_BIT );
-	r::setProjectionViewMatrices( cam );
-	r::setViewport( 0, 0, r::w * r::renderingQuality, r::h * r::renderingQuality );
+	R::setProjectionViewMatrices( cam );
+	R::setViewport( 0, 0, R::w * R::renderingQuality, R::h * R::renderingQuality );
 
 	// disable color & blend & enable depth test
 	glColorMask( false, false, false, false );

+ 1 - 1
src/renderer/Fbo.h

@@ -2,7 +2,7 @@
 #define _FBO_H_
 
 #include "Common.h"
-#include "renderer.h"
+#include "Renderer.h"
 
 
 /// The class is created as a wrapper to avoid common mistakes

+ 11 - 11
src/renderer/r_pps_hdr.cpp → src/renderer/Hdr.cpp

@@ -2,15 +2,15 @@
 The file contains functions and vars used for the deferred shading/post-processing stage/bloom passes.
 */
 
-#include "renderer.h"
+#include "Renderer.h"
 #include "Resource.h"
 #include "Texture.h"
 #include "Scene.h"
 #include "Fbo.h"
 
-namespace r {
-namespace pps {
-namespace hdr {
+namespace R {
+namespace Pps {
+namespace Hdr {
 
 
 /*
@@ -71,8 +71,8 @@ init
 */
 void init()
 {
-	wwidth = r::pps::hdr::renderingQuality * r::w;
-	wheight = r::pps::hdr::renderingQuality * r::h;
+	wwidth = R::Pps::Hdr::renderingQuality * R::w;
+	wheight = R::Pps::Hdr::renderingQuality * R::h;
 
 	InitFBOs( pass0_fbo, pass0Fai, GL_RGB );
 	InitFBOs( pass1_fbo, pass1Fai, GL_RGB );
@@ -92,7 +92,7 @@ runPass
 */
 void runPass( const Camera& /*cam*/ )
 {
-	r::setViewport( 0, 0, wwidth, wheight );
+	R::setViewport( 0, 0, wwidth, wheight );
 
 	glDisable( GL_BLEND );
 	glDisable( GL_DEPTH_TEST );
@@ -103,10 +103,10 @@ void runPass( const Camera& /*cam*/ )
 
 	pass0_shdr->bind();
 
-	pass0_shdr->locTexUnit( pass0_shdr->GetUniLoc(0), r::is::fai, 0 );
+	pass0_shdr->locTexUnit( pass0_shdr->GetUniLoc(0), R::Is::fai, 0 );
 
 	// Draw quad
-	r::DrawQuad( pass0_shdr->getAttribLoc(0) );
+	R::DrawQuad( pass0_shdr->getAttribLoc(0) );
 
 
 	// pass 1
@@ -117,7 +117,7 @@ void runPass( const Camera& /*cam*/ )
 	pass1_shdr->locTexUnit( pass1_shdr->GetUniLoc(0), pass0Fai, 0 );
 
 	// Draw quad
-	r::DrawQuad( pass1_shdr->getAttribLoc(0) );
+	R::DrawQuad( pass1_shdr->getAttribLoc(0) );
 
 
 	// pass 2
@@ -128,7 +128,7 @@ void runPass( const Camera& /*cam*/ )
 	pass2_shdr->locTexUnit( pass2_shdr->GetUniLoc(0), pass1Fai, 0 );
 
 	// Draw quad
-	r::DrawQuad( pass2_shdr->getAttribLoc(0) );
+	R::DrawQuad( pass2_shdr->getAttribLoc(0) );
 
 	// end
 	Fbo::Unbind();

+ 46 - 46
src/renderer/r_is.cpp → src/renderer/Is.cpp

@@ -2,7 +2,7 @@
 The file contains functions and vars used for the deferred shading illumination stage.
 */
 
-#include "renderer.h"
+#include "Renderer.h"
 #include "Camera.h"
 #include "Scene.h"
 #include "Mesh.h"
@@ -12,8 +12,8 @@ The file contains functions and vars used for the deferred shading illumination
 #include "Fbo.h"
 #include "LightProps.h"
 
-namespace r {
-namespace is {
+namespace R {
+namespace Is {
 
 
 /*
@@ -28,10 +28,10 @@ Texture fai;  // illuminated Scene
 static uint stencil_rb; // framebuffer render buffer for stencil optimizations
 
 // shaders
-static ShaderProg* shdr_is_ambient;
-static ShaderProg* shdr_is_lp_point_light;
-static ShaderProg* shdr_is_lp_spot_light_nos;
-static ShaderProg* shdr_is_lp_spot_light_s;
+static ShaderProg* ambientSProg;
+static ShaderProg* pointLightSProg;
+static ShaderProg* spotLightNoShadowSProg;
+static ShaderProg* spotLightShadowSProg;
 
 
 // the bellow are used to speedup the calculation of the frag pos (view space) inside the shader. This is done by precompute the
@@ -60,9 +60,9 @@ static void initSMOUVS()
 static void DrawSMOUVS( const PointLight& light )
 {
 	const float scale = 1.2;
-	r::multMatrix( Mat4( light.translationWspace, Mat3::getIdentity(), light.radius*scale ) );
+	R::multMatrix( Mat4( light.translationWspace, Mat3::getIdentity(), light.radius*scale ) );
 
-	r::noShaders();
+	R::noShaders();
 
 	glBindBuffer( GL_ARRAY_BUFFER, smo_uvs_vbo_id );
 	glEnableClientState( GL_VERTEX_ARRAY );
@@ -81,15 +81,15 @@ static void DrawSMOUVS( const PointLight& light )
 /// Calc the view vector that we will use inside the shader to calculate the frag pos in view space
 static void CalcViewVector( const Camera& cam )
 {
-	int _w = r::w;
-	int _h = r::h;
+	int _w = R::w;
+	int _h = R::h;
 	int pixels[4][2]={ {_w,_h}, {0,_h}, { 0,0 }, {_w,0} }; // from righ up and CC wise to right down, Just like we render the quad
 	int viewport[4]={ 0, 0, _w, _h };
 
 	for( int i=0; i<4; i++ )
 	{
 		/* Original Code:
-		r::UnProject( pixels[i][0], pixels[i][1], 10, cam.getViewMatrix(), cam.getProjectionMatrix(), viewport,
+		R::UnProject( pixels[i][0], pixels[i][1], 10, cam.getViewMatrix(), cam.getProjectionMatrix(), viewport,
 		              view_vectors[i].x, view_vectors[i].y, view_vectors[i].z );
 		view_vectors[i] = cam.getViewMatrix() * view_vectors[i];
 		The original code is the above 3 lines. The optimized follows:*/
@@ -130,14 +130,14 @@ static void initStageFBO()
 	// init the stencil render buffer
 	glGenRenderbuffers( 1, &stencil_rb );
 	glBindRenderbuffer( GL_RENDERBUFFER, stencil_rb );
-	glRenderbufferStorage( GL_RENDERBUFFER, GL_STENCIL_INDEX, r::w, r::h );
+	glRenderbufferStorage( GL_RENDERBUFFER, GL_STENCIL_INDEX, R::w, R::h );
 	glFramebufferRenderbufferEXT( GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, stencil_rb );
 
 	// inform in what buffers we draw
 	fbo.setNumOfColorAttachements(1);
 
 	// create the txtrs
-	if( !fai.createEmpty2D( r::w, r::h, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE ) )
+	if( !fai.createEmpty2D( R::w, R::h, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE ) )
 	{
 		FATAL( "See prev error" );
 	}
@@ -162,17 +162,17 @@ init
 void init()
 {
 	// load the shaders
-	shdr_is_ambient = rsrc::shaders.load( "shaders/is_ap.glsl" );
-	shdr_is_lp_point_light = rsrc::shaders.load( "shaders/is_lp_point.glsl" );
-	shdr_is_lp_spot_light_nos = rsrc::shaders.load( "shaders/is_lp_spot.glsl" );
-	shdr_is_lp_spot_light_s = rsrc::shaders.load( "shaders/is_lp_spot_shad.glsl" );
+	ambientSProg = rsrc::shaders.load( "shaders/is_ap.glsl" );
+	pointLightSProg = rsrc::shaders.load( "shaders/is_lp_point.glsl" );
+	spotLightNoShadowSProg = rsrc::shaders.load( "shaders/is_lp_spot.glsl" );
+	spotLightShadowSProg = rsrc::shaders.load( "shaders/is_lp_spot_shad.glsl" );
 
 
 	// init the rest
 	initStageFBO();
 	initSMOUVS();
 
-	r::is::shadows::init();
+	R::Is::Shad::init();
 }
 
 
@@ -186,14 +186,14 @@ static void AmbientPass( const Camera& /*cam*/, const Vec3& color )
 	glDisable( GL_BLEND );
 
 	// set the shader
-	shdr_is_ambient->bind();
+	ambientSProg->bind();
 
 	// set the uniforms
-	glUniform3fv( shdr_is_ambient->GetUniLoc(0), 1, &((Vec3)color)[0] );
-	shdr_is_ambient->locTexUnit( shdr_is_ambient->GetUniLoc(1), r::ms::diffuseFai, 0 );
+	glUniform3fv( ambientSProg->GetUniLoc(0), 1, &((Vec3)color)[0] );
+	ambientSProg->locTexUnit( ambientSProg->GetUniLoc(1), R::Ms::diffuseFai, 0 );
 
 	// Draw quad
-	r::DrawQuad( shdr_is_ambient->getAttribLoc(0) );
+	R::DrawQuad( ambientSProg->getAttribLoc(0) );
 }
 
 
@@ -217,7 +217,7 @@ static void SetStencilMask( const Camera& cam, const PointLight& light )
 	glPushMatrix();
 	glMatrixMode( GL_PROJECTION );
 	glPushMatrix();
-	r::setProjectionViewMatrices( cam );
+	R::setProjectionViewMatrices( cam );
 
 
 	// render sphere to stencil buffer
@@ -262,11 +262,11 @@ static void SetStencilMask( const Camera& cam, const SpotLight& light )
 	glPushMatrix();
 	glMatrixMode( GL_PROJECTION );
 	glPushMatrix();
-	r::setProjectionViewMatrices( cam );
+	R::setProjectionViewMatrices( cam );
 
 
 	// render camera's shape to stencil buffer
-	r::noShaders();
+	R::noShaders();
 	const Camera& lcam = light.camera;
 	float x = lcam.getZFar() / tan( (PI-lcam.getFovX())/2 );
 	float y = tan( lcam.getFovY()/2 ) * lcam.getZFar();
@@ -283,7 +283,7 @@ static void SetStencilMask( const Camera& cam, const SpotLight& light )
 		{ { x, -y, z }, {-x, -y, z }, {-x,  y, z } }, // front bottom left
 	};
 
-	r::multMatrix( lcam.transformationWspace );
+	R::multMatrix( lcam.transformationWspace );
 	glEnableClientState( GL_VERTEX_ARRAY );
 	glVertexPointer( 3, GL_FLOAT, 0, verts );
 	glDrawArrays( GL_TRIANGLES, 0, tris_num*3 );
@@ -325,14 +325,14 @@ static void PointLightPass( const Camera& cam, const PointLight& light )
 	SetStencilMask( cam, light );
 
 	//** bind the shader **
-	const ShaderProg& shader = *shdr_is_lp_point_light; // I dont want to type
+	const ShaderProg& shader = *pointLightSProg; // I dont want to type
 	shader.bind();
 
 	// bind the material stage framebuffer attachable images
-	shader.locTexUnit( shader.GetUniLoc(0), r::ms::normalFai, 0 );
-	shader.locTexUnit( shader.GetUniLoc(1), r::ms::diffuseFai, 1 );
-	shader.locTexUnit( shader.GetUniLoc(2), r::ms::specularFai, 2 );
-	shader.locTexUnit( shader.GetUniLoc(3), r::ms::depthFai, 3 );
+	shader.locTexUnit( shader.GetUniLoc(0), R::Ms::normalFai, 0 );
+	shader.locTexUnit( shader.GetUniLoc(1), R::Ms::diffuseFai, 1 );
+	shader.locTexUnit( shader.GetUniLoc(2), R::Ms::specularFai, 2 );
+	shader.locTexUnit( shader.GetUniLoc(3), R::Ms::depthFai, 3 );
 	glUniform2fv( shader.GetUniLoc(4), 1, &planes[0] );
 
 	Vec3 light_pos_eye_space = light.translationWspace.getTransformed( cam.getViewMatrix() );
@@ -345,7 +345,7 @@ static void PointLightPass( const Camera& cam, const PointLight& light )
 	glEnableVertexAttribArray( shader.getAttribLoc(0) );
 	glEnableVertexAttribArray( shader.getAttribLoc(1) );
 
-	glVertexAttribPointer( shader.getAttribLoc(0), 2, GL_FLOAT, false, 0, &quad_vert_cords[0] );
+	glVertexAttribPointer( shader.getAttribLoc(0), 2, GL_FLOAT, false, 0, &R::quad_vert_cords[0] );
 	glVertexAttribPointer( shader.getAttribLoc(1), 3, GL_FLOAT, false, 0, &view_vectors[0] );
 
 	glDrawArrays( GL_QUADS, 0, 4 );
@@ -374,7 +374,7 @@ static void SpotLightPass( const Camera& cam, const SpotLight& light )
 	//** generate the shadow map (if needed) **
 	if( light.castsShadow )
 	{
-		r::is::shadows::runPass( light.camera );
+		R::Is::Shad::runPass( light.camera );
 
 		// restore the IS FBO
 		fbo.bind();
@@ -388,16 +388,16 @@ static void SpotLightPass( const Camera& cam, const SpotLight& light )
 	//** set the shader and uniforms **
 	const ShaderProg* shdr; // because of the huge name
 
-	if( light.castsShadow )  shdr = shdr_is_lp_spot_light_s;
-	else                      shdr = shdr_is_lp_spot_light_nos;
+	if( light.castsShadow )  shdr = spotLightShadowSProg;
+	else                      shdr = spotLightNoShadowSProg;
 
 	shdr->bind();
 
 	// bind the framebuffer attachable images
-	shdr->locTexUnit( shdr->GetUniLoc(0), r::ms::normalFai, 0 );
-	shdr->locTexUnit( shdr->GetUniLoc(1), r::ms::diffuseFai, 1 );
-	shdr->locTexUnit( shdr->GetUniLoc(2), r::ms::specularFai, 2 );
-	shdr->locTexUnit( shdr->GetUniLoc(3), r::ms::depthFai, 3 );
+	shdr->locTexUnit( shdr->GetUniLoc(0), R::Ms::normalFai, 0 );
+	shdr->locTexUnit( shdr->GetUniLoc(1), R::Ms::diffuseFai, 1 );
+	shdr->locTexUnit( shdr->GetUniLoc(2), R::Ms::specularFai, 2 );
+	shdr->locTexUnit( shdr->GetUniLoc(3), R::Ms::depthFai, 3 );
 
 	if( light.lightProps->getTexture() == NULL )
 		ERROR( "No texture is attached to the light. light_props name: " << light.lightProps->getRsrcName() );
@@ -433,23 +433,23 @@ static void SpotLightPass( const Camera& cam, const SpotLight& light )
 	glActiveTexture( GL_TEXTURE0 );
 	glMatrixMode( GL_TEXTURE );
 	glloadMatrixf( mBias );
-	r::multMatrix( light.camera.getProjectionMatrix() );
-	r::multMatrix( light.camera.getViewMatrix() );
-	r::multMatrix( cam.transformationWspace );
+	R::multMatrix( light.camera.getProjectionMatrix() );
+	R::multMatrix( light.camera.getViewMatrix() );
+	R::multMatrix( cam.transformationWspace );
 	glMatrixMode(GL_MODELVIEW);*/
 
 	// the shadow stuff
 	// render depth to texture and then bind it
 	if( light.castsShadow )
 	{
-		shdr->locTexUnit( shdr->GetUniLoc(11), r::is::shadows::shadowMap, 5 );
+		shdr->locTexUnit( shdr->GetUniLoc(11), R::Is::Shad::shadowMap, 5 );
 	}
 
 	//** render quad **
 	glEnableVertexAttribArray( shdr->getAttribLoc(0) );
 	glEnableVertexAttribArray( shdr->getAttribLoc(1) );
 
-	glVertexAttribPointer( shdr->getAttribLoc(0), 2, GL_FLOAT, false, 0, &quad_vert_cords[0] );
+	glVertexAttribPointer( shdr->getAttribLoc(0), 2, GL_FLOAT, false, 0, &R::quad_vert_cords[0] );
 	glVertexAttribPointer( shdr->getAttribLoc(1), 3, GL_FLOAT, false, 0, &view_vectors[0] );
 
 	glDrawArrays( GL_QUADS, 0, 4 );
@@ -477,7 +477,7 @@ void runStage( const Camera& cam )
 	fbo.bind();
 
 	// OGL stuff
-	r::setViewport( 0, 0, r::w, r::h );
+	R::setViewport( 0, 0, R::w, R::h );
 
 	glMatrixMode( GL_MODELVIEW );
 	glLoadIdentity();

+ 11 - 11
src/renderer/r_pps_lscatt.cpp → src/renderer/Lscatt.cpp

@@ -1,12 +1,12 @@
-#include "renderer.h"
+#include "Renderer.h"
 #include "Resource.h"
 #include "Texture.h"
 #include "Scene.h"
 #include "Fbo.h"
 
-namespace r {
-namespace pps {
-namespace lscatt {
+namespace R {
+namespace Pps {
+namespace Lscatt {
 
 
 /*
@@ -33,9 +33,9 @@ init
 */
 void init()
 {
-	if( renderingQuality<0.0 || renderingQuality>1.0 ) ERROR("Incorect r::pps:lscatt::rendering_quality");
-	float wwidth = r::pps::lscatt::renderingQuality * r::w;
-	float wheight = r::pps::lscatt::renderingQuality * r::h;
+	if( renderingQuality<0.0 || renderingQuality>1.0 ) ERROR("Incorect R::pps:lscatt::rendering_quality");
+	float wwidth = R::Pps::Lscatt::renderingQuality * R::w;
+	float wheight = R::Pps::Lscatt::renderingQuality * R::h;
 
 	// create FBO
 	fbo.Create();
@@ -76,7 +76,7 @@ void runPass( const Camera& cam )
 {
 	fbo.bind();
 
-	r::setViewport( 0, 0, r::w * renderingQuality, r::h * renderingQuality );
+	R::setViewport( 0, 0, R::w * renderingQuality, R::h * renderingQuality );
 
 	glDisable( GL_BLEND );
 	glDisable( GL_DEPTH_TEST );
@@ -84,8 +84,8 @@ void runPass( const Camera& cam )
 	// set the shader
 	shdr->bind();
 
-	shdr->locTexUnit( ms_depth_fai_uni_loc, r::ms::depthFai, 0 );
-	shdr->locTexUnit( is_fai_uni_loc, r::is::fai, 1 );
+	shdr->locTexUnit( ms_depth_fai_uni_loc, R::Ms::depthFai, 0 );
+	shdr->locTexUnit( is_fai_uni_loc, R::Is::fai, 1 );
 
 	// pass the light
 	Vec4 p = Vec4( Scene::getSunPos(), 1.0 );
@@ -95,7 +95,7 @@ void runPass( const Camera& cam )
 	glUniform2fv( shdr->getUniLoc("light_pos_screen_space"), 1, &p[0] );
 
 	// Draw quad
-	r::DrawQuad( shdr->getAttribLoc(0) );
+	R::DrawQuad( shdr->getAttribLoc(0) );
 
 	// end
 	fbo.Unbind();

+ 11 - 11
src/renderer/r_ms.cpp → src/renderer/Ms.cpp

@@ -2,7 +2,7 @@
  * The file contains functions and vars used for the deferred shading material stage.
  */
 
-#include "renderer.h"
+#include "Renderer.h"
 #include "Camera.h"
 #include "Scene.h"
 #include "Mesh.h"
@@ -11,8 +11,8 @@
 #include "MeshNode.h"
 
 
-namespace r {
-namespace ms {
+namespace R {
+namespace Ms {
 
 
 /*
@@ -40,10 +40,10 @@ void init()
 
 	// create the FAIs
 	const int internal_format = GL_RGBA16F_ARB;
-	if( !normalFai.createEmpty2D( r::w, r::h, internal_format, GL_RGBA ) ||
-	    !diffuseFai.createEmpty2D( r::w, r::h, internal_format, GL_RGBA ) ||
-	    !specularFai.createEmpty2D( r::w, r::h, internal_format, GL_RGBA ) ||
-	    !depthFai.createEmpty2D( r::w, r::h, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT ) )
+	if( !normalFai.createEmpty2D( R::w, R::h, internal_format, GL_RGBA ) ||
+	    !diffuseFai.createEmpty2D( R::w, R::h, internal_format, GL_RGBA ) ||
+	    !specularFai.createEmpty2D( R::w, R::h, internal_format, GL_RGBA ) ||
+	    !depthFai.createEmpty2D( R::w, R::h, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT ) )
 	{
 		FATAL( "See prev error" );
 	}
@@ -69,7 +69,7 @@ void init()
 	fbo.Unbind();
 
 #if defined( _EARLY_Z_ )
-	r::ms::earlyz::init();
+	R::Ms::earlyz::init();
 #endif
 }
 
@@ -81,7 +81,7 @@ void runStage( const Camera& cam )
 {
 	#if defined( _EARLY_Z_ )
 		// run the early z pass
-		r::ms::earlyz::runPass( cam );
+		R::Ms::earlyz::runPass( cam );
 	#endif
 
 	fbo.bind();
@@ -89,8 +89,8 @@ void runStage( const Camera& cam )
 	#if !defined( _EARLY_Z_ )
 		glClear( GL_DEPTH_BUFFER_BIT );
 	#endif
-	r::setProjectionViewMatrices( cam );
-	r::setViewport( 0, 0, r::w, r::h );
+	R::setProjectionViewMatrices( cam );
+	R::setViewport( 0, 0, R::w, R::h );
 
 	//glEnable( GL_DEPTH_TEST );
 	Scene::skybox.Render( cam.getViewMatrix().getRotationPart() );

+ 50 - 50
src/renderer/r_pps.cpp → src/renderer/Pps.cpp

@@ -1,10 +1,10 @@
-#include "renderer.h"
+#include "Renderer.h"
 #include "Resource.h"
 #include "Texture.h"
 #include "Fbo.h"
 
-namespace r {
-namespace pps {
+namespace R {
+namespace Pps {
 
 namespace edgeaa {
 	bool enabled = false;
@@ -21,15 +21,15 @@ static Fbo fbo; // yet another FBO
 Texture fai;
 
 // shader stuff
-static ShaderProg* shdr_post_proc_stage;
+static ShaderProg* sProg;
 
-namespace shdr_vars
+namespace shdrVars
 {
-	int is_fai;
-	int pps_ssao_fai;
-	int ms_normal_fai;
-	int hdr_fai;
-	int lscatt_fai;
+	int isFai;
+	int ppsSsaoFai;
+	int msNormalFai;
+	int hdrFai;
+	int lscattFai;
 }
 
 
@@ -48,7 +48,7 @@ void init()
 	fbo.setNumOfColorAttachements(1);
 
 	// create the texes
-	fai.createEmpty2D( r::w, r::h, GL_RGB, GL_RGB );
+	fai.createEmpty2D( R::w, R::h, GL_RGB, GL_RGB );
 
 	// attach
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fai.getGlId(), 0 );
@@ -61,30 +61,30 @@ void init()
 
 
 	// init the shader and it's vars
-	shdr_post_proc_stage = rsrc::shaders.load( "shaders/pps.glsl" );
-	shdr_post_proc_stage->bind();
+	sProg = rsrc::shaders.load( "shaders/pps.glsl" );
+	sProg->bind();
 
-	shdr_vars::is_fai = shdr_post_proc_stage->getUniLoc( "is_fai" );
+	shdrVars::isFai = sProg->getUniLoc( "is_fai" );
 
-	if( r::pps::ssao::enabled )
+	if( R::Pps::Ssao::enabled )
 	{
-		r::pps::ssao::init();
-		shdr_vars::pps_ssao_fai = shdr_post_proc_stage->getUniLoc( "pps_ssao_fai" );
+		R::Pps::Ssao::init();
+		shdrVars::ppsSsaoFai = sProg->getUniLoc( "pps_ssao_fai" );
 	}
 
-	if( r::pps::hdr::enabled )
+	if( R::Pps::Hdr::enabled )
 	{
-		r::pps::hdr::init();
-		shdr_vars::hdr_fai = shdr_post_proc_stage->getUniLoc( "pps_hdr_fai" );
+		R::Pps::Hdr::init();
+		shdrVars::hdrFai = sProg->getUniLoc( "pps_hdr_fai" );
 	}
 
-	if( r::pps::edgeaa::enabled )
-		shdr_vars::ms_normal_fai = shdr_post_proc_stage->getUniLoc( "ms_normal_fai" );
+	if( R::Pps::edgeaa::enabled )
+		shdrVars::msNormalFai = sProg->getUniLoc( "ms_normal_fai" );
 
-	if( r::pps::lscatt::enabled )
+	if( R::Pps::Lscatt::enabled )
 	{
-		r::pps::lscatt::init();
-		shdr_vars::lscatt_fai = shdr_post_proc_stage->getUniLoc( "pps_lscatt_fai" );
+		R::Pps::Lscatt::init();
+		shdrVars::lscattFai = sProg->getUniLoc( "pps_lscatt_fai" );
 	}
 
 }
@@ -97,14 +97,14 @@ runStage
 */
 void runStage( const Camera& cam )
 {
-	if( r::pps::ssao::enabled )
-		r::pps::ssao::runPass( cam );
+	if( R::Pps::Ssao::enabled )
+		R::Pps::Ssao::runPass( cam );
 
-	if( r::pps::hdr::enabled )
-		r::pps::hdr::runPass( cam );
+	if( R::Pps::Hdr::enabled )
+		R::Pps::Hdr::runPass( cam );
 
-	if( r::pps::lscatt::enabled )
-		r::pps::lscatt::runPass( cam );
+	if( R::Pps::Lscatt::enabled )
+		R::Pps::Lscatt::runPass( cam );
 
 	fbo.bind();
 
@@ -112,43 +112,43 @@ void runStage( const Camera& cam )
 	glDisable( GL_DEPTH_TEST );
 	glDisable( GL_BLEND );
 
-	r::setViewport( 0, 0, r::w, r::h );
+	R::setViewport( 0, 0, R::w, R::h );
 
 	// set shader
-	shdr_post_proc_stage->bind();
+	sProg->bind();
 
-	r::is::fai.bind(0);
-	//r::ms::depthFai.bind(0);
-	glUniform1i( shdr_vars::is_fai, 0 );
+	R::Is::fai.bind(0);
+	//R::Ms::depthFai.bind(0);
+	glUniform1i( shdrVars::isFai, 0 );
 
-	if( r::pps::ssao::enabled )
+	if( R::Pps::Ssao::enabled )
 	{
-		r::pps::ssao::bluredFai.bind(1);
-		glUniform1i( shdr_vars::pps_ssao_fai, 1 );
+		R::Pps::Ssao::bluredFai2.bind(1);
+		glUniform1i( shdrVars::ppsSsaoFai, 1 );
 	}
 
-	if( r::pps::edgeaa::enabled )
+	if( R::Pps::edgeaa::enabled )
 	{
-		r::ms::normalFai.bind(2);
-		glUniform1i( shdr_vars::ms_normal_fai, 2 );
+		R::Ms::normalFai.bind(2);
+		glUniform1i( shdrVars::msNormalFai, 2 );
 	}
 
-	if( r::pps::hdr::enabled )
+	if( R::Pps::Hdr::enabled )
 	{
-		r::pps::hdr::pass2Fai.bind(3);
-		//r::bs::r_fai.bind(3);
-		glUniform1i( shdr_vars::hdr_fai, 3 );
+		R::Pps::Hdr::pass2Fai.bind(3);
+		//R::Bs::r_fai.bind(3);
+		glUniform1i( shdrVars::hdrFai, 3 );
 	}
 
-	if( r::pps::lscatt::enabled )
+	if( R::Pps::Lscatt::enabled )
 	{
-		r::pps::lscatt::fai.bind(4);
-		glUniform1i( shdr_vars::lscatt_fai, 4 );
+		R::Pps::Lscatt::fai.bind(4);
+		glUniform1i( shdrVars::lscattFai, 4 );
 	}
 
 
 	// draw quad
-	r::DrawQuad( shdr_post_proc_stage->getAttribLoc(0) );
+	R::DrawQuad( sProg->getAttribLoc(0) );
 
 	// unbind FBO
 	fbo.Unbind();

+ 55 - 55
src/renderer/renderer.cpp → src/renderer/Renderer.cpp

@@ -1,13 +1,13 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <jpeglib.h>
-#include "renderer.h"
+#include "Renderer.h"
 #include "Texture.h"
 #include "Scene.h"
 #include "Camera.h"
 #include "App.h"
 
-namespace r {
+namespace R {
 
 
 /*
@@ -74,28 +74,28 @@ static void BuildStdShaderPreProcStr()
 	tmp += "precision lowp float;\n";
 	tmp += "#pragma optimize(on)\n";
 	tmp += "#pragma debug(off)\n";
-	tmp += "#define R_W " + Util::floatToStr(r::w) + "\n";
-	tmp += "#define R_H " + Util::floatToStr(r::h) + "\n";
-	//tmp += "#define R_Q " + floatToStr(r::renderingQuality) + "\n";
-	tmp += "#define SHADOWMAP_SIZE " + Util::intToStr(r::is::shadows::shadowResolution) + "\n";
-	if( r::is::shadows::pcf )
+	tmp += "#define R_W " + Util::floatToStr(R::w) + "\n";
+	tmp += "#define R_H " + Util::floatToStr(R::h) + "\n";
+	//tmp += "#define R_Q " + floatToStr(R::renderingQuality) + "\n";
+	tmp += "#define SHADOWMAP_SIZE " + Util::intToStr(R::Is::Shad::shadowResolution) + "\n";
+	if( R::Is::Shad::pcf )
 		tmp += "#define _SHADOW_MAPPING_PCF_\n";
-	if( r::pps::ssao::enabled )
+	if( R::Pps::Ssao::enabled )
 	{
 		tmp += "#define _SSAO_\n";
-		tmp += "#define SSAO_RENDERING_QUALITY " + Util::floatToStr(r::pps::ssao::renderingQuality) + "\n";
+		tmp += "#define SSAO_RENDERING_QUALITY " + Util::floatToStr(R::Pps::Ssao::renderingQuality) + "\n";
 	}
-	if( r::pps::edgeaa::enabled )
+	if( R::Pps::edgeaa::enabled )
 		tmp += "#define _EDGEAA_\n";
-	if( r::pps::hdr::enabled )
+	if( R::Pps::Hdr::enabled )
 	{
 		tmp += "#define _HDR_\n";
-		tmp += "#define HDR_RENDERING_QUALITY " + Util::floatToStr(r::pps::hdr::renderingQuality) + "\n";
+		tmp += "#define HDR_RENDERING_QUALITY " + Util::floatToStr(R::Pps::Hdr::renderingQuality) + "\n";
 	}
-	if( r::pps::lscatt::enabled )
+	if( R::Pps::Lscatt::enabled )
 	{
 		tmp += "#define _LSCATT_\n";
-		tmp += "#define LSCATT_RENDERING_QUALITY " + Util::floatToStr(r::pps::lscatt::renderingQuality) + "\n";
+		tmp += "#define LSCATT_RENDERING_QUALITY " + Util::floatToStr(R::Pps::Lscatt::renderingQuality) + "\n";
 	}
 }
 
@@ -169,12 +169,12 @@ void init()
 
 	// init deferred stages
 	// WARNING: the order of the inits is crucial!!!!!
-	r::ms::init();
-	r::is::init();
-	r::bs::init();
-	r::pps::init();
-	r::bs::init2();
-	r::dbg::init();
+	R::Ms::init();
+	R::Is::init();
+	R::Bs::init();
+	R::Pps::init();
+	R::Bs::init2();
+	R::Dbg::init();
 
 	PRINT( "Renderer initialization ends" );
 }
@@ -187,42 +187,42 @@ render
 */
 void render( const Camera& cam )
 {
-	r::ms::runStage( cam );
-	r::is::runStage( cam );
-	r::bs::runStage( cam );
-	r::pps::runStage( cam );
-	r::bs::runStage2( cam );
-	r::dbg::runStage( cam );
+	R::Ms::runStage( cam );
+	R::Is::runStage( cam );
+	R::Bs::runStage( cam );
+	R::Pps::runStage( cam );
+	R::Bs::runStage2( cam );
+	R::Dbg::runStage( cam );
 
-	//r::setViewport( 0, 0, App::windowW, App::windowH );
-	r::setViewport( 0, 0, App::windowW, App::windowH );
+	//R::setViewport( 0, 0, App::windowW, App::windowH );
+	R::setViewport( 0, 0, App::windowW, App::windowH );
 
 	glDisable( GL_DEPTH_TEST );
 	glDisable( GL_BLEND );
 
 	shdr_final->bind();
-	shdr_final->locTexUnit( shdr_final->GetUniLoc(0), r::pps::fai, 0 );
+	shdr_final->locTexUnit( shdr_final->GetUniLoc(0), R::Pps::fai, 0 );
 
 	/*const int step = 100;
-	if( r::framesNum < step )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::ms::diffuseFai, 0 );
-	else if( r::framesNum < step*2 )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::ms::normalFai, 0 );
-	else if( r::framesNum < step*3 )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::ms::specularFai, 0 );
-	else if( r::framesNum < step*4 )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::ms::depthFai, 0 );
-	else if( r::framesNum < step*5 )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::pps::ssao::bluredFai, 0 );
-	else if( r::framesNum < step*6 )
+	if( R::framesNum < step )
+		shdr_final->locTexUnit( shdr_final->getUniLoc(0), R::Ms::diffuseFai, 0 );
+	else if( R::framesNum < step*2 )
+		shdr_final->locTexUnit( shdr_final->getUniLoc(0), R::Ms::normalFai, 0 );
+	else if( R::framesNum < step*3 )
+		shdr_final->locTexUnit( shdr_final->getUniLoc(0), R::Ms::specularFai, 0 );
+	else if( R::framesNum < step*4 )
+		shdr_final->locTexUnit( shdr_final->getUniLoc(0), R::Ms::depthFai, 0 );
+	else if( R::framesNum < step*5 )
+		shdr_final->locTexUnit( shdr_final->getUniLoc(0), R::pps::ssao::bluredFai, 0 );
+	else if( R::framesNum < step*6 )
 	{
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::pps::hdr::pass2Fai, 0 );
+		shdr_final->locTexUnit( shdr_final->getUniLoc(0), R::pps::hdr::pass2Fai, 0 );
 	}
 	else
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::pps::fai, 0 );*/
+		shdr_final->locTexUnit( shdr_final->getUniLoc(0), R::pps::fai, 0 );*/
 
 
-	r::DrawQuad( shdr_final->getAttribLoc(0) );
+	R::DrawQuad( shdr_final->getAttribLoc(0) );
 }
 
 
@@ -368,10 +368,10 @@ static bool TakeScreenshotTGA( const char* filename )
 	unsigned char tga_header_uncompressed[12] = {0,0,2,0,0,0,0,0,0,0,0,0};
 	unsigned char header[6];
 
-	header[1] = r::w / 256;
-	header[0] = r::w % 256;
-	header[3] = r::h / 256;
-	header[2] = r::h % 256;
+	header[1] = R::w / 256;
+	header[0] = R::w % 256;
+	header[3] = R::h / 256;
+	header[2] = R::h % 256;
 	header[4] = 24;
 	header[5] = 0;
 
@@ -379,10 +379,10 @@ static bool TakeScreenshotTGA( const char* filename )
 	fs.write( (char*)header, 6 );
 
 	// write the buffer
-	char* buffer = (char*)calloc( r::w*r::h*3, sizeof(char) );
+	char* buffer = (char*)calloc( R::w*R::h*3, sizeof(char) );
 
-	glReadPixels( 0, 0, r::w, r::h, GL_BGR, GL_UNSIGNED_BYTE, buffer );
-	fs.write( buffer, r::w*r::h*3 );
+	glReadPixels( 0, 0, R::w, R::h, GL_BGR, GL_UNSIGNED_BYTE, buffer );
+	fs.write( buffer, R::w*R::h*3 );
 
 	// end
 	fs.close();
@@ -415,8 +415,8 @@ static bool TakeScreenshotJPEG( const char* filename )
 	jpeg_create_compress( &cinfo );
 	jpeg_stdio_dest( &cinfo, outfile );
 
-	cinfo.image_width      = r::w;
-	cinfo.image_height     = r::h;
+	cinfo.image_width      = R::w;
+	cinfo.image_height     = R::h;
 	cinfo.input_components = 3;
 	cinfo.in_color_space   = JCS_RGB;
 	jpeg_set_defaults( &cinfo);
@@ -424,15 +424,15 @@ static bool TakeScreenshotJPEG( const char* filename )
 	jpeg_start_compress( &cinfo, true );
 
 	// read from OGL
-	char* buffer = (char*)malloc( r::w*r::h*3*sizeof(char) );
-	glReadPixels( 0, 0, r::w, r::h, GL_RGB, GL_UNSIGNED_BYTE, buffer );
+	char* buffer = (char*)malloc( R::w*R::h*3*sizeof(char) );
+	glReadPixels( 0, 0, R::w, R::h, GL_RGB, GL_UNSIGNED_BYTE, buffer );
 
 	// write buffer to file
 	JSAMPROW row_pointer;
 
 	while( cinfo.next_scanline < cinfo.image_height )
 	{
-		row_pointer = (JSAMPROW) &buffer[ (r::h-1-cinfo.next_scanline)*3*r::w ];
+		row_pointer = (JSAMPROW) &buffer[ (R::h-1-cinfo.next_scanline)*3*R::w ];
 		jpeg_write_scanlines( &cinfo, &row_pointer, 1 );
 	}
 

+ 14 - 13
src/renderer/renderer.h → src/renderer/Renderer.h

@@ -14,7 +14,7 @@
 class Camera;
 
 /// renderer namespace
-namespace r { // begin namespace
+namespace R { // begin namespace
 
 
 extern uint  w; ///< width of the rendering window
@@ -34,7 +34,7 @@ extern int  max_anisotropy; ///< Max texture anisotropy. Used in Texture::load
 
 // misc
 extern void takeScreenshot( const char* filename ); ///< Save the colorbuffer as 24bit uncompressed TGA image
-extern void init(); ///< Inits the renderer subsystem. Setting OpenGL and executes "r::*::init" functions among other things
+extern void init(); ///< Inits the renderer subsystem. Setting OpenGL and executes "R::*::init" functions among other things
 extern void prepareNextFrame(); ///< Runs before rendering
 extern const uchar* getLastError(); ///< getLastError
 extern void printLastError(); ///< prints last OpenGL error
@@ -66,7 +66,7 @@ inline void setViewport( uint x, uint y, uint w, uint h ) { glViewport(x,y,w,h);
 // externals that have global scope in other namespaces
 
 /// material stage namespace
-namespace ms
+namespace Ms
 {
 	extern Texture normalFai, diffuseFai, specularFai, depthFai;
 
@@ -77,14 +77,14 @@ namespace ms
 	/// EarlyZ depth pass namespace
 	namespace earlyz
 	{
-		extern void init(); ///< Inits the the earlyz FBO with r::ms::depthFai
-		extern void runPass( const Camera& cam ); ///< Renders the Scene's depth in the r::ms:depthFai
+		extern void init(); ///< Inits the the earlyz FBO with R::Ms::depthFai
+		extern void runPass( const Camera& cam ); ///< Renders the Scene's depth in the R::ms:depthFai
 	}
 #endif
 }
 
 /// illumination stage namespace
-namespace is
+namespace Is
 {
 	extern Texture fai;
 
@@ -92,7 +92,7 @@ namespace is
 	extern void runStage( const Camera& cam );
 
 	/// illumination stage shadows namesapce
-	namespace shadows
+	namespace Shad
 	{
 		extern void init();
 		extern void runPass( const Camera& cam );
@@ -104,7 +104,7 @@ namespace is
 }
 
 /// blending stage namespace
-namespace bs
+namespace Bs
 {
 	extern Texture faiBsScene;
 
@@ -115,18 +115,19 @@ namespace bs
 }
 
 /// pre-processing stage namespace
-namespace pps
+namespace Pps
 {
 	extern void init();
 	extern void runStage( const Camera& cam );
 
-	namespace ssao
+	namespace Ssao
 	{
 		extern bool enabled;
 		extern void init();
 		extern void runPass( const Camera& cam );
 		extern Texture fai;
 		extern Texture bluredFai;
+		extern Texture bluredFai2;
 		extern float renderingQuality;
 	}
 
@@ -135,7 +136,7 @@ namespace pps
 		extern bool enabled;
 	}
 
-	namespace hdr
+	namespace Hdr
 	{
 		extern bool    enabled;
 		extern void    init();
@@ -146,7 +147,7 @@ namespace pps
 		extern float   renderingQuality;
 	}
 
-	namespace lscatt
+	namespace Lscatt
 	{
 		extern bool enabled;
 		extern void init();
@@ -159,7 +160,7 @@ namespace pps
 }
 
 /// debug stage namespace
-namespace dbg
+namespace Dbg
 {
 	extern bool showAxis;
 	extern bool showFnormals;

+ 6 - 6
src/renderer/r_is_shadows.cpp → src/renderer/Shadows.cpp

@@ -1,4 +1,4 @@
-#include "renderer.h"
+#include "Renderer.h"
 #include "Texture.h"
 #include "Scene.h"
 #include "Resource.h"
@@ -6,9 +6,9 @@
 #include "Material.h"
 #include "MeshNode.h"
 
-namespace r {
-namespace is {
-namespace shadows {
+namespace R {
+namespace Is {
+namespace Shad {
 
 /*
 =======================================================================================================================================
@@ -88,8 +88,8 @@ void runPass( const Camera& cam )
 	glPushAttrib( GL_VIEWPORT_BIT );
 
 	glClear( GL_DEPTH_BUFFER_BIT );
-	r::setProjectionViewMatrices( cam );
-	r::setViewport( 0, 0, shadowResolution, shadowResolution );
+	R::setProjectionViewMatrices( cam );
+	R::setViewport( 0, 0, shadowResolution, shadowResolution );
 
 	// disable color & blend & enable depth test
 	glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );

+ 71 - 39
src/renderer/r_pps_ssao.cpp → src/renderer/Ssao.cpp

@@ -2,16 +2,16 @@
 The file contains functions and vars used for the deferred shading/post-processing stage/SSAO pass.
 */
 
-#include "renderer.h"
+#include "Renderer.h"
 #include "Resource.h"
 #include "Texture.h"
 #include "Scene.h"
 #include "Fbo.h"
 #include "Camera.h"
 
-namespace r {
-namespace pps {
-namespace ssao {
+namespace R {
+namespace Pps {
+namespace Ssao {
 
 
 /*
@@ -19,16 +19,16 @@ namespace ssao {
 VARS                                                                                                                                  =
 =======================================================================================================================================
 */
-static Fbo fbo, blur_fbo; // yet another FBO
+static Fbo fbo, blurFbo, blurFbo2; // yet another FBO
 
-float renderingQuality = 0.25; // the renderingQuality of the SSAO fai. Chose low so it can blend
+float renderingQuality = 0.20; // the renderingQuality of the SSAO fai. Chose low so it can blend
 bool enabled = true;
 
 static uint wwidth, wheight; // window width and height
 
-Texture fai, bluredFai; // SSAO factor
+Texture fai, bluredFai, bluredFai2; // SSAO factor
 
-static ShaderProg* shdr_ppp_ssao, * blur_shdr;
+static ShaderProg* ssaoSProg, * blurSProg, * blurSProg2;
 
 static Texture* noise_map;
 
@@ -39,26 +39,50 @@ static Texture* noise_map;
 static void InitBlurFBO()
 {
 	// create FBO
-	blur_fbo.Create();
-	blur_fbo.bind();
+	blurFbo.Create();
+	blurFbo.bind();
 
 	// inform in what buffers we draw
-	blur_fbo.setNumOfColorAttachements(1);
+	blurFbo.setNumOfColorAttachements(1);
 
 	// create the texes
 	bluredFai.createEmpty2D( wwidth, wheight, GL_ALPHA8, GL_ALPHA );
-	bluredFai.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-	bluredFai.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+	//bluredFai.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+	//bluredFai.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
 
 	// attach
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, bluredFai.getGlId(), 0 );
 
 	// test if success
-	if( !blur_fbo.isGood() )
+	if( !blurFbo.isGood() )
 		FATAL( "Cannot create deferred shading post-processing stage SSAO blur FBO" );
 
 	// unbind
-	blur_fbo.Unbind();
+	blurFbo.Unbind();
+
+
+
+	// create FBO
+	blurFbo2.Create();
+	blurFbo2.bind();
+
+	// inform in what buffers we draw
+	blurFbo2.setNumOfColorAttachements(1);
+
+	// create the texes
+	bluredFai2.createEmpty2D( wwidth, wheight, GL_ALPHA8, GL_ALPHA );
+	bluredFai2.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+	bluredFai2.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+
+	// attach
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, bluredFai2.getGlId(), 0 );
+
+	// test if success
+	if( !blurFbo2.isGood() )
+		FATAL( "Cannot create deferred shading post-processing stage SSAO blur FBO" );
+
+	// unbind
+	blurFbo2.Unbind();
 }
 
 
@@ -69,9 +93,9 @@ init
 */
 void init()
 {
-	if( renderingQuality<0.0 || renderingQuality>1.0 ) ERROR("Incorect r::pps:ssao::rendering_quality");
-	wwidth = r::pps::ssao::renderingQuality * r::w;
-	wheight = r::pps::ssao::renderingQuality * r::h;
+	if( renderingQuality<0.0 || renderingQuality>1.0 ) ERROR("Incorect R::pps:ssao::rendering_quality");
+	wwidth = R::Pps::Ssao::renderingQuality * R::w;
+	wheight = R::Pps::Ssao::renderingQuality * R::h;
 
 	// create FBO
 	fbo.Create();
@@ -82,8 +106,8 @@ void init()
 
 	// create the texes
 	fai.createEmpty2D( wwidth, wheight, GL_ALPHA8, GL_ALPHA );
-	fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
-	fai.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+	//fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+	//fai.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
 
 	// attach
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fai.getGlId(), 0 );
@@ -97,24 +121,25 @@ void init()
 
 
 	// init shaders
-	shdr_ppp_ssao = rsrc::shaders.load( "shaders/pps_ssao.glsl" );
+	ssaoSProg = rsrc::shaders.load( "shaders/pps_ssao.glsl" );
 
 	// load noise map and disable temporaly the texture compression and enable mipmaping
-	bool tex_compr = r::textureCompression;
-	bool mipmaping = r::mipmaping;
-	r::textureCompression = false;
-	r::mipmaping = true;
+	bool tex_compr = R::textureCompression;
+	bool mipmaping = R::mipmaping;
+	R::textureCompression = false;
+	R::mipmaping = true;
 	noise_map = rsrc::textures.load( "gfx/noise3.tga" );
 	noise_map->texParameter( GL_TEXTURE_WRAP_S, GL_REPEAT );
 	noise_map->texParameter( GL_TEXTURE_WRAP_T, GL_REPEAT );
 	//noise_map->texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
 	//noise_map->texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
-	r::textureCompression = tex_compr;
-	r::mipmaping = mipmaping;
+	R::textureCompression = tex_compr;
+	R::mipmaping = mipmaping;
 
 	// blur FBO
 	InitBlurFBO();
-	blur_shdr = rsrc::shaders.load( "shaders/pps_ssao_blur.glsl" );
+	blurSProg = rsrc::shaders.load( "shaders/pps_ssao_blur.glsl" );
+	blurSProg2 = rsrc::shaders.load( "shaders/pps_ssao_blur2.glsl" );
 }
 
 
@@ -127,25 +152,32 @@ void runPass( const Camera& cam )
 {
 	fbo.bind();
 
-	r::setViewport( 0, 0, wwidth, wheight );
+	R::setViewport( 0, 0, wwidth, wheight );
 
 	glDisable( GL_BLEND );
 	glDisable( GL_DEPTH_TEST );
 
 	// fill SSAO FAI
-	shdr_ppp_ssao->bind();
-	glUniform2fv( shdr_ppp_ssao->GetUniLoc(0), 1, &(Vec2(cam.getZNear(), cam.getZFar()))[0] );
-	shdr_ppp_ssao->locTexUnit( shdr_ppp_ssao->GetUniLoc(1), ms::depthFai, 0 );
-	shdr_ppp_ssao->locTexUnit( shdr_ppp_ssao->GetUniLoc(2), *noise_map, 1 );
-	shdr_ppp_ssao->locTexUnit( shdr_ppp_ssao->GetUniLoc(3), ms::normalFai, 2 );
-	r::DrawQuad( shdr_ppp_ssao->getAttribLoc(0) ); // Draw quad
+	ssaoSProg->bind();
+	glUniform2fv( ssaoSProg->GetUniLoc(0), 1, &(Vec2(cam.getZNear(), cam.getZFar()))[0] );
+	ssaoSProg->locTexUnit( ssaoSProg->GetUniLoc(1), R::Ms::depthFai, 0 );
+	ssaoSProg->locTexUnit( ssaoSProg->GetUniLoc(2), *noise_map, 1 );
+	ssaoSProg->locTexUnit( ssaoSProg->GetUniLoc(3), R::Ms::normalFai, 2 );
+	R::DrawQuad( ssaoSProg->getAttribLoc(0) ); // Draw quad
 
 
 	// second pass. blur
-	blur_fbo.bind();
-	blur_shdr->bind();
-	blur_shdr->locTexUnit( blur_shdr->GetUniLoc(0), fai, 0 );
-	r::DrawQuad( blur_shdr->getAttribLoc(0) ); // Draw quad
+	blurFbo.bind();
+	blurSProg->bind();
+	blurSProg->locTexUnit( blurSProg->GetUniLoc(0), fai, 0 );
+	R::DrawQuad( blurSProg->getAttribLoc(0) ); // Draw quad
+
+	// third pass. blur
+	blurFbo2.bind();
+	blurSProg2->bind();
+	blurSProg2->locTexUnit( blurSProg2->GetUniLoc(0), bluredFai, 0 );
+	R::DrawQuad( blurSProg2->getAttribLoc(0) ); // Draw quad
+
 
 	// end
 	Fbo::Unbind();

+ 2 - 2
src/renderer2/r_is.cpp

@@ -54,7 +54,7 @@ void renderer_t::illumination_stage_t::CalcViewVector()
 	for( int i=0; i<4; i++ )
 	{
 		 Original Code:
-		r::UnProject( pixels[i][0], pixels[i][1], 10, cam.getViewMatrix(), cam.getProjectionMatrix(), viewport,
+		R::UnProject( pixels[i][0], pixels[i][1], 10, cam.getViewMatrix(), cam.getProjectionMatrix(), viewport,
 		              view_vectors[i].x, view_vectors[i].y, view_vectors[i].z );
 		view_vectors[i] = cam.getViewMatrix() * view_vectors[i];
 		The original code is the above 3 lines. The optimized follows:
@@ -131,7 +131,7 @@ void renderer_t::illumination_stage_t::point_light_pass_t::SetStencilMask( const
 	glPushMatrix();
 	glMatrixMode( GL_PROJECTION );
 	glPushMatrix();
-	r::setProjectionViewMatrices( cam );
+	R::setProjectionViewMatrices( cam );
 
 
 	// render sphere to stencil buffer

+ 2 - 2
src/renderer2/renderer.hpp

@@ -217,7 +217,7 @@ struct renderer_t
 	//===================================================================================================================================
 	material_stage_t ms;
 	illumination_stage_t is;
-	blending_stage_t bs;
+	blending_stage_t Bs;
 	postprocessing_stage_t pps;
 
 	camera_t* camera;
@@ -245,7 +245,7 @@ struct renderer_t
 	//===================================================================================================================================
 	// FUNCS                                                                                                                            =
 	//===================================================================================================================================
-	renderer_t(): ms(*this), is(*this), bs(*this), pps(*this) {}
+	renderer_t(): ms(*this), is(*this), Bs(*this), pps(*this) {}
 
 	void UpdateMatrices();
 	static void setViewport( uint x, uint y, uint w, uint h ) { glViewport(x,y,w,h); };

+ 5 - 5
src/resources/Material.cpp

@@ -5,7 +5,7 @@
 #include "parser.h"
 #include "Texture.h"
 #include "ShaderProg.h"
-#include "renderer.h"
+#include "Renderer.h"
 
 
 #define MTL_ERROR( x ) ERROR( "Material (" << getRsrcPath() << getRsrcName() << "): " << x );
@@ -266,19 +266,19 @@ bool Material::load( const char* filename )
 						}
 						else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "IS_FAI" ) )
 						{
-							var.value.texture = &r::is::fai;
+							var.value.texture = &R::Is::fai;
 						}
 						else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "MS_NORMAL_FAI" ) )
 						{
-							var.value.texture = &r::ms::normalFai;
+							var.value.texture = &R::Ms::normalFai;
 						}
 						else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "MS_DEPTH_FAI" ) )
 						{
-							var.value.texture = &r::ms::depthFai;
+							var.value.texture = &R::Ms::depthFai;
 						}
 						else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "PPS_FAI" ) )
 						{
-							var.value.texture = &r::pps::fai;
+							var.value.texture = &R::Pps::fai;
 						}
 						else
 						{

+ 1 - 1
src/resources/Mesh.cpp

@@ -1,5 +1,5 @@
 #include "Mesh.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "Resource.h"
 #include "Scanner.h"
 #include "parser.h"

+ 2 - 2
src/resources/ShaderProg.cpp

@@ -1,5 +1,5 @@
 #include "ShaderProg.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "ShaderParser.h"
 #include "Texture.h"
 
@@ -235,7 +235,7 @@ bool ShaderProg::customload( const char* filename, const char* extra_source )
 	if( !pars.parseFile( filename ) ) return false;
 
 	// create, compile, attach and link
-	string preproc_source = r::getStdShaderPreprocDefines() + extra_source;
+	string preproc_source = R::getStdShaderPreprocDefines() + extra_source;
 	uint vert_glId = createAndCompileShader( pars.getOutput().getVertShaderSource().c_str(), preproc_source.c_str(), GL_VERTEX_SHADER );
 	if( vert_glId == 0 ) return false;
 

+ 7 - 7
src/resources/Texture.cpp

@@ -1,7 +1,7 @@
 #include <fstream>
 #include <SDL/SDL_image.h>
 #include "Texture.h"
-#include "renderer.h"
+#include "Renderer.h"
 
 
 unsigned char Image::tgaHeaderUncompressed[12] = {0,0,2,0,0,0,0,0,0,0,0,0};
@@ -318,12 +318,12 @@ bool Texture::load( const char* filename )
 	// bind the texture
 	glGenTextures( 1, &glId );
 	bind(0);
-	if( r::mipmaping )  glTexParameteri( type, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
+	if( R::mipmaping )  glTexParameteri( type, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
 	else                glTexParameteri( type, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
 
 	glTexParameteri( type, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
 
-	glTexParameterf( type, GL_TEXTURE_MAX_ANISOTROPY_EXT, r::max_anisotropy );
+	glTexParameterf( type, GL_TEXTURE_MAX_ANISOTROPY_EXT, R::max_anisotropy );
 
 	// leave to GL_REPEAT. There is not real performace impact
 	glTexParameteri( type, GL_TEXTURE_WRAP_S, GL_REPEAT );
@@ -332,14 +332,14 @@ bool Texture::load( const char* filename )
 	int format = (img.bpp==32) ? GL_RGBA : GL_RGB;
 
 	int int_format; // the internal format of the image
-	if( r::textureCompression )
+	if( R::textureCompression )
 		//int_format = (img.bpp==32) ? GL_COMPRESSED_RGBA_S3TC_DXT1_EXT : GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
 		int_format = (img.bpp==32) ? GL_COMPRESSED_RGBA : GL_COMPRESSED_RGB;
 	else
 		int_format = (img.bpp==32) ? GL_RGBA : GL_RGB;
 
 	glTexImage2D( type, 0, int_format, img.width, img.height, 0, format, GL_UNSIGNED_BYTE, img.data );
-	if( r::mipmaping ) glGenerateMipmap(type);
+	if( R::mipmaping ) glGenerateMipmap(type);
 
 	img.unload();
 	return true;
@@ -366,7 +366,7 @@ bool Texture::createEmpty2D( float width_, float height_, int internal_format, i
 	// allocate to vram
 	glTexImage2D( type, 0, internal_format, width_, height_, 0, format_, type_, NULL );
 
-	if( r::mipmaping ) glGenerateMipmap(type);
+	if( R::mipmaping ) glGenerateMipmap(type);
 
 	GLenum errid = glGetError();
 	if( errid != GL_NO_ERROR )
@@ -410,7 +410,7 @@ void Texture::unload()
 //=====================================================================================================================================
 void Texture::bind( uint unit ) const
 {
-	if( unit>=(uint)r::maxTextureUnits )
+	if( unit>=(uint)R::maxTextureUnits )
 		WARNING("Max tex units passed");
 
 	glActiveTexture( GL_TEXTURE0+unit );

+ 2 - 2
src/scene/Camera.cpp

@@ -1,5 +1,5 @@
 #include "Camera.h"
-#include "renderer.h"
+#include "Renderer.h"
 
 
 //=====================================================================================================================================
@@ -22,7 +22,7 @@ void Camera::setAll( float fovx_, float fovy_, float znear_, float zfar_ )
 void Camera::render()
 {
 	glPushMatrix();
-	r::multMatrix( transformationWspace );
+	R::multMatrix( transformationWspace );
 
 	const float camLen = 1.0;
 	float tmp0 = camLen / tan( (PI - fovX)*0.5 ) + 0.001;

+ 4 - 4
src/scene/Light.cpp

@@ -1,6 +1,6 @@
 #include "Light.h"
 #include "collision.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "LightProps.h"
 
 
@@ -45,10 +45,10 @@ void Light::deinit()
 static void RenderSphere( const Mat4& tsl, const Vec3& col )
 {
 	glPushMatrix();
-	r::multMatrix( tsl );
+	R::multMatrix( tsl );
 
-	r::color3( col );
-	r::dbg::renderSphere( 1.0/8.0, 8 );
+	R::color3( col );
+	R::Dbg::renderSphere( 1.0/8.0, 8 );
 
 	glPopMatrix();
 }

+ 2 - 2
src/scene/MeshNode.cpp

@@ -1,7 +1,7 @@
 #include "MeshNode.h"
 #include "Resource.h"
 #include "Mesh.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "Material.h"
 #include "SkelNode.h"
 #include "Skeleton.h"
@@ -42,7 +42,7 @@ void MeshNode::deinit()
 void MeshNode::render( Material* mtl ) const
 {
 	glPushMatrix();
-	r::multMatrix( transformationWspace );
+	R::multMatrix( transformationWspace );
 
 	// if we have skeleton controller
 	if( meshSkelCtrl )

+ 1 - 1
src/scene/Node.cpp

@@ -1,6 +1,6 @@
 #include <algorithm>
 #include "Node.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "collision.h"
 #include "Controller.h"
 

+ 1 - 1
src/scene/Scene.cpp

@@ -152,7 +152,7 @@ void updateAllWorldStuff()
 //=====================================================================================================================================
 void updateAllControllers()
 {
-	/*for( NodeContainer::iterator it=nodes.begin(); it!=nodes.end(); it++ )
+	/*for( NodeContaineR::iterator it=nodes.begin(); it!=nodes.end(); it++ )
 	{
 		Node* node = (*it);
 		for( Vec<Controller*>::iterator it1=node->controllers.begin(); it1!=node->controllers.end(); it1++ )

+ 1 - 1
src/scene/SkelModelNode.cpp

@@ -4,7 +4,7 @@
 #include "MeshSkelNodeCtrl.h"
 
 /// Create a skelNode and N meshNodes that have a meshSkelCtrl
-void skelModelNode::init( const char* filename )
+void SkelModelNode::init( const char* filename )
 {
 	Scanner scanner;
 	if( !scanner.loadFile( filename ) ) return;

+ 2 - 2
src/scene/SkelModelNode.h

@@ -13,13 +13,13 @@ class SkelNode;
  * Skeleton model Scene node
  * It is just a group node with a derived init
  */
-class skelModelNode: public Node
+class SkelModelNode: public Node
 {
 	public:
 		Vec<MeshNode*> meshNodes;
 		SkelNode*   skelNode;
 		
-		skelModelNode(): Node(NT_SKEL_MODEL), skelNode(NULL) { isGroupNode = true; }
+		SkelModelNode(): Node(NT_SKEL_MODEL), skelNode(NULL) { isGroupNode = true; }
 		void init( const char* filename );
 		void deinit() {} ///< Do nothing because it loads no resources
 		void render() {} ///< Do nothing

+ 2 - 2
src/scene/SkelNode.cpp

@@ -1,5 +1,5 @@
 #include "SkelNode.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "SkelAnim.h"
 #include "Skeleton.h"
 #include "SkelAnimCtrl.h"
@@ -40,7 +40,7 @@ void SkelNode::deinit()
 void SkelNode::render()
 {
 	glPushMatrix();
-	r::multMatrix( transformationWspace );
+	R::multMatrix( transformationWspace );
 
 	//glPointSize( 4.0f );
 	//glLineWidth( 2.0f );

+ 3 - 3
src/ui/Ui.cpp

@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include "Ui.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "Texture.h"
 #include "Resource.h"
 
@@ -53,7 +53,7 @@ static void SetGL()
 
 	glMatrixMode( GL_PROJECTION );
 	glPushMatrix();
-	r::loadMatrix( r::ortho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ) );
+	R::loadMatrix( R::ortho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ) );
 
 	glMatrixMode( GL_MODELVIEW );
 	glPushMatrix();
@@ -177,7 +177,7 @@ void setFontWidth( float w_ )
 	// width
 	fontW = w_;
 	// height
-	fontH = fontW * r::aspectRatio;
+	fontH = fontW * R::aspectRatio;
 }
 
 

+ 7 - 7
src/uncategorized/collision.cpp

@@ -1,6 +1,6 @@
 #include <float.h>
 #include "collision.h"
-#include "renderer.h"
+#include "Renderer.h"
 
 
 static int render_seperation_lock = 0;
@@ -819,7 +819,7 @@ void plane_t::Render()
 	q.setFrom2Vec3( Vec3( 0.0, 0.0, 1.0 ), normal );
 	Mat3 rotate( q );
 	Mat4 transform( translate, rotate );
-	r::multMatrix( transform );
+	R::multMatrix( transform );
 
 	glColor4fv( &Vec4(1.0f, 1.0f, 1.0f, 0.5f)[0] );
 
@@ -911,7 +911,7 @@ void bsphere_t::Render()
 
 	glColor4fv( &Vec4(1.0, 1.0, 1.0, 0.2)[0] );
 
-	r::dbg::renderSphere( radius, 24 );
+	R::Dbg::renderSphere( radius, 24 );
 
 	glPopMatrix();
 }
@@ -1195,7 +1195,7 @@ void aabb_t::Render()
 
 	glColor3fv( &Vec3( 1.0, 1.0, 1.0 )[0] );
 
-	r::dbg::renderCube();
+	R::Dbg::renderCube();
 
 	glPopMatrix();
 
@@ -1639,14 +1639,14 @@ void obb_t::Render()
 	glPushMatrix();
 
 	glTranslatef( center.x, center.y, center.z ); // translate
-	r::multMatrix( Mat4(rotation) ); // rotate
+	R::multMatrix( Mat4(rotation) ); // rotate
 	glScalef( extends.x, extends.y, extends.z ); // scale
 
 	glColor3fv( &Vec3(1.0f, 1.0f, 1.0f)[0] );
 
-	r::dbg::renderCube( false, 2.0f );
+	R::Dbg::renderCube( false, 2.0f );
 
-	r::color3( Vec3( 0.0, 1.0, 0.0 ) );
+	R::color3( Vec3( 0.0, 1.0, 0.0 ) );
 	glBegin( GL_POINTS );
 		glVertex3fv( &Vec3(1.0, 1.0, 1.0)[0] );
 	glEnd();

+ 4 - 4
src/uncategorized/particles.cpp

@@ -1,6 +1,6 @@
 /*
 #include "particles.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "Util.h"
 
 using namespace std;
@@ -50,7 +50,7 @@ void particle_t::render()
 	if( 1 )
 	{
 		glPushMatrix();
-		r::multMatrix( transformationWspace );
+		R::multMatrix( transformationWspace );
 
 		glBegin( GL_LINES );
 			// x-axis
@@ -206,11 +206,11 @@ void particle_emitter_t::render()
 		glPushMatrix();
 
 		updateWorldTransform();
-		r::multMatrix( transformationWspace );
+		R::multMatrix( transformationWspace );
 
 		glColor3f( 0.0, 1.0, 0.0 );
 
-		r::dbg::renderCube();
+		R::dbg::renderCube();
 
 		glPolygonMode( GL_FRONT, GL_FILL );
 		glPopMatrix();

+ 2 - 2
src/uncategorized/skybox.cpp

@@ -1,6 +1,6 @@
 #include "skybox.h"
 #include "Resource.h"
-#include "renderer.h"
+#include "Renderer.h"
 #include "Math.h"
 #include "Camera.h"
 #include "Scene.h"
@@ -67,7 +67,7 @@ void Skybox::Render( const Mat3& rotation )
 	// set the rotation matrix
 	Mat3 tmp( rotation );
 	tmp.rotateYAxis(rotation_ang);
-	r::loadMatrix( Mat4( tmp ) );
+	R::loadMatrix( Mat4( tmp ) );
 	rotation_ang += 0.0001;
 	if( rotation_ang >= 2*PI ) rotation_ang = 0.0;
 

+ 1 - 0
src/utility/App.h

@@ -21,6 +21,7 @@ extern void waitForNextFrame();
 extern void togleFullScreen();
 extern void printAppInfo();
 
+/// Gets the number of milliseconds since SDL library initialization
 inline uint getTicks()
 {
 	return SDL_GetTicks();

+ 1 - 1
src/utility/Input.cpp

@@ -1,5 +1,5 @@
 #include "Input.h"
-#include "renderer.h"
+#include "Renderer.h"
 
 
 namespace I {