Переглянути джерело

Working on the new codding style

Panagiotis Christopoulos Charitos 16 роки тому
батько
коміт
f805646f85
58 змінених файлів з 1076 додано та 1234 видалено
  1. 333 336
      build/debug/Makefile
  2. 3 3
      src/controllers/MeshSkelNodeCtrl.h
  3. 32 32
      src/controllers/SkelAnimCtrl.cpp
  4. 5 4
      src/controllers/SkelAnimCtrl.h
  5. 16 16
      src/main.cpp
  6. 29 29
      src/math/Mat3.inl.h
  7. 4 4
      src/math/Mat4.inl.h
  8. 14 14
      src/math/MathFuncs.inl.h
  9. 10 10
      src/math/Quat.inl.h
  10. 1 1
      src/math/Vec3.h
  11. 4 4
      src/math/Vec3.inl.h
  12. 15 15
      src/renderer/Fbo.h
  13. 20 20
      src/renderer/Vbo.h
  14. 13 14
      src/renderer/r_bs.cpp
  15. 19 20
      src/renderer/r_bs2.cpp
  16. 36 37
      src/renderer/r_dbg.cpp
  17. 37 38
      src/renderer/r_is.cpp
  18. 22 23
      src/renderer/r_is_shadows.cpp
  19. 24 25
      src/renderer/r_ms.cpp
  20. 8 9
      src/renderer/r_ms_earlyz.cpp
  21. 20 21
      src/renderer/r_pps.cpp
  22. 25 26
      src/renderer/r_pps_hdr.cpp
  23. 15 16
      src/renderer/r_pps_lscatt.cpp
  24. 29 30
      src/renderer/r_pps_ssao.cpp
  25. 0 185
      src/renderer/r_private.h
  26. 62 63
      src/renderer/renderer.cpp
  27. 91 50
      src/renderer/renderer.h
  28. 1 1
      src/renderer2/r_is.cpp
  29. 5 5
      src/renderer2/r_ms.cpp
  30. 2 2
      src/renderer2/renderer.hpp
  31. 6 6
      src/resources/Material.cpp
  32. 2 2
      src/resources/Material.h
  33. 12 12
      src/resources/Mesh.h
  34. 2 2
      src/resources/Resource.h
  35. 7 7
      src/resources/ShaderParser.cpp
  36. 1 1
      src/resources/ShaderProg.cpp
  37. 1 1
      src/resources/SkelAnim.cpp
  38. 2 2
      src/resources/SkelAnim.h
  39. 3 3
      src/resources/Texture.cpp
  40. 3 3
      src/resources/Texture.h
  41. 6 6
      src/scene/Camera.cpp
  42. 1 1
      src/scene/Camera.h
  43. 4 4
      src/scene/Light.cpp
  44. 8 8
      src/scene/MeshNode.cpp
  45. 1 1
      src/scene/MeshNode.h
  46. 3 3
      src/scene/Node.h
  47. 4 4
      src/scene/Scene.cpp
  48. 1 1
      src/scene/Scene.h
  49. 1 1
      src/scene/SkelNode.cpp
  50. 53 53
      src/tokenizer/Scanner.cpp
  51. 1 1
      src/tokenizer/Scanner.h
  52. 36 36
      src/ui/Ui.cpp
  53. 6 6
      src/uncategorized/collision.cpp
  54. 3 3
      src/uncategorized/particles.cpp
  55. 2 2
      src/uncategorized/skybox.cpp
  56. 2 2
      src/uncategorized/skybox.h
  57. 2 2
      src/utility/Input.cpp
  58. 8 8
      src/utility/Util.cpp

+ 333 - 336
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//collision.cpp ../../src/uncategorized//skybox.cpp ../../src/uncategorized//map.cpp ../../src/uncategorized//memory.cpp ../../src/uncategorized//particles.cpp ../../src//main.cpp ../../src/renderer//renderer.cpp ../../src/renderer//r_is_shadows.cpp ../../src/renderer//r_is.cpp ../../src/renderer//r_ms_earlyz.cpp ../../src/renderer//BulletDebuger.cpp ../../src/renderer//r_pps.cpp ../../src/renderer//r_bs.cpp ../../src/renderer//r_dbg.cpp ../../src/renderer//r_ms.cpp ../../src/renderer//r_pps_lscatt.cpp ../../src/renderer//r_pps_hdr.cpp ../../src/renderer//r_bs2.cpp ../../src/renderer//r_pps_ssao.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 renderer.o r_is_shadows.o r_is.o r_ms_earlyz.o BulletDebuger.o r_pps.o r_bs.o r_dbg.o r_ms.o r_pps_lscatt.o r_pps_hdr.o r_bs2.o r_pps_ssao.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 
+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 
 PRECOMPILED_HEADERS = 
 
 all: $(PRECOMPILED_HEADERS) $(SOURCES) $(EXECUTABLE)
@@ -22,26 +22,6 @@ 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 \
@@ -64,6 +44,36 @@ skybox.o: ../../src/uncategorized//skybox.cpp \
 	@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 \
@@ -77,7 +87,7 @@ map.o: ../../src/uncategorized//map.cpp ../../src/uncategorized//map.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/Mesh.h \
- ../../src/renderer/vbo.h ../../src/resources/Resource.h \
+ ../../src/renderer/Vbo.h ../../src/resources/Resource.h \
  ../../src/utility/Util.h ../../src/utility/Common.h \
  ../../src/uncategorized/collision.h ../../src/tokenizer/Scanner.h \
  ../../src/tokenizer/parser.h ../../src/tokenizer/Scanner.h \
@@ -86,16 +96,6 @@ 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 \
@@ -114,7 +114,7 @@ main.o: ../../src//main.cpp ../../src/utility/Common.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 \
- ../../src/resources/Mesh.h ../../src/renderer/vbo.h \
+ ../../src/resources/Mesh.h ../../src/renderer/Vbo.h \
  ../../src/scene/Light.h ../../src/scene/Camera.h \
  ../../src/resources/Material.h ../../src/resources/Resource.h \
  ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
@@ -257,12 +257,12 @@ main.o: ../../src//main.cpp ../../src/utility/Common.h \
 	@echo Compiling ../../src//main.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src//main.cpp -o main.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 \
+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 \
@@ -273,13 +273,14 @@ renderer.o: ../../src/renderer//renderer.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/Texture.h ../../src/scene/Scene.h \
- ../../src/uncategorized/skybox.h ../../src/renderer//r_private.h \
- ../../src/utility/App.h
-	@echo Compiling ../../src/renderer//renderer.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//renderer.cpp -o renderer.o
+ ../../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
 
-r_is_shadows.o: ../../src/renderer//r_is_shadows.cpp \
+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 \
@@ -296,13 +297,11 @@ r_is_shadows.o: ../../src/renderer//r_is_shadows.cpp \
  ../../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//r_private.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
+ ../../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_is.o: ../../src/renderer//r_is.cpp ../../src/renderer//renderer.h \
+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 \
@@ -320,14 +319,13 @@ 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//r_private.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//r_bs2.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_bs2.cpp -o r_bs2.o
 
-r_ms_earlyz.o: ../../src/renderer//r_ms_earlyz.cpp \
+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 \
@@ -345,82 +343,9 @@ r_ms_earlyz.o: ../../src/renderer//r_ms_earlyz.cpp \
  ../../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//r_private.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
-
-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 \
- ../../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
-	@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 \
- ../../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/renderer//r_private.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_bs.o: ../../src/renderer//r_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 \
- ../../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//r_private.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//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 \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
@@ -438,10 +363,10 @@ r_dbg.o: ../../src/renderer//r_dbg.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/renderer//r_private.h ../../src/renderer//fbo.h \
- ../../src/scene/Scene.h ../../src/uncategorized/skybox.h \
- ../../src/resources/Texture.h ../../src/scene/Node.h \
- ../../src/scene/SkelNode.h ../../src/controllers/Controller.h \
+ ../../src/renderer//Fbo.h ../../src/scene/Scene.h \
+ ../../src/uncategorized/skybox.h ../../src/resources/Texture.h \
+ ../../src/scene/Node.h ../../src/scene/SkelNode.h \
+ ../../src/controllers/Controller.h \
  ../../../bullet_svn/src/btBulletCollisionCommon.h \
  ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
  ../../../bullet_svn/src/LinearMath/btVector3.h \
@@ -574,7 +499,29 @@ r_dbg.o: ../../src/renderer//r_dbg.cpp ../../src/renderer//renderer.h \
 	@echo Compiling ../../src/renderer//r_dbg.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_dbg.cpp -o r_dbg.o
 
-r_ms.o: ../../src/renderer//r_ms.cpp ../../src/renderer//renderer.h \
+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 \
+ ../../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_hdr.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_pps_hdr.cpp -o r_pps_hdr.o
+
+r_pps.o: ../../src/renderer//r_pps.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 \
@@ -590,15 +537,12 @@ r_ms.o: ../../src/renderer//r_ms.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/scene/Scene.h ../../src/uncategorized/skybox.h \
- ../../src/resources/Texture.h ../../src/resources/Mesh.h \
- ../../src/renderer/vbo.h ../../src/renderer//r_private.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
+ ../../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_pps_lscatt.o: ../../src/renderer//r_pps_lscatt.cpp \
+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 \
@@ -614,15 +558,25 @@ 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//r_private.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/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
 
-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 \
@@ -635,14 +589,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//r_private.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_bs2.o: ../../src/renderer//r_bs2.cpp ../../src/renderer//renderer.h \
+r_bs.o: ../../src/renderer//r_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 \
@@ -660,13 +611,13 @@ r_bs2.o: ../../src/renderer//r_bs2.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/renderer//r_private.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
+ ../../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
 
-r_pps_ssao.o: ../../src/renderer//r_pps_ssao.cpp \
+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 \
@@ -684,13 +635,84 @@ r_pps_ssao.o: ../../src/renderer//r_pps_ssao.cpp \
  ../../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//r_private.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
+ ../../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
 
-SkelNode.o: ../../src/scene//SkelNode.cpp ../../src/scene//SkelNode.h \
+r_is.o: ../../src/renderer//r_is.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 \
+ ../../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//r_is.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_is.cpp -o r_is.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 \
+ ../../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_lscatt.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/renderer//r_pps_lscatt.cpp -o r_pps_lscatt.o
+
+MeshNode.o: ../../src/scene//MeshNode.cpp ../../src/scene//MeshNode.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/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/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
+
+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 \
@@ -710,11 +732,9 @@ SkelNode.o: ../../src/scene//SkelNode.cpp ../../src/scene//SkelNode.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 \
+Node.o: ../../src/scene//Node.cpp ../../src/scene//Node.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/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 \
@@ -724,12 +744,13 @@ 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/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/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
 
 SkelModelNode.o: ../../src/scene//SkelModelNode.cpp \
  ../../src/scene//SkelModelNode.h ../../src/utility/Common.h \
@@ -754,30 +775,10 @@ SkelModelNode.o: ../../src/scene//SkelModelNode.cpp \
 	@echo Compiling ../../src/scene//SkelModelNode.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//SkelModelNode.cpp -o SkelModelNode.o
 
-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 \
+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//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 \
@@ -788,18 +789,12 @@ 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/resources/Resource.h ../../src/utility/Util.h \
- ../../src/utility/Common.h ../../src/resources/Resource.h \
- ../../src/resources/Mesh.h ../../src/renderer/vbo.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/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/resources/LightProps.h
+	@echo Compiling ../../src/scene//Light.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Light.cpp -o Light.o
 
 Camera.o: ../../src/scene//Camera.cpp ../../src/scene//Camera.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
@@ -820,9 +815,11 @@ Camera.o: ../../src/scene//Camera.cpp ../../src/scene//Camera.h \
 	@echo Compiling ../../src/scene//Camera.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/scene//Camera.cpp -o Camera.o
 
-Node.o: ../../src/scene//Node.cpp ../../src/scene//Node.h \
+Scene.o: ../../src/scene//Scene.cpp ../../src/scene//Scene.h \
  ../../src/utility/Common.h ../../src/uncategorized/memory.h \
- ../../src/math/Math.h ../../src/math/Vec2.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 \
@@ -832,13 +829,13 @@ 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/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/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
 
 Ui.o: ../../src/ui//Ui.cpp ../../src/ui//Ui.h ../../src/utility/Common.h \
  ../../src/uncategorized/memory.h ../../src/renderer/renderer.h \
@@ -860,65 +857,27 @@ 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
 
-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 \
+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 \
  ../../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
-
-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
-
-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
+ ../../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
 
 ShaderProg.o: ../../src/resources//ShaderProg.cpp \
  ../../src/resources//ShaderProg.h ../../src/utility/Common.h \
@@ -941,9 +900,11 @@ ShaderProg.o: ../../src/resources//ShaderProg.cpp \
 	@echo Compiling ../../src/resources//ShaderProg.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//ShaderProg.cpp -o ShaderProg.o
 
-Material.o: ../../src/resources//Material.cpp \
- ../../src/resources//Material.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/math/Math.h \
+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 \
@@ -953,23 +914,30 @@ Material.o: ../../src/resources//Material.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//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/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//Material.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Material.cpp -o Material.o
+	@echo Compiling ../../src/resources//Texture.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Texture.cpp -o Texture.o
 
-ShaderParser.o: ../../src/resources//ShaderParser.cpp \
- ../../src/resources//ShaderParser.h ../../src/utility/Common.h \
- ../../src/uncategorized/memory.h ../../src/tokenizer/Scanner.h \
- ../../src/tokenizer/parser.h ../../src/tokenizer/Scanner.h \
- ../../src/utility/Util.h ../../src/utility/Common.h
-	@echo Compiling ../../src/resources//ShaderParser.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//ShaderParser.cpp -o ShaderParser.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/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 \
@@ -978,6 +946,14 @@ Extension.o: ../../src/resources//Extension.cpp \
 	@echo Compiling ../../src/resources//Extension.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//Extension.cpp -o Extension.o
 
+ShaderParser.o: ../../src/resources//ShaderParser.cpp \
+ ../../src/resources//ShaderParser.h ../../src/utility/Common.h \
+ ../../src/uncategorized/memory.h ../../src/tokenizer/Scanner.h \
+ ../../src/tokenizer/parser.h ../../src/tokenizer/Scanner.h \
+ ../../src/utility/Util.h ../../src/utility/Common.h
+	@echo Compiling ../../src/resources//ShaderParser.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/resources//ShaderParser.cpp -o ShaderParser.o
+
 Skeleton.o: ../../src/resources//Skeleton.cpp \
  ../../src/resources//Skeleton.h ../../src/utility/Common.h \
  ../../src/uncategorized/memory.h ../../src/math/Math.h \
@@ -997,26 +973,6 @@ 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 \
@@ -1032,12 +988,53 @@ Resource.o: ../../src/resources//Resource.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//ShaderProg.h \
- ../../src/resources//Mesh.h ../../src/renderer/vbo.h \
+ ../../src/resources//Mesh.h ../../src/renderer/Vbo.h \
  ../../src/uncategorized/collision.h ../../src/resources//SkelAnim.h \
  ../../src/resources//LightProps.h
 	@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 \
@@ -1075,6 +1072,25 @@ 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 \
@@ -1098,25 +1114,6 @@ SkelAnimCtrl.o: ../../src/controllers//SkelAnimCtrl.cpp \
 	@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

+ 3 - 3
src/controllers/MeshSkelNodeCtrl.h

@@ -20,10 +20,10 @@ class MeshSkelNodeCtrl: public Controller
 		SkelNode* skelNode;
 		MeshNode* meshNode;
 
-		MeshSkelNodeCtrl( SkelNode* skel_node_, MeshNode* mesh_node_ ):
+		MeshSkelNodeCtrl( SkelNode* skelNode_, MeshNode* meshNode_ ):
 			Controller( CT_SKEL ),
-			skelNode( skel_node_ ),
-			meshNode( mesh_node_ ) 
+			skelNode( skelNode_ ),
+			meshNode( meshNode_ )
 		{}
 		/**
 		 * Do nothing! We use HW skinning so its not necessary to update anything in the meshNode. 

+ 32 - 32
src/controllers/SkelAnimCtrl.cpp

@@ -8,9 +8,9 @@
 //=====================================================================================================================================
 // SkelAnimCtrl                                                                                                             =
 //=====================================================================================================================================
-SkelAnimCtrl::SkelAnimCtrl( SkelNode* skel_node_ ):
+SkelAnimCtrl::SkelAnimCtrl( SkelNode* skelNode_ ):
 	Controller(CT_SKEL_ANIM),
-	skelNode( skel_node_ )
+	skelNode( skelNode_ )
 {
 	heads.resize( skelNode->skeleton->bones.size() );
 	tails.resize( skelNode->skeleton->bones.size() );
@@ -24,26 +24,26 @@ SkelAnimCtrl::SkelAnimCtrl( SkelNode* skel_node_ ):
 //=====================================================================================================================================
 void SkelAnimCtrl::interpolate( SkelAnim* animation, float frame )
 {
-	DEBUG_ERR( frame >= animation->frames_num );
+	DEBUG_ERR( frame >= animation->framesNum );
 
-	// calculate the t (used in slerp and lerp) and
-	// calc the l_pose and r_pose witch indicate the pose ids in witch the frame lies between
+	// calculate the t (used in slerp and lerp) using the keyframs and the frame and
+	// calc the lPose and rPose witch indicate the pose ids in witch the frame lies between
 	const Vec<uint>& keyframes = animation->keyframes;
 	float t = 0.0;
-	uint l_pose = 0, r_pose = 0;
+	uint lPose = 0, rPose = 0;
 	for( uint j=0; j<keyframes.size(); j++ )
 	{
 		if( (float)keyframes[j] == frame )
 		{
-			l_pose = r_pose = j;
+			lPose = rPose = j;
 			t = 0.0;
 			break;
 		}
 		else if( (float)keyframes[j] > frame )
 		{
-			l_pose = j-1;
-			r_pose = j;
-			t = ( frame - (float)keyframes[l_pose] ) / float( keyframes[r_pose] - keyframes[l_pose] );
+			lPose = j-1;
+			rPose = j;
+			t = ( frame - (float)keyframes[lPose] ) / float( keyframes[rPose] - keyframes[lPose] );
 			break;
 		}
 	}
@@ -55,30 +55,30 @@ void SkelAnimCtrl::interpolate( SkelAnim* animation, float frame )
 	{
 		const SkelAnim::BoneAnim& banim = animation->bones[i];
 
-		Mat3& local_rot = boneRotations[i];
-		Vec3& local_transl = boneTranslations[i];
+		Mat3& localRot = boneRotations[i];
+		Vec3& localTransl = boneTranslations[i];
 
 		// if the bone has animations then slerp and lerp to find the rotation and translation
 		if( banim.keyframes.size() != 0 )
 		{
-			const SkelAnim::BonePose& l_bpose = banim.keyframes[l_pose];
-			const SkelAnim::BonePose& r_bpose = banim.keyframes[r_pose];
+			const SkelAnim::BonePose& lBpose = banim.keyframes[lPose];
+			const SkelAnim::BonePose& rBpose = banim.keyframes[rPose];
 
 			// rotation
-			const Quat& q0 = l_bpose.rotation;
-			const Quat& q1 = r_bpose.rotation;
-			local_rot = Mat3( q0.slerp(q1, t) );
+			const Quat& q0 = lBpose.rotation;
+			const Quat& q1 = rBpose.rotation;
+			localRot = Mat3( q0.slerp(q1, t) );
 
 			// translation
-			const Vec3& v0 = l_bpose.translation;
-			const Vec3& v1 = r_bpose.translation;
-			local_transl = v0.lerp( v1, t );
+			const Vec3& v0 = lBpose.translation;
+			const Vec3& v1 = rBpose.translation;
+			localTransl = v0.lerp( v1, t );
 		}
 		// else put the idents
 		else
 		{
-			local_rot = Mat3::getIdentity();
-			local_transl = Vec3( 0.0, 0.0, 0.0 );
+			localRot = Mat3::getIdentity();
+			localTransl = Vec3( 0.0, 0.0, 0.0 );
 		}
 	}
 }
@@ -100,26 +100,26 @@ void SkelAnimCtrl::updateBoneTransforms()
 	// loop
 	while( head != tail ) // while queue not empty
 	{
-		uint bone_id = queue[head++]; // queue pop
-		const Skeleton::Bone& boned = skelNode->skeleton->bones[bone_id];
+		uint boneId = queue[head++]; // queue pop
+		const Skeleton::Bone& boned = skelNode->skeleton->bones[boneId];
 
 		// bone.final_transform = MA * ANIM * MAi
 		// where MA is bone matrix at armature space and ANIM the interpolated transformation.
-		combineTransformations( boneTranslations[bone_id], boneRotations[bone_id],
+		combineTransformations( boneTranslations[boneId], boneRotations[boneId],
 		                        boned.tslSkelSpaceInv, boned.rotSkelSpaceInv,
-		                        boneTranslations[bone_id], boneRotations[bone_id] );
+		                        boneTranslations[boneId], boneRotations[boneId] );
 
 		combineTransformations( boned.tslSkelSpace, boned.rotSkelSpace,
-		                        boneTranslations[bone_id], boneRotations[bone_id],
-		                        boneTranslations[bone_id], boneRotations[bone_id] );
+		                        boneTranslations[boneId], boneRotations[boneId],
+		                        boneTranslations[boneId], boneRotations[boneId] );
 
 		// and finaly add the parent's transform
 		if( boned.parent )
 		{
 			// bone.final_final_transform = parent.transf * bone.final_transform
 			combineTransformations( boneTranslations[boned.parent->id], boneRotations[boned.parent->id],
-		                          boneTranslations[bone_id], boneRotations[bone_id],
-		                          boneTranslations[bone_id], boneRotations[bone_id] );
+		                          boneTranslations[boneId], boneRotations[boneId],
+		                          boneTranslations[boneId], boneRotations[boneId] );
 		}
 
 		// now add the bone's childes
@@ -153,14 +153,14 @@ void SkelAnimCtrl::deform()
 void SkelAnimCtrl::update( float )
 {
 	frame += step;
-	if( frame > skelAnim->frames_num ) // if the crnt is finished then play the next or loop the crnt
+	if( frame > skelAnim->framesNum ) // if the crnt is finished then play the next or loop the crnt
 	{
 		frame = 0.0;
 	}
 
 	interpolate( skelAnim, frame );
 	updateBoneTransforms();
-	if( r::dbg::show_skeletons )
+	if( r::dbg::showSkeletons )
 	{
 		deform();
 	}

+ 5 - 4
src/controllers/SkelAnimCtrl.h

@@ -14,13 +14,14 @@ class SkelNode;
 class SkelAnimCtrl: public Controller
 {
 	private:
+		// The 3 steps of skeletal animation
 		void interpolate( SkelAnim* animation, float frame );
 		void updateBoneTransforms();
-		void deform();
+		void deform();  ///< Now with HW skinning it deforms only the debug skeleton
 
 	public:
-		SkelAnim*  skelAnim; ///< Skeleton animation resource
-		SkelNode*  skelNode;
+		SkelAnim* skelAnim; ///< Skeleton animation resource
+		SkelNode* skelNode;
 		Vec<Vec3> heads;
 		Vec<Vec3> tails;
 		Vec<Mat3> boneRotations;
@@ -28,7 +29,7 @@ class SkelAnimCtrl: public Controller
 		float step;
 		float frame;
 
-		SkelAnimCtrl( SkelNode* skel_node_ );
+		SkelAnimCtrl( SkelNode* skelNode_ );
 		void update( float time );
 };
 

+ 16 - 16
src/main.cpp

@@ -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_;
 
@@ -170,7 +170,7 @@ void initPhysics()
 //=====================================================================================================================================
 // init                                                                                                                               =
 //=====================================================================================================================================
-void Init()
+void init()
 {
 	PRINT( "Engine initializing..." );
 
@@ -182,11 +182,11 @@ void Init()
 	App::initWindow();
 	uint ticks = App::getTicks();
 
-	r::Init();
+	r::init();
 	Ui::init();
 
 	// camera
-	mainCam = new Camera( r::aspect_ratio*toRad(60.0), toRad(60.0), 0.5, 100.0 );
+	mainCam = new Camera( r::aspectRatio*toRad(60.0), toRad(60.0), 0.5, 100.0 );
 	mainCam->moveLocalY( 3.0 );
 	mainCam->moveLocalZ( 5.7 );
 	mainCam->moveLocalX( -0.3 );
@@ -253,7 +253,7 @@ int main( int /*argc*/, char* /*argv*/[] )
 
 	App::printAppInfo();
 
-	Init();
+	init();
 
 	PRINT( "Entering main loop" );
 	int ticks = App::getTicks();
@@ -261,7 +261,7 @@ int main( int /*argc*/, char* /*argv*/[] )
 	{
 		int ticks_ = App::getTicks();
 		I::handleEvents();
-		r::PrepareNextFrame();
+		r::prepareNextFrame();
 
 		float dist = 0.2;
 		float ang = toRad(3.0);
@@ -311,7 +311,7 @@ int main( int /*argc*/, char* /*argv*/[] )
 
 		dynamicsWorld->stepSimulation( 1 );
 
-		r::Render( *mainCam );
+		r::render( *mainCam );
 
 		//map.octree.root->bounding_box.render();
 
@@ -319,32 +319,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::frames_num, 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::frames_num < 1000 )
-			sprintf( str, "capt/%06d.jpg", r::frames_num );
+		if( r::framesNum < 1000 )
+			sprintf( str, "capt/%06d.jpg", r::framesNum );
 		else
-			sprintf( str, "capt2/%06d.jpg", r::frames_num );
-		r::TakeScreenshot(str);*/
+			sprintf( str, "capt2/%06d.jpg", r::framesNum );
+		r::takeScreenshot(str);*/
 
 		// std stuff follow
 		SDL_GL_SwapBuffers();
 		r::printLastError();
 		if( 1 )
 		{
-			//if( r::frames_num == 10 ) r::TakeScreenshot("gfx/screenshot.tga");
+			//if( r::framesNum == 10 ) r::takeScreenshot("gfx/screenshot.tga");
 			App::waitForNextFrame();
 		}
 		else
-			if( r::frames_num == 5000 ) break;
+			if( r::framesNum == 5000 ) break;
 	}while( true );
 	PRINT( "Exiting main loop (" << App::getTicks()-ticks << ")" );
 

+ 29 - 29
src/math/Mat3.inl.h

@@ -470,32 +470,32 @@ inline void Mat3::rotateXAxis( float rad )
 	float sina, cosa;
 	sinCos( rad, sina, cosa );
 
-	/*Vec3 x_axis, y_axis, z_axis;
-	getColumns( x_axis, y_axis, z_axis );*/
+	/*Vec3 xAxis, yAxis, zAxis;
+	getColumns( xAxis, yAxis, zAxis );*/
 
-	// z_axis = z_axis*cosa - y_axis*sina;
+	// zAxis = zAxis*cosa - yAxis*sina;
 	ME(0,2) = ME(0,2)*cosa - ME(0,1)*sina;
 	ME(1,2) = ME(1,2)*cosa - ME(1,1)*sina;
 	ME(2,2) = ME(2,2)*cosa - ME(2,1)*sina;
 
-	// z_axis.normalize();
+	// zAxis.normalize();
 	float len = invSqrt( ME(0,2)*ME(0,2) + ME(1,2)*ME(1,2) + ME(2,2)*ME(2,2) );
 	ME(0,2) *= len;
 	ME(1,2) *= len;
 	ME(2,2) *= len;
 
-	// y_axis = z_axis * x_axis;
+	// yAxis = zAxis * xAxis;
 	ME(0,1) = ME(1,2)*ME(2,0) - ME(2,2)*ME(1,0);
 	ME(1,1) = ME(2,2)*ME(0,0) - ME(0,2)*ME(2,0);
 	ME(2,1) = ME(0,2)*ME(1,0) - ME(1,2)*ME(0,0);
 
-	// y_axis.normalize();
+	// yAxis.normalize();
 	/*len = invSqrt( ME(0,1)*ME(0,1) + ME(1,1)*ME(1,1) + ME(2,1)*ME(2,1) );
 	ME(0,1) *= len;
 	ME(1,1) *= len;
 	ME(2,1) *= len;*/
 
-	// setColumns( x_axis, y_axis, z_axis );
+	// setColumns( xAxis, yAxis, zAxis );
 
 }
 
@@ -505,32 +505,32 @@ inline void Mat3::rotateYAxis( float rad )
 	float sina, cosa;
 	sinCos( rad, sina, cosa );
 
-	/*Vec3 x_axis, y_axis, z_axis;
-	getColumns( x_axis, y_axis, z_axis );*/
+	/*Vec3 xAxis, yAxis, zAxis;
+	getColumns( xAxis, yAxis, zAxis );*/
 
-	// z_axis = z_axis*cosa + x_axis*sina;
+	// zAxis = zAxis*cosa + xAxis*sina;
 	ME(0,2) = ME(0,2)*cosa + ME(0,0)*sina;
 	ME(1,2) = ME(1,2)*cosa + ME(1,0)*sina;
 	ME(2,2) = ME(2,2)*cosa + ME(2,0)*sina;
 
-	// z_axis.normalize();
+	// zAxis.normalize();
 	float len = invSqrt( ME(0,2)*ME(0,2) + ME(1,2)*ME(1,2) + ME(2,2)*ME(2,2) );
 	ME(0,2) *= len;
 	ME(1,2) *= len;
 	ME(2,2) *= len;
 
-	// x_axis = (z_axis*y_axis) * -1.0f;
+	// xAxis = (zAxis*yAxis) * -1.0f;
 	ME(0,0) = ME(2,2)*ME(1,1) - ME(1,2)*ME(2,1);
 	ME(1,0) = ME(0,2)*ME(2,1) - ME(2,2)*ME(0,1);
 	ME(2,0) = ME(1,2)*ME(0,1) - ME(0,2)*ME(1,1);
 
-	// x_axis.normalize();
+	// xAxis.normalize();
 	/*len = invSqrt( ME(0,0)*ME(0,0) + ME(1,0)*ME(1,0) + ME(2,0)*ME(2,0) );
 	ME(0,0) *= len;
 	ME(1,0) *= len;
 	ME(2,0) *= len;*/
 
-	// setColumns( x_axis, y_axis, z_axis );
+	// setColumns( xAxis, yAxis, zAxis );
 }
 
 
@@ -540,32 +540,32 @@ inline void Mat3::rotateZAxis( float rad )
 	float sina, cosa;
 	sinCos( rad, sina, cosa );
 
-	/*Vec3 x_axis, y_axis, z_axis;
-	getColumns( x_axis, y_axis, z_axis );*/
+	/*Vec3 xAxis, yAxis, zAxis;
+	getColumns( xAxis, yAxis, zAxis );*/
 
-	// x_axis = x_axis*cosa + y_axis*sina;
+	// xAxis = xAxis*cosa + yAxis*sina;
 	ME(0,0) = ME(0,0)*cosa + ME(0,1)*sina;
 	ME(1,0) = ME(1,0)*cosa + ME(1,1)*sina;
 	ME(2,0) = ME(2,0)*cosa + ME(2,1)*sina;
 
-	// x_axis.normalize();
+	// xAxis.normalize();
 	float len = invSqrt( ME(0,0)*ME(0,0) + ME(1,0)*ME(1,0) + ME(2,0)*ME(2,0) );
 	ME(0,0) *= len;
 	ME(1,0) *= len;
 	ME(2,0) *= len;
 
-	// y_axis = z_axis*x_axis;
+	// yAxis = zAxis*xAxis;
 	ME(0,1) = ME(1,2)*ME(2,0) - ME(2,2)*ME(1,0);
 	ME(1,1) = ME(2,2)*ME(0,0) - ME(0,2)*ME(2,0);
 	ME(2,1) = ME(0,2)*ME(1,0) - ME(1,2)*ME(0,0);
 
-	// y_axis.normalize();
+	// yAxis.normalize();
 	/*len = invSqrt( ME(0,1)*ME(0,1) + ME(1,1)*ME(1,1) + ME(2,1)*ME(2,1) );
 	ME(0,1) *= len;
 	ME(1,1) *= len;
 	ME(2,1) *= len;*/
 
-	//setColumns( x_axis, y_axis, z_axis );
+	//setColumns( xAxis, yAxis, zAxis );
 }
 
 // transpose
@@ -610,18 +610,18 @@ inline void Mat3::reorthogonalize()
 
 	ME = correction_m3 * ME;*/
 
-	// method 2: Gram-Schmidt method with a twist for z_axis
-	Vec3 x_axis, y_axis, z_axis;
-	getColumns( x_axis, y_axis, z_axis );
+	// method 2: Gram-Schmidt method with a twist for zAxis
+	Vec3 xAxis, yAxis, zAxis;
+	getColumns( xAxis, yAxis, zAxis );
 
-	x_axis.normalize();
+	xAxis.normalize();
 
-	y_axis = y_axis - ( x_axis * x_axis.dot(y_axis) );
-	y_axis.normalize();
+	yAxis = yAxis - ( xAxis * xAxis.dot(yAxis) );
+	yAxis.normalize();
 
-	z_axis = x_axis.cross(y_axis);
+	zAxis = xAxis.cross(yAxis);
 
-	setColumns( x_axis, y_axis, z_axis );
+	setColumns( xAxis, yAxis, zAxis );
 }
 
 // print

+ 4 - 4
src/math/Mat4.inl.h

@@ -640,10 +640,10 @@ inline Mat4 Mat4::getInverse() const
 // getInverseTransformation
 inline Mat4 Mat4::getInverseTransformation() const
 {
-	Mat3 inverted_rot = (getRotationPart()).getTransposed();
-	Vec3 inverted_tsl = getTranslationPart();
-	inverted_tsl = -( inverted_rot * inverted_tsl );
-	return Mat4( inverted_tsl, inverted_rot );
+	Mat3 invertedRot = (getRotationPart()).getTransposed();
+	Vec3 invertedTsl = getTranslationPart();
+	invertedTsl = -( invertedRot * invertedTsl );
+	return Mat4( invertedTsl, invertedRot );
 }
 
 // lerp

+ 14 - 14
src/math/MathFuncs.inl.h

@@ -71,34 +71,34 @@ inline void sinCos( float a, float& sina, float& cosa )
 		a = -a;
 		negative = true;
 	}
-	const float k_two_over_pi = 1.0 / (PI/2.0);
-	float float_a = k_two_over_pi * a;
-	int int_a = (int)float_a;
+	const float kTwoOverPi = 1.0 / (PI/2.0);
+	float floatA = kTwoOverPi * a;
+	int int_a = (int)floatA;
 
 	const float k_rational_half_pi = 201 / 128.0;
-	const float k_remainder_half_pi = 4.8382679e-4;
+	const float kRemainderHalfPi = 4.8382679e-4;
 
-	float_a = (a - k_rational_half_pi * int_a) - k_remainder_half_pi * int_a;
+	floatA = (a - k_rational_half_pi * int_a) - kRemainderHalfPi * int_a;
 
-	float float_a_minus_half_pi = (float_a - k_rational_half_pi) - k_remainder_half_pi;
+	float floatAMinusHalfPi = (floatA - k_rational_half_pi) - kRemainderHalfPi;
 
 	switch( int_a & 3 )
 	{
 	case 0: // 0 - Pi/2
-		sina = PolynomialSinQuadrant(float_a);
-		cosa = PolynomialSinQuadrant(-float_a_minus_half_pi);
+		sina = PolynomialSinQuadrant(floatA);
+		cosa = PolynomialSinQuadrant(-floatAMinusHalfPi);
 		break;
 	case 1: // Pi/2 - Pi
-		sina = PolynomialSinQuadrant(-float_a_minus_half_pi);
-		cosa = PolynomialSinQuadrant(-float_a);
+		sina = PolynomialSinQuadrant(-floatAMinusHalfPi);
+		cosa = PolynomialSinQuadrant(-floatA);
 		break;
 	case 2: // Pi - 3Pi/2
-		sina = PolynomialSinQuadrant(-float_a);
-		cosa = PolynomialSinQuadrant(float_a_minus_half_pi);
+		sina = PolynomialSinQuadrant(-floatA);
+		cosa = PolynomialSinQuadrant(floatAMinusHalfPi);
 		break;
 	case 3: // 3Pi/2 - 2Pi
-		sina = PolynomialSinQuadrant(float_a_minus_half_pi);
-		cosa = PolynomialSinQuadrant(float_a);
+		sina = PolynomialSinQuadrant(floatAMinusHalfPi);
+		cosa = PolynomialSinQuadrant(floatA);
 		break;
 	};
 

+ 10 - 10
src/math/Quat.inl.h

@@ -245,28 +245,28 @@ inline Quat Quat::slerp( const Quat& q1_, float t ) const
 {
 	const Quat& q0 = ME;
 	Quat q1( q1_ );
-	float cos_half_theta = q0.w*q1.w + q0.x*q1.x + q0.y*q1.y + q0.z*q1.z;
-	if( cos_half_theta < 0.0 )
+	float cosHalfTheta = q0.w*q1.w + q0.x*q1.x + q0.y*q1.y + q0.z*q1.z;
+	if( cosHalfTheta < 0.0 )
 	{
 		q1 = Quat( -Vec4(q1) ); // quat changes
-		cos_half_theta = -cos_half_theta;
+		cosHalfTheta = -cosHalfTheta;
 	}
-	if( fabs(cos_half_theta) >= 1.0f )
+	if( fabs(cosHalfTheta) >= 1.0f )
 	{
 		return Quat( q0 );
 	}
 
-	float half_theta = acos( cos_half_theta );
-	float sinhalf_theta = M::sqrt(1.0 - cos_half_theta*cos_half_theta);
+	float halfTheta = acos( cosHalfTheta );
+	float sinHalfTheta = M::sqrt(1.0 - cosHalfTheta*cosHalfTheta);
 
-	if( fabs(sinhalf_theta) < 0.001 )
+	if( fabs(sinHalfTheta) < 0.001 )
 	{
 		return Quat( (Vec4(q0) + Vec4(q1))*0.5 );
 	}
-	float ratio_a = sin((1.0 - t) * half_theta) / sinhalf_theta;
-	float ratio_b = sin(t * half_theta) / sinhalf_theta;
+	float ratioA = sin((1.0 - t) * halfTheta) / sinHalfTheta;
+	float ratio_b = sin(t * halfTheta) / sinHalfTheta;
 	Vec4 tmp, tmp1, sum;
-	tmp = Vec4(q0)*ratio_a;
+	tmp = Vec4(q0)*ratioA;
 	tmp1 = Vec4(q1)*ratio_b;
 	sum = tmp + tmp1;
 	sum.normalize();

+ 1 - 1
src/math/Vec3.h

@@ -56,7 +56,7 @@ class Vec3
 		float getDistanceSquared( const Vec3& b ) const;
 		void  normalize();
 		Vec3  getNormalized() const;
-		Vec3  getProjection( const Vec3& to_this ) const;
+		Vec3  getProjection( const Vec3& toThis ) const;
 		Vec3  getRotated( const Quat& q ) const; // returns q * this * q.Conjucated() aka returns a rotated this. 18 muls, 12 adds
 		void  rotate( const Quat& q );
 		Vec3  lerp( const Vec3& v1, float t ) const; // return lerp( this, v1, t )

+ 4 - 4
src/math/Vec3.inl.h

@@ -250,9 +250,9 @@ inline Vec3 Vec3::getNormalized() const
 }
 
 // getProjection
-inline Vec3 Vec3::getProjection( const Vec3& to_this ) const
+inline Vec3 Vec3::getProjection( const Vec3& toThis ) const
 {
-	return to_this * ( ME.dot(to_this)/(to_this.dot(to_this)) );
+	return toThis * ( ME.dot(toThis)/(toThis.dot(toThis)) );
 }
 
 // Rotated
@@ -267,8 +267,8 @@ inline Vec3 Vec3::getRotated( const Quat& q ) const
 	return Vec3( pmult*x + vmult*q.x + crossmult*(q.y*z - q.z*y),
 							   pmult*y + vmult*q.y + crossmult*(q.z*x - q.x*z),
 	               pmult*z + vmult*q.z + crossmult*(q.x*y - q.y*x) );*/
-	Vec3 q_xyz( q );
-	return ME + q_xyz.cross( q_xyz.cross(ME) + ME*q.w ) * 2.0;
+	Vec3 qXyz( q );
+	return ME + qXyz.cross( qXyz.cross(ME) + ME*q.w ) * 2.0;
 }
 
 // rotate

+ 15 - 15
src/renderer/fbo.h → src/renderer/Fbo.h

@@ -6,22 +6,22 @@
 
 
 /// The class is created as a wrapper to avoid common mistakes
-class fbo_t
+class Fbo
 {
 	PROPERTY_R( uint, glId, getGlId ) ///< OpenGL idendification
 
 	public:
-		fbo_t(): glId(0) {}
+		Fbo(): glId(0) {}
 
 		/// Creates a new FBO
 		void Create()
 		{
-			DEBUG_ERR( glId != 0 ); // FBO allready initialized
+			DEBUG_ERR( glId != 0 ); // FBO already initialized
 			glGenFramebuffers( 1, &glId );
 		}
 
 		/// Binds FBO
-		void Bind() const
+		void bind() const
 		{
 			DEBUG_ERR( glId == 0 );  // FBO unitialized
 			glBindFramebuffer( GL_FRAMEBUFFER, glId );
@@ -34,19 +34,19 @@ class fbo_t
 		 * Checks the status of an initialized FBO
 		 * @return True if FBO is ok and false if not
 		 */
-		bool IsGood() const
+		bool isGood() const
 		{
 			DEBUG_ERR( glId == 0 );  // FBO unitialized
-			DEBUG_ERR( GetCurrentFBO() != glId ); // another FBO is binded
+			DEBUG_ERR( getCurrentFbo() != glId ); // another FBO is binded
 
 			return glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE;
 		}
 
 		/// Set the number of color attachements of the FBO
-		void SetNumOfColorAttachements( uint num ) const
+		void setNumOfColorAttachements( uint num ) const
 		{
 			DEBUG_ERR( glId == 0 );  // FBO unitialized
-			DEBUG_ERR( GetCurrentFBO() != glId ); // another FBO is binded
+			DEBUG_ERR( getCurrentFbo() != glId ); // another FBO is binded
 
 			if( num == 0 )
 			{
@@ -55,9 +55,9 @@ class fbo_t
 			}
 			else
 			{
-				static GLenum color_attachments[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2, GL_COLOR_ATTACHMENT3,
-				                                      GL_COLOR_ATTACHMENT4, GL_COLOR_ATTACHMENT5, GL_COLOR_ATTACHMENT6, GL_COLOR_ATTACHMENT7 };
-				glDrawBuffers( num, color_attachments );
+				static GLenum colorAttachments[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2, GL_COLOR_ATTACHMENT3,
+				                                     GL_COLOR_ATTACHMENT4, GL_COLOR_ATTACHMENT5, GL_COLOR_ATTACHMENT6, GL_COLOR_ATTACHMENT7 };
+				glDrawBuffers( num, colorAttachments );
 			}
 		}
 
@@ -65,11 +65,11 @@ class fbo_t
 		 * Returns the GL id of the current attached FBO
 		 * @return Returns the GL id of the current attached FBO
 		 */
-		static uint GetCurrentFBO()
+		static uint getCurrentFbo()
 		{
-			int fbo_glId;
-			glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fbo_glId );
-			return (uint)fbo_glId;
+			int fboGlId;
+			glGetIntegerv( GL_FRAMEBUFFER_BINDING, &fboGlId );
+			return (uint)fboGlId;
 		}
 };
 

+ 20 - 20
src/renderer/vbo.h → src/renderer/Vbo.h

@@ -6,7 +6,7 @@
 #include "Common.h"
 
 /// This is a wrapper for Vertex Buffer Objects to prevent us from making idiotic errors
-class vbo_t
+class Vbo
 {
 	protected:
 		uint glId; ///< The OpenGL id of the VBO
@@ -15,11 +15,11 @@ class vbo_t
 		GLenum usage;
 
 	public:
-		vbo_t(): glId(0) {}
-		virtual ~vbo_t() { Delete(); }
+		Vbo(): glId(0) {}
+		virtual ~Vbo() { deleteBuff(); }
 		uint   getGlId() const { DEBUG_ERR(glId==0); return glId; }
-		GLenum GetBufferTarget() const { DEBUG_ERR(glId==0); return target; }
-		GLenum GetBufferUsage() const { DEBUG_ERR(glId==0); return usage; }
+		GLenum getBufferTarget() const { DEBUG_ERR(glId==0); return target; }
+		GLenum getBufferUsage() const { DEBUG_ERR(glId==0); return usage; }
 
 		/**
 		 * Creates a new VBO with the given params and checks if everything went OK
@@ -28,37 +28,37 @@ class vbo_t
 		 * @param data_ptr Points to the data buffer to copy to the VGA memory. Put NULL if you want just to allocate memory
 		 * @param usage_ It should be: GL_STREAM_DRAW or GL_STATIC_DRAW or GL_DYNAMIC_DRAW only!!!!!!!!!
 		 */
-		void Create( GLenum target_, uint size_in_bytes, const void* data_ptr, GLenum usage_ )
+		void Create( GLenum target_, uint sizeInBytes, const void* dataPtr, GLenum usage_ )
 		{
-			DEBUG_ERR( glId!=0 ); // VBO allready initialized
+			DEBUG_ERR( glId!=0 ); // VBO already initialized
 			DEBUG_ERR( target_!=GL_ARRAY_BUFFER && target_!=GL_ELEMENT_ARRAY_BUFFER ); // unacceptable target_
 			DEBUG_ERR( usage_!=GL_STREAM_DRAW && usage_!=GL_STATIC_DRAW && usage_!=GL_DYNAMIC_DRAW ); // unacceptable usage_
-			DEBUG_ERR( size_in_bytes < 1 ); // unacceptable size
+			DEBUG_ERR( sizeInBytes < 1 ); // unacceptable size
 
 			usage = usage_;
 			target = target_;
 
 			glGenBuffers( 1, &glId );
-			Bind();
-			glBufferData( target, size_in_bytes, data_ptr, usage ); // allocate memory and copy data from data_ptr to the VBO. If data_ptr is NULL just allocate
+			bind();
+			glBufferData( target, sizeInBytes, dataPtr, usage ); // allocate memory and copy data from data_ptr to the VBO. If data_ptr is NULL just allocate
 
 			// make a check
-			int buffer_size = 0;
-			glGetBufferParameteriv( target, GL_BUFFER_SIZE, &buffer_size );
-			if( size_in_bytes != (uint)buffer_size )
+			int bufferSize = 0;
+			glGetBufferParameteriv( target, GL_BUFFER_SIZE, &bufferSize );
+			if( sizeInBytes != (uint)bufferSize )
 			{
-				Delete();
+				deleteBuff();
 				ERROR( "Data size mismatch" );
 				return;
 			}
 
-			Unbind();
+			unbind();
 		}
 
 		/**
 		 * Deletes the VBO
 		 */
-		void Delete()
+		void deleteBuff()
 		{
 			DEBUG_ERR( glId==0 ); // VBO unitialized
 			glDeleteBuffers( 1, &glId );
@@ -66,9 +66,9 @@ class vbo_t
 		}
 
 		/**
-		 * bind the VBO
+		 * Bind the VBO
 		 */
-		void Bind() const
+		void bind() const
 		{
 			DEBUG_ERR( glId==0 ); // VBO unitialized
 			glBindBuffer( target, glId );
@@ -77,7 +77,7 @@ class vbo_t
 		/**
 		 * Unbinds only the targets that have the same target as this
 		 */
-		void Unbind() const
+		void unbind() const
 		{
 			DEBUG_ERR( glId==0 ); // VBO unitialized
 			glBindBuffer( target, 0 );
@@ -86,7 +86,7 @@ class vbo_t
 		/**
 		 * Unbinds all VBOs, meaning both GL_ARRAY_BUFFER and GL_ELEMENT_ARRAY_BUFFER targets
 		 */
-		static void UnbindAllTargets()
+		static void unbindAllTargets()
 		{
 			glBindBufferARB( GL_ARRAY_BUFFER, 0 );
 			glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER, 0 );

+ 13 - 14
src/renderer/r_bs.cpp

@@ -7,9 +7,8 @@
 #include "Camera.h"
 #include "Scene.h"
 #include "Mesh.h"
-#include "r_private.h"
 #include "Resource.h"
-#include "fbo.h"
+#include "Fbo.h"
 #include "MeshNode.h"
 #include "Material.h"
 
@@ -20,27 +19,27 @@ namespace bs {
 //=====================================================================================================================================
 // VARS                                                                                                                               =
 //=====================================================================================================================================
-static fbo_t fbo; ///< blending models FBO
+static Fbo fbo; ///< blending models FBO
 
 
 //=====================================================================================================================================
 // init                                                                                                                               =
 //=====================================================================================================================================
-void Init()
+void init()
 {
 	// create FBO
 	fbo.Create();
-	fbo.Bind();
+	fbo.bind();
 
 	// inform FBO about the color buffers
-	fbo.SetNumOfColorAttachements(1);
+	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::depth_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() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading blending stage FBO" );
 
 	// unbind
@@ -49,13 +48,13 @@ void Init()
 
 
 //=====================================================================================================================================
-// RunStage                                                                                                                           =
+// runStage                                                                                                                           =
 //=====================================================================================================================================
-void RunStage( const Camera& cam )
+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 );
@@ -68,7 +67,7 @@ void RunStage( const Camera& cam )
 		MeshNode* mesh_node = Scene::meshNodes[i];
 		if( mesh_node->material->blends && !mesh_node->material->blends )
 		{
-			fbo.Bind();
+			fbo.bind();
 			mesh_node->material->setup();
 			mesh_node->render();
 		}
@@ -78,7 +77,7 @@ void RunStage( const Camera& cam )
 
 	// restore a few things
 	glDepthMask( true );
-	fbo_t::Unbind();
+	Fbo::Unbind();
 }
 
 

+ 19 - 20
src/renderer/r_bs2.cpp

@@ -7,9 +7,8 @@
 #include "Camera.h"
 #include "Scene.h"
 #include "Mesh.h"
-#include "r_private.h"
 #include "Resource.h"
-#include "fbo.h"
+#include "Fbo.h"
 #include "MeshNode.h"
 #include "Material.h"
 
@@ -20,31 +19,31 @@ namespace bs {
 //=====================================================================================================================================
 // VARS                                                                                                                               =
 //=====================================================================================================================================
-static fbo_t intermid_fbo, fbo;
+static Fbo intermid_fbo, fbo;
 
 static Texture fai; ///< RGB for color and A for mask (0 doesnt pass, 1 pass)
 static ShaderProg* shader_prog;
 
 
 //=====================================================================================================================================
-// Init2                                                                                                                              =
+// init2                                                                                                                              =
 //=====================================================================================================================================
-void Init2()
+void init2()
 {
 	//** 1st FBO **
 	// create FBO
 	fbo.Create();
-	fbo.Bind();
+	fbo.bind();
 
 	// inform FBO about the color buffers
-	fbo.SetNumOfColorAttachements(1);
+	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::depth_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() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading blending stage FBO" );
 
 	// unbind
@@ -53,18 +52,18 @@ void Init2()
 
 	//** 2nd FBO **
 	intermid_fbo.Create();
-	intermid_fbo.Bind();
+	intermid_fbo.bind();
 
 	// texture
-	intermid_fbo.SetNumOfColorAttachements(1);
+	intermid_fbo.setNumOfColorAttachements(1);
 	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::depth_fai.getGlId(), 0 );
+	glFramebufferTexture2D( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,  GL_TEXTURE_2D, r::ms::depthFai.getGlId(), 0 );
 
 	// test if success
-	if( !intermid_fbo.IsGood() )
+	if( !intermid_fbo.isGood() )
 		FATAL( "Cannot create deferred shading blending stage FBO" );
 
 	// unbind
@@ -75,12 +74,12 @@ void Init2()
 
 
 //=====================================================================================================================================
-// RunStage2                                                                                                                          =
+// runStage2                                                                                                                          =
 //=====================================================================================================================================
-void RunStage2( const Camera& cam )
+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 );
@@ -93,13 +92,13 @@ void RunStage2( const Camera& cam )
 		if( mesh_node->material->refracts )
 		{
 			// write to the rFbo
-			intermid_fbo.Bind();
+			intermid_fbo.bind();
 			glEnable( GL_DEPTH_TEST );
 			glClear( GL_COLOR_BUFFER_BIT );
 			mesh_node->material->setup();
 			mesh_node->render();
 
-			fbo.Bind();
+			fbo.bind();
 			glDisable( GL_DEPTH_TEST );
 			shader_prog->bind();
 			shader_prog->locTexUnit( shader_prog->GetUniLoc(0), fai, 0 );
@@ -110,7 +109,7 @@ void RunStage2( const Camera& cam )
 
 	// restore a few things
 	glDepthMask( true );
-	fbo_t::Unbind();
+	Fbo::Unbind();
 }
 
 

+ 36 - 37
src/renderer/r_dbg.cpp

@@ -1,9 +1,8 @@
 #include "renderer.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 #include "Scene.h"
 #include "Texture.h"
-#include "fbo.h"
+#include "Fbo.h"
 #include "Node.h"
 #include "SkelNode.h"
 
@@ -108,16 +107,16 @@ static void RenderSun();
 //=====================================================================================================================================
 // DATA VARS                                                                                                                          =
 //=====================================================================================================================================
-bool show_axis = true;
-bool show_fnormals = false;
-bool show_vnormals = false;
-bool show_lights = true;
-bool show_skeletons = false;
-bool show_cameras = true;
-bool show_bvolumes = true;
+bool showAxis = true;
+bool showFnormals = false;
+bool showVnormals = false;
+bool showLights = true;
+bool showSkeletons = false;
+bool showCameras = true;
+bool showBvolumes = true;
 
 
-static fbo_t fbo;
+static Fbo fbo;
 
 static ShaderProg* shdr;
 
@@ -127,21 +126,21 @@ static ShaderProg* shdr;
 init                                                                                                                                  =
 =======================================================================================================================================
 */
-void Init()
+void init()
 {
 	// create FBO
 	fbo.Create();
-	fbo.Bind();
+	fbo.bind();
 
 	// inform in what buffers we draw
-	fbo.SetNumOfColorAttachements(1);
+	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::depth_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() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create debug FBO" );
 
 	// unbind
@@ -154,34 +153,34 @@ void Init()
 
 /*
 =======================================================================================================================================
-RunStage                                                                                                                              =
+runStage                                                                                                                              =
 =======================================================================================================================================
 */
-void RunStage( const Camera& cam )
+void runStage( const Camera& cam )
 {
-	fbo.Bind();
+	fbo.bind();
 
 	shdr->bind();
 
 	// OGL stuff
-	SetProjectionViewMatrices( cam );
-	SetViewport( 0, 0, r::w, r::h );
+	setProjectionViewMatrices( cam );
+	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
 		(
-			(Scene::nodes[i]->type == Node::NT_LIGHT && show_lights) ||
-			(Scene::nodes[i]->type == Node::NT_CAMERA && show_cameras)
+			(Scene::nodes[i]->type == Node::NT_LIGHT && showLights) ||
+			(Scene::nodes[i]->type == Node::NT_CAMERA && showCameras)
 		)
 		{
 			Scene::nodes[i]->render();
 		}
-		else if( Scene::nodes[i]->type == Node::NT_SKELETON && show_skeletons )
+		else if( Scene::nodes[i]->type == Node::NT_SKELETON && showSkeletons )
 		{
 			SkelNode* skel_node = static_cast<SkelNode*>( Scene::nodes[i] );
 			glDisable( GL_DEPTH_TEST );
@@ -203,10 +202,10 @@ void RunStage( const Camera& cam )
 
 /*
 =======================================================================================================================================
-RenderGrid                                                                                                                            =
+renderGrid                                                                                                                            =
 =======================================================================================================================================
 */
-void RenderGrid()
+void renderGrid()
 {
 	float col0[] = { 0.5f, 0.5f, 0.5f };
 	float col1[] = { 0.0f, 0.0f, 1.0f };
@@ -248,10 +247,10 @@ void RenderGrid()
 
 /*
 =======================================================================================================================================
-RenderQuad                                                                                                                            =
+renderQuad                                                                                                                            =
 =======================================================================================================================================
 */
-void RenderQuad( float w, float h )
+void renderQuad( float w, float h )
 {
 	float wdiv2 = w/2, hdiv2 = h/2;
 	float points [][2] = { {wdiv2,hdiv2}, {-wdiv2,hdiv2}, {-wdiv2,-hdiv2}, {wdiv2,-hdiv2} };
@@ -273,10 +272,10 @@ void RenderQuad( float w, float h )
 
 /*
 =======================================================================================================================================
-RenderSphere                                                                                                                          =
+renderSphere                                                                                                                          =
 =======================================================================================================================================
 */
-void RenderSphere( float r, int p )
+void renderSphere( float r, int p )
 {
 	const float twopi  = PI*2;
 	const float pidiv2 = PI/2;
@@ -343,10 +342,10 @@ void RenderSphere( float r, int p )
 
 /*
 =======================================================================================================================================
-RenderCube                                                                                                                            =
+renderCube                                                                                                                            =
 =======================================================================================================================================
 */
-void RenderCube( bool cols, float size )
+void renderCube( bool cols, float size )
 {
 	size *= 0.5f;
 	glBegin(GL_QUADS);
@@ -403,10 +402,10 @@ 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();
 
@@ -428,7 +427,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();
 

+ 37 - 38
src/renderer/r_is.cpp

@@ -9,8 +9,7 @@ The file contains functions and vars used for the deferred shading illumination
 #include "Light.h"
 #include "Resource.h"
 #include "Scene.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 #include "LightProps.h"
 
 namespace r {
@@ -22,7 +21,7 @@ namespace is {
 VARS                                                                                                                                  =
 =======================================================================================================================================
 */
-static fbo_t fbo;
+static Fbo fbo;
 
 Texture fai;  // illuminated Scene
 
@@ -50,7 +49,7 @@ static float smo_uvs_coords [] = { -0.000000, 0.000000, -1.000000, 0.500000, 0.5
 static uint smo_uvs_vbo_id = 0; // stencil masking opt uv sphere vertex buffer object id
 
 // init stencil masking optimization UV sphere
-static void InitSMOUVS()
+static void initSMOUVS()
 {
 	glGenBuffers( 1, &smo_uvs_vbo_id );
 	glBindBuffer( GL_ARRAY_BUFFER, smo_uvs_vbo_id );
@@ -61,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 );
@@ -119,14 +118,14 @@ static void CalcPlanes( const Camera& cam )
 
 /*
 =======================================================================================================================================
-InitStageFBO                                                                                                                          =
+initStageFBO                                                                                                                          =
 =======================================================================================================================================
 */
-static void InitStageFBO()
+static void initStageFBO()
 {
 	// create FBO
 	fbo.Create();
-	fbo.Bind();
+	fbo.bind();
 
 	// init the stencil render buffer
 	glGenRenderbuffers( 1, &stencil_rb );
@@ -135,7 +134,7 @@ static void InitStageFBO()
 	glFramebufferRenderbufferEXT( GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, stencil_rb );
 
 	// inform in what buffers we draw
-	fbo.SetNumOfColorAttachements(1);
+	fbo.setNumOfColorAttachements(1);
 
 	// create the txtrs
 	if( !fai.createEmpty2D( r::w, r::h, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE ) )
@@ -147,7 +146,7 @@ static void InitStageFBO()
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fai.getGlId(), 0 );
 
 	// test if success
-	if( !fbo.IsGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading illumination stage FBO" );
 
 	// unbind
@@ -160,7 +159,7 @@ static void InitStageFBO()
 init                                                                                                                                  =
 =======================================================================================================================================
 */
-void Init()
+void init()
 {
 	// load the shaders
 	shdr_is_ambient = rsrc::shaders.load( "shaders/is_ap.glsl" );
@@ -170,10 +169,10 @@ void Init()
 
 
 	// init the rest
-	InitStageFBO();
-	InitSMOUVS();
+	initStageFBO();
+	initSMOUVS();
 
-	r::is::shadows::Init();
+	r::is::shadows::init();
 }
 
 
@@ -191,7 +190,7 @@ static void AmbientPass( const Camera& /*cam*/, const Vec3& color )
 
 	// set the uniforms
 	glUniform3fv( shdr_is_ambient->GetUniLoc(0), 1, &((Vec3)color)[0] );
-	shdr_is_ambient->locTexUnit( shdr_is_ambient->GetUniLoc(1), r::ms::diffuse_fai, 0 );
+	shdr_is_ambient->locTexUnit( shdr_is_ambient->GetUniLoc(1), r::ms::diffuseFai, 0 );
 
 	// Draw quad
 	r::DrawQuad( shdr_is_ambient->getAttribLoc(0) );
@@ -218,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
@@ -263,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();
@@ -284,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 );
@@ -330,10 +329,10 @@ static void PointLightPass( const Camera& cam, const PointLight& light )
 	shader.bind();
 
 	// bind the material stage framebuffer attachable images
-	shader.locTexUnit( shader.GetUniLoc(0), r::ms::normal_fai, 0 );
-	shader.locTexUnit( shader.GetUniLoc(1), r::ms::diffuse_fai, 1 );
-	shader.locTexUnit( shader.GetUniLoc(2), r::ms::specular_fai, 2 );
-	shader.locTexUnit( shader.GetUniLoc(3), r::ms::depth_fai, 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() );
@@ -375,10 +374,10 @@ 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::shadows::runPass( light.camera );
 
 		// restore the IS FBO
-		fbo.Bind();
+		fbo.bind();
 
 		// and restore blending and depth test
 		glEnable( GL_BLEND );
@@ -395,10 +394,10 @@ static void SpotLightPass( const Camera& cam, const SpotLight& light )
 	shdr->bind();
 
 	// bind the framebuffer attachable images
-	shdr->locTexUnit( shdr->GetUniLoc(0), r::ms::normal_fai, 0 );
-	shdr->locTexUnit( shdr->GetUniLoc(1), r::ms::diffuse_fai, 1 );
-	shdr->locTexUnit( shdr->GetUniLoc(2), r::ms::specular_fai, 2 );
-	shdr->locTexUnit( shdr->GetUniLoc(3), r::ms::depth_fai, 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() );
@@ -434,16 +433,16 @@ 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::shadow_map, 5 );
+		shdr->locTexUnit( shdr->GetUniLoc(11), r::is::shadows::shadowMap, 5 );
 	}
 
 	//** render quad **
@@ -469,16 +468,16 @@ static void SpotLightPass( const Camera& cam, const SpotLight& light )
 
 /*
 =======================================================================================================================================
-RunStage                                                                                                                              =
+runStage                                                                                                                              =
 =======================================================================================================================================
 */
-void RunStage( const Camera& cam )
+void runStage( const Camera& cam )
 {
 	// FBO
-	fbo.Bind();
+	fbo.bind();
 
 	// OGL stuff
-	r::SetViewport( 0, 0, r::w, r::h );
+	r::setViewport( 0, 0, r::w, r::h );
 
 	glMatrixMode( GL_MODELVIEW );
 	glLoadIdentity();

+ 22 - 23
src/renderer/r_is_shadows.cpp

@@ -2,8 +2,7 @@
 #include "Texture.h"
 #include "Scene.h"
 #include "Resource.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 #include "Material.h"
 #include "MeshNode.h"
 
@@ -19,13 +18,13 @@ DATA VARS
 bool pcf = true;
 bool bilinear = true;
 
-static fbo_t fbo;
+static Fbo fbo;
 
 ShaderProg* shdr_depth, * shdr_depth_grass, * shdr_depth_hw_skinning;
 
 // exportable vars
-int shadow_resolution = 512;
-Texture shadow_map;
+int shadowResolution = 512;
+Texture shadowMap;
 
 
 /*
@@ -33,31 +32,31 @@ Texture shadow_map;
 init                                                                                                                                  =
 =======================================================================================================================================
 */
-void Init()
+void init()
 {
 	// create FBO
 	fbo.Create();
-	fbo.Bind();
+	fbo.bind();
 
 	// texture
-	shadow_map.createEmpty2D( shadow_resolution, shadow_resolution, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT );
-	shadow_map.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
-	if( bilinear ) shadow_map.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-	else           shadow_map.texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
-	shadow_map.texParameter( GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE );
-	shadow_map.texParameter( GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL );
+	shadowMap.createEmpty2D( shadowResolution, shadowResolution, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT );
+	shadowMap.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+	if( bilinear ) shadowMap.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+	else           shadowMap.texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+	shadowMap.texParameter( GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE );
+	shadowMap.texParameter( GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL );
 	/// If you dont want to use the FFP for comparing the shadwomap (the above two lines) then you can make the comparision inside the
 	/// glsl shader. The GL_LEQUAL means that: shadow = ( R <= Dt ) ? 1.0 : 0.0; . The R is given by: R = _tex_coord2.z/_tex_coord2.w;
 	/// and the Dt = shadow2D(shadow_depth_map, _shadow_uv ).r (see lp_generic.frag). Hardware filters like GL_LINEAR cannot be applied.
 
 	// inform the we wont write to color buffers
-	fbo.SetNumOfColorAttachements(0);
+	fbo.setNumOfColorAttachements(0);
 
 	// attach the texture
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, shadow_map.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, shadowMap.getGlId(), 0 );
 
 	// test if success
-	if( !fbo.IsGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create shadow FBO" );
 
 	// unbind
@@ -72,14 +71,14 @@ void Init()
 
 /*
 =======================================================================================================================================
-RunPass                                                                                                                               =
+runPass                                                                                                                               =
 render Scene only with depth and store the result in the shadow map                                                                   =
 =======================================================================================================================================
 */
-void RunPass( const Camera& cam )
+void runPass( const Camera& cam )
 {
 	// FBO
-	fbo.Bind();
+	fbo.bind();
 
 	// matrix
 	glMatrixMode( GL_PROJECTION );
@@ -89,8 +88,8 @@ void RunPass( const Camera& cam )
 	glPushAttrib( GL_VIEWPORT_BIT );
 
 	glClear( GL_DEPTH_BUFFER_BIT );
-	r::SetProjectionViewMatrices( cam );
-	r::SetViewport( 0, 0, shadow_resolution, shadow_resolution );
+	r::setProjectionViewMatrices( cam );
+	r::setViewport( 0, 0, shadowResolution, shadowResolution );
 
 	// disable color & blend & enable depth test
 	glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );
@@ -107,9 +106,9 @@ void RunPass( const Camera& cam )
 		MeshNode* mesh_node = Scene::meshNodes[i];
 		if( mesh_node->material->blends || mesh_node->material->refracts ) continue;
 
-		DEBUG_ERR( mesh_node->material->dp_mtl == NULL );
+		DEBUG_ERR( mesh_node->material->dpMtl == NULL );
 
-		//meshNode->material->dp_mtl->setup();
+		//meshNode->material->dpMtl->setup();
 		//meshNode->renderDepth();
 		mesh_node->material->setup();
 		mesh_node->render();

+ 24 - 25
src/renderer/r_ms.cpp

@@ -6,8 +6,7 @@
 #include "Camera.h"
 #include "Scene.h"
 #include "Mesh.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 #include "Material.h"
 #include "MeshNode.h"
 
@@ -21,49 +20,49 @@ namespace ms {
 VARS                                                                                                                                  =
 =======================================================================================================================================
 */
-static fbo_t fbo;
+static Fbo fbo;
 
-Texture normal_fai, diffuse_fai, specular_fai, depth_fai;
+Texture normalFai, diffuseFai, specularFai, depthFai;
 
 
 
 //=====================================================================================================================================
 // init                                                                                                                               =
 //=====================================================================================================================================
-void Init()
+void init()
 {
 	// create FBO
 	fbo.Create();
-	fbo.Bind();
+	fbo.bind();
 
 	// inform in what buffers we draw
-	fbo.SetNumOfColorAttachements(3);
+	fbo.setNumOfColorAttachements(3);
 
 	// create the FAIs
 	const int internal_format = GL_RGBA16F_ARB;
-	if( !normal_fai.createEmpty2D( r::w, r::h, internal_format, GL_RGBA ) ||
-	    !diffuse_fai.createEmpty2D( r::w, r::h, internal_format, GL_RGBA ) ||
-	    !specular_fai.createEmpty2D( r::w, r::h, internal_format, GL_RGBA ) ||
-	    !depth_fai.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" );
 	}
 
 	
 	// you could use the above for SSAO but the difference is very little.
-	//depth_fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-	//depth_fai.texParameter( GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+	//depthFai.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+	//depthFai.texParameter( GL_TEXTURE_MIN_FILTER, GL_LINEAR );
 
 	// attach the buffers to the FBO
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, normal_fai.getGlId(), 0 );
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_2D, diffuse_fai.getGlId(), 0 );
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_TEXTURE_2D, specular_fai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, normalFai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_2D, diffuseFai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_TEXTURE_2D, specularFai.getGlId(), 0 );
 
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, depth_fai.getGlId(), 0 );
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_TEXTURE_2D, depth_fai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, depthFai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_TEXTURE_2D, depthFai.getGlId(), 0 );
 
 	// test if success
-	if( !fbo.IsGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading material pass FBO" );
 
 	// unbind
@@ -76,22 +75,22 @@ void Init()
 
 
 //=====================================================================================================================================
-// RunStage                                                                                                                           =
+// runStage                                                                                                                           =
 //=====================================================================================================================================
-void RunStage( const Camera& cam )
+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();
+	fbo.bind();
 
 	#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() );

+ 8 - 9
src/renderer/r_ms_earlyz.cpp

@@ -6,8 +6,7 @@ The file contains functions and vars used for the deferred shading/material stag
 #include "Resource.h"
 #include "Texture.h"
 #include "Scene.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 
 #if defined(_EARLY_Z_)
 
@@ -21,7 +20,7 @@ namespace earlyz {
 VARS                                                                                                                                  =
 =======================================================================================================================================
 */
-static fbo_t fbo;
+static Fbo fbo;
 
 static ShaderProg* shdr_dp, * shdr_dp_grass; // passes for solid objects and grass-like
 
@@ -38,10 +37,10 @@ void init()
 	fbo.bind();
 
 	// inform the we wont write to color buffers
-	fbo.SetNumOfColorAttachements(0);
+	fbo.setNumOfColorAttachements(0);
 
 	// attach the texture
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, r::ms::depth_fai.glId, 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, r::ms::depthFai.glId, 0 );
 
 	// test if success
 	if( !fbo.CheckStatus() )
@@ -58,18 +57,18 @@ void init()
 
 /*
 =======================================================================================================================================
-RunPass                                                                                                                               =
+runPass                                                                                                                               =
 =======================================================================================================================================
 */
-void RunPass( const Camera& cam )
+void runPass( const Camera& cam )
 {
 	/*// FBO
 	fbo.bind();
 
 	// matrix
 	glClear( GL_DEPTH_BUFFER_BIT );
-	r::SetProjectionViewMatrices( cam );
-	r::SetViewport( 0, 0, r::w * r::rendering_quality, r::h * r::rendering_quality );
+	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 );

+ 20 - 21
src/renderer/r_pps.cpp

@@ -1,8 +1,7 @@
 #include "renderer.h"
 #include "Resource.h"
 #include "Texture.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 
 namespace r {
 namespace pps {
@@ -17,7 +16,7 @@ VARS
 =======================================================================================================================================
 */
 
-static fbo_t fbo; // yet another FBO
+static Fbo fbo; // yet another FBO
 
 Texture fai;
 
@@ -39,14 +38,14 @@ namespace shdr_vars
 init                                                                                                                                  =
 =======================================================================================================================================
 */
-void Init()
+void init()
 {
 	// create FBO
 	fbo.Create();
-	fbo.Bind();
+	fbo.bind();
 
 	// inform in what buffers we draw
-	fbo.SetNumOfColorAttachements(1);
+	fbo.setNumOfColorAttachements(1);
 
 	// create the texes
 	fai.createEmpty2D( r::w, r::h, GL_RGB, GL_RGB );
@@ -55,7 +54,7 @@ void Init()
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fai.getGlId(), 0 );
 
 	// test if success
-	if( !fbo.IsGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create post-processing stage FBO" );
 
 	fbo.Unbind();
@@ -69,13 +68,13 @@ void Init()
 
 	if( r::pps::ssao::enabled )
 	{
-		r::pps::ssao::Init();
+		r::pps::ssao::init();
 		shdr_vars::pps_ssao_fai = shdr_post_proc_stage->getUniLoc( "pps_ssao_fai" );
 	}
 
 	if( r::pps::hdr::enabled )
 	{
-		r::pps::hdr::Init();
+		r::pps::hdr::init();
 		shdr_vars::hdr_fai = shdr_post_proc_stage->getUniLoc( "pps_hdr_fai" );
 	}
 
@@ -84,7 +83,7 @@ void Init()
 
 	if( r::pps::lscatt::enabled )
 	{
-		r::pps::lscatt::Init();
+		r::pps::lscatt::init();
 		shdr_vars::lscatt_fai = shdr_post_proc_stage->getUniLoc( "pps_lscatt_fai" );
 	}
 
@@ -93,50 +92,50 @@ void Init()
 
 /*
 =======================================================================================================================================
-RunStage                                                                                                                              =
+runStage                                                                                                                              =
 =======================================================================================================================================
 */
-void RunStage( const Camera& cam )
+void runStage( const Camera& cam )
 {
 	if( r::pps::ssao::enabled )
-		r::pps::ssao::RunPass( cam );
+		r::pps::ssao::runPass( cam );
 
 	if( r::pps::hdr::enabled )
-		r::pps::hdr::RunPass( cam );
+		r::pps::hdr::runPass( cam );
 
 	if( r::pps::lscatt::enabled )
-		r::pps::lscatt::RunPass( cam );
+		r::pps::lscatt::runPass( cam );
 
-	fbo.Bind();
+	fbo.bind();
 
 	// set GL
 	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();
 
 	r::is::fai.bind(0);
-	//r::ms::depth_fai.bind(0);
+	//r::ms::depthFai.bind(0);
 	glUniform1i( shdr_vars::is_fai, 0 );
 
 	if( r::pps::ssao::enabled )
 	{
-		r::pps::ssao::blured_fai.bind(1);
+		r::pps::ssao::bluredFai.bind(1);
 		glUniform1i( shdr_vars::pps_ssao_fai, 1 );
 	}
 
 	if( r::pps::edgeaa::enabled )
 	{
-		r::ms::normal_fai.bind(2);
+		r::ms::normalFai.bind(2);
 		glUniform1i( shdr_vars::ms_normal_fai, 2 );
 	}
 
 	if( r::pps::hdr::enabled )
 	{
-		r::pps::hdr::pass2_fai.bind(3);
+		r::pps::hdr::pass2Fai.bind(3);
 		//r::bs::r_fai.bind(3);
 		glUniform1i( shdr_vars::hdr_fai, 3 );
 	}

+ 25 - 26
src/renderer/r_pps_hdr.cpp

@@ -6,8 +6,7 @@ The file contains functions and vars used for the deferred shading/post-processi
 #include "Resource.h"
 #include "Texture.h"
 #include "Scene.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 
 namespace r {
 namespace pps {
@@ -21,15 +20,15 @@ VARS
 */
 bool enabled = true;
 
-static fbo_t pass0_fbo, pass1_fbo, pass2_fbo; // yet another FBO and another, damn
+static Fbo pass0_fbo, pass1_fbo, pass2_fbo; // yet another FBO and another, damn
 
-float rendering_quality = 0.25; // 1/4 of the image
+float renderingQuality = 0.25; // 1/4 of the image
 static uint wwidth, wheight; // render width and height
 
 // hdr images
-Texture pass0_fai; // for vertical blur pass
-Texture pass1_fai; // with the horizontal blur
-Texture pass2_fai;
+Texture pass0Fai; // for vertical blur pass
+Texture pass1Fai; // with the horizontal blur
+Texture pass2Fai;
 
 static ShaderProg* pass0_shdr, * pass1_shdr, * pass2_shdr; // hdr pass 0 and pass 1 shaders
 
@@ -39,14 +38,14 @@ static ShaderProg* pass0_shdr, * pass1_shdr, * pass2_shdr; // hdr pass 0 and pas
 InitFBOs                                                                                                                              =
 =======================================================================================================================================
 */
-static void InitFBOs( fbo_t& fbo, Texture& fai, int internal_format )
+static void InitFBOs( Fbo& fbo, Texture& fai, int internal_format )
 {
 	// create FBO
 	fbo.Create();
-	fbo.Bind();
+	fbo.bind();
 
 	// inform in what buffers we draw
-	fbo.SetNumOfColorAttachements(1);
+	fbo.setNumOfColorAttachements(1);
 
 	// create the texes
 	fai.createEmpty2D( wwidth, wheight, internal_format, GL_RGB );
@@ -57,7 +56,7 @@ static void InitFBOs( fbo_t& fbo, Texture& fai, int internal_format )
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fai.getGlId(), 0 );
 
 	// test if success
-	if( !fbo.IsGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading post-processing stage HDR passes FBO" );
 
 	// unbind
@@ -70,14 +69,14 @@ static void InitFBOs( fbo_t& fbo, Texture& fai, int internal_format )
 init                                                                                                                                  =
 =======================================================================================================================================
 */
-void Init()
+void init()
 {
-	wwidth = r::pps::hdr::rendering_quality * r::w;
-	wheight = r::pps::hdr::rendering_quality * r::h;
+	wwidth = r::pps::hdr::renderingQuality * r::w;
+	wheight = r::pps::hdr::renderingQuality * r::h;
 
-	InitFBOs( pass0_fbo, pass0_fai, GL_RGB );
-	InitFBOs( pass1_fbo, pass1_fai, GL_RGB );
-	InitFBOs( pass2_fbo, pass2_fai, GL_RGB );
+	InitFBOs( pass0_fbo, pass0Fai, GL_RGB );
+	InitFBOs( pass1_fbo, pass1Fai, GL_RGB );
+	InitFBOs( pass2_fbo, pass2Fai, GL_RGB );
 
 	// init shaders
 	pass0_shdr = rsrc::shaders.load( "shaders/pps_hdr_pass0.glsl" );
@@ -88,19 +87,19 @@ void Init()
 
 /*
 =======================================================================================================================================
-RunPass                                                                                                                               =
+runPass                                                                                                                               =
 =======================================================================================================================================
 */
-void RunPass( const Camera& /*cam*/ )
+void runPass( const Camera& /*cam*/ )
 {
-	r::SetViewport( 0, 0, wwidth, wheight );
+	r::setViewport( 0, 0, wwidth, wheight );
 
 	glDisable( GL_BLEND );
 	glDisable( GL_DEPTH_TEST );
 
 
 	// pass 0
-	pass0_fbo.Bind();
+	pass0_fbo.bind();
 
 	pass0_shdr->bind();
 
@@ -111,28 +110,28 @@ void RunPass( const Camera& /*cam*/ )
 
 
 	// pass 1
-	pass1_fbo.Bind();
+	pass1_fbo.bind();
 
 	pass1_shdr->bind();
 
-	pass1_shdr->locTexUnit( pass1_shdr->GetUniLoc(0), pass0_fai, 0 );
+	pass1_shdr->locTexUnit( pass1_shdr->GetUniLoc(0), pass0Fai, 0 );
 
 	// Draw quad
 	r::DrawQuad( pass1_shdr->getAttribLoc(0) );
 
 
 	// pass 2
-	pass2_fbo.Bind();
+	pass2_fbo.bind();
 
 	pass2_shdr->bind();
 
-	pass2_shdr->locTexUnit( pass2_shdr->GetUniLoc(0), pass1_fai, 0 );
+	pass2_shdr->locTexUnit( pass2_shdr->GetUniLoc(0), pass1Fai, 0 );
 
 	// Draw quad
 	r::DrawQuad( pass2_shdr->getAttribLoc(0) );
 
 	// end
-	fbo_t::Unbind();
+	Fbo::Unbind();
 }
 
 

+ 15 - 16
src/renderer/r_pps_lscatt.cpp

@@ -2,8 +2,7 @@
 #include "Resource.h"
 #include "Texture.h"
 #include "Scene.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 
 namespace r {
 namespace pps {
@@ -15,9 +14,9 @@ namespace lscatt {
 VARS                                                                                                                                  =
 =======================================================================================================================================
 */
-static fbo_t fbo; // yet another FBO
+static Fbo fbo; // yet another FBO
 
-float rendering_quality = 1.0;
+float renderingQuality = 1.0;
 bool enabled = false;
 
 Texture fai;
@@ -32,18 +31,18 @@ static int is_fai_uni_loc;
 init                                                                                                                                  =
 =======================================================================================================================================
 */
-void Init()
+void init()
 {
-	if( rendering_quality<0.0 || rendering_quality>1.0 ) ERROR("Incorect r::pps:lscatt::rendering_quality");
-	float wwidth = r::pps::lscatt::rendering_quality * r::w;
-	float wheight = r::pps::lscatt::rendering_quality * 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();
-	fbo.Bind();
+	fbo.bind();
 
 	// inform in what buffers we draw
-	fbo.SetNumOfColorAttachements(1);
+	fbo.setNumOfColorAttachements(1);
 
 	// create the texes
 	fai.createEmpty2D( wwidth, wheight, GL_RGB, GL_RGB );
@@ -54,7 +53,7 @@ void Init()
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fai.getGlId(), 0 );
 
 	// test if success
-	if( !fbo.IsGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading post-processing stage light scattering pass FBO" );
 
 	// unbind
@@ -70,14 +69,14 @@ void Init()
 
 /*
 =======================================================================================================================================
-RunPass                                                                                                                               =
+runPass                                                                                                                               =
 =======================================================================================================================================
 */
-void RunPass( const Camera& cam )
+void runPass( const Camera& cam )
 {
-	fbo.Bind();
+	fbo.bind();
 
-	r::SetViewport( 0, 0, r::w * rendering_quality, r::h * rendering_quality );
+	r::setViewport( 0, 0, r::w * renderingQuality, r::h * renderingQuality );
 
 	glDisable( GL_BLEND );
 	glDisable( GL_DEPTH_TEST );
@@ -85,7 +84,7 @@ void RunPass( const Camera& cam )
 	// set the shader
 	shdr->bind();
 
-	shdr->locTexUnit( ms_depth_fai_uni_loc, r::ms::depth_fai, 0 );
+	shdr->locTexUnit( ms_depth_fai_uni_loc, r::ms::depthFai, 0 );
 	shdr->locTexUnit( is_fai_uni_loc, r::is::fai, 1 );
 
 	// pass the light

+ 29 - 30
src/renderer/r_pps_ssao.cpp

@@ -6,8 +6,7 @@ The file contains functions and vars used for the deferred shading/post-processi
 #include "Resource.h"
 #include "Texture.h"
 #include "Scene.h"
-#include "r_private.h"
-#include "fbo.h"
+#include "Fbo.h"
 #include "Camera.h"
 
 namespace r {
@@ -20,14 +19,14 @@ namespace ssao {
 VARS                                                                                                                                  =
 =======================================================================================================================================
 */
-static fbo_t fbo, blur_fbo; // yet another FBO
+static Fbo fbo, blur_fbo; // yet another FBO
 
-float rendering_quality = 0.25; // the rendering_quality of the SSAO fai. Chose low so it can blend
+float renderingQuality = 0.25; // 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, blured_fai; // SSAO factor
+Texture fai, bluredFai; // SSAO factor
 
 static ShaderProg* shdr_ppp_ssao, * blur_shdr;
 
@@ -41,21 +40,21 @@ static void InitBlurFBO()
 {
 	// create FBO
 	blur_fbo.Create();
-	blur_fbo.Bind();
+	blur_fbo.bind();
 
 	// inform in what buffers we draw
-	blur_fbo.SetNumOfColorAttachements(1);
+	blur_fbo.setNumOfColorAttachements(1);
 
 	// create the texes
-	blured_fai.createEmpty2D( wwidth, wheight, GL_ALPHA8, GL_ALPHA );
-	blured_fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-	blured_fai.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+	bluredFai.createEmpty2D( wwidth, wheight, GL_ALPHA8, GL_ALPHA );
+	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, blured_fai.getGlId(), 0 );
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, bluredFai.getGlId(), 0 );
 
 	// test if success
-	if( !blur_fbo.IsGood() )
+	if( !blur_fbo.isGood() )
 		FATAL( "Cannot create deferred shading post-processing stage SSAO blur FBO" );
 
 	// unbind
@@ -68,18 +67,18 @@ static void InitBlurFBO()
 init                                                                                                                                  =
 =======================================================================================================================================
 */
-void Init()
+void init()
 {
-	if( rendering_quality<0.0 || rendering_quality>1.0 ) ERROR("Incorect r::pps:ssao::rendering_quality");
-	wwidth = r::pps::ssao::rendering_quality * r::w;
-	wheight = r::pps::ssao::rendering_quality * 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();
-	fbo.Bind();
+	fbo.bind();
 
 	// inform in what buffers we draw
-	fbo.SetNumOfColorAttachements(1);
+	fbo.setNumOfColorAttachements(1);
 
 	// create the texes
 	fai.createEmpty2D( wwidth, wheight, GL_ALPHA8, GL_ALPHA );
@@ -90,7 +89,7 @@ void Init()
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fai.getGlId(), 0 );
 
 	// test if success
-	if( !fbo.IsGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading post-processing stage SSAO pass FBO" );
 
 	// unbind
@@ -101,16 +100,16 @@ void Init()
 	shdr_ppp_ssao = rsrc::shaders.load( "shaders/pps_ssao.glsl" );
 
 	// load noise map and disable temporaly the texture compression and enable mipmaping
-	bool tex_compr = r::texture_compression;
+	bool tex_compr = r::textureCompression;
 	bool mipmaping = r::mipmaping;
-	r::texture_compression = false;
+	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::texture_compression = tex_compr;
+	r::textureCompression = tex_compr;
 	r::mipmaping = mipmaping;
 
 	// blur FBO
@@ -121,14 +120,14 @@ void Init()
 
 /*
 =======================================================================================================================================
-RunPass                                                                                                                               =
+runPass                                                                                                                               =
 =======================================================================================================================================
 */
-void RunPass( const Camera& cam )
+void runPass( const Camera& cam )
 {
-	fbo.Bind();
+	fbo.bind();
 
-	r::SetViewport( 0, 0, wwidth, wheight );
+	r::setViewport( 0, 0, wwidth, wheight );
 
 	glDisable( GL_BLEND );
 	glDisable( GL_DEPTH_TEST );
@@ -136,20 +135,20 @@ void RunPass( const Camera& cam )
 	// 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::depth_fai, 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::normal_fai, 2 );
+	shdr_ppp_ssao->locTexUnit( shdr_ppp_ssao->GetUniLoc(3), ms::normalFai, 2 );
 	r::DrawQuad( shdr_ppp_ssao->getAttribLoc(0) ); // Draw quad
 
 
 	// second pass. blur
-	blur_fbo.Bind();
+	blur_fbo.bind();
 	blur_shdr->bind();
 	blur_shdr->locTexUnit( blur_shdr->GetUniLoc(0), fai, 0 );
 	r::DrawQuad( blur_shdr->getAttribLoc(0) ); // Draw quad
 
 	// end
-	fbo_t::Unbind();
+	Fbo::Unbind();
 }
 
 

+ 0 - 185
src/renderer/r_private.h

@@ -1,185 +0,0 @@
-/**
-The file contains some externs of funcs and vars that no one else needs to know about exept the renderer cpp files
-*/
-#ifndef _R_PRIVATE_H_
-#define _R_PRIVATE_H_
-
-class Texture;
-class Camera;
-
-namespace r {
-
-
-/*
-=======================================================================================================================================
-externs                                                                                                                               =
-=======================================================================================================================================
-*/
-
-extern void DrawQuad( int vertCoords_uni_loc );
-extern float quad_vert_cords [][2];
-
-namespace ms
-{
-	extern void Init();
-	extern void RunStage( const Camera& cam );
-	extern Texture normal_fai, diffuse_fai, specular_fai, depth_fai;
-	const int fbo_attachable_imgs_num = 4;
-
-#if defined( _EARLY_Z_ )
-	/// EarlyZ depth pass namespace
-	namespace earlyz
-	{
-		extern void init(); ///< Inits the the earlyz FBO with r::ms::depth_fai
-		extern void RunPass( const Camera& cam ); ///< Renders the Scene's depth in the r::ms:depth_fai
-	}
-#endif
-}
-
-
-namespace is
-{
-	extern void Init();
-	extern void RunStage( const Camera& cam );
-
-	namespace shadows
-	{
-		extern Texture shadow_map;
-		extern int shadow_resolution;
-		extern void RunPass( const Camera& cam );
-		extern void Init();
-	}
-}
-
-
-namespace pps
-{
-	extern void Init();
-	extern void RunStage( const Camera& cam );
-
-	namespace ssao
-	{
-		extern void Init();
-		extern void RunPass( const Camera& cam );
-		extern Texture fai;
-		extern Texture blured_fai;
-		extern float rendering_quality;
-	}
-
-	namespace hdr
-	{
-		extern void Init();
-		extern void RunPass( const Camera& cam );
-		extern Texture pass0_fai;
-		extern Texture pass1_fai;
-		extern Texture pass2_fai;
-		extern float rendering_quality;
-	}
-
-	namespace lscatt
-	{
-		extern void Init();
-		extern void RunPass( const Camera& cam );
-		extern Texture fai;
-		extern float rendering_quality;
-	}
-}
-
-
-namespace bs
-{
-	extern void Init();
-	extern void RunStage( const Camera& cam );
-	extern Texture fai_bs_scene;
-
-	extern Texture r_fai; // ToDo: remove it
-}
-
-
-namespace dbg
-{
-	extern void Init();
-	extern void RunStage( const Camera& cam );
-}
-
-
-/*
-=======================================================================================================================================
-renderDepth                                                                                                                           =
-=======================================================================================================================================
-*/
-/**
-The template function calls t.renderDepth and sets the state according to t's material. It being used by r::ms::earlyz::RunStage
-and by r::is::shadow::RunStage. Used like macro
-@param a renderable object
-@param the shader to bind if the t's material IS NOT a grass like material
-@param the shader to bind if the t's material IS a grass like material
-*/
-template <typename Type, bool make_check_for_shadow_casting>
-void RenderDepth( Type& t )
-{
-	DEBUG_ERR( !t.material ); // the object doesnt have material
-
-	// casts shadow?
-	if( make_check_for_shadow_casting )
-		if( !t.material->castsShadow ) return;
-
-	// blends?
-	if( t.material->blends ) return;
-
-	// chose the appropriate shader
-	if( t.material->grass_map )
-	{
-		r::is::shadows::shdr_depth_grass->bind();
-		r::is::shadows::shdr_depth_grass->locTexUnit( r::is::shadows::shdr_depth_grass->GetUniLoc(0), *t.material->grass_map, 0 );
-	}
-	else if( t.material->attrib_locs.vertWeightBonesNum != -1 )
-	{
-		r::is::shadows::shdr_depth_hw_skinning->bind();
-	}
-	else
-	{
-		r::is::shadows::shdr_depth->bind();
-	}
-
-	// wireframe ?
-	if( t.material->wireframe )
-	{
-		glPolygonMode( GL_FRONT, GL_LINE );
-		//glLineWidth( 1.0 );
-	}
-	else
-		glPolygonMode( GL_FRONT, GL_FILL );
-
-	// AT LAST, render it
-	t.RenderDepth();
-
-	glPolygonMode( GL_FRONT, GL_FILL );
-}
-
-
-//=====================================================================================================================================
-// render                                                                                                                             =
-//=====================================================================================================================================
-/// The template function renders an entity. Used by r::ms::RunStage and r::bs::RunStage. Used like macro
-template <typename Type, bool render_transparent> void Render( Type* t )
-{
-	DEBUG_ERR( !t->material );
-
-	if( render_transparent )
-	{
-		if( !t->material->blends ) return;
-	}
-	else
-	{
-		if( t->material->blends ) return;
-	}
-
-
-	t->material->Setup();
-	t->Render();
-}
-
-
-} // end r namespace
-#endif

+ 62 - 63
src/renderer/renderer.cpp

@@ -4,7 +4,6 @@
 #include "renderer.h"
 #include "Texture.h"
 #include "Scene.h"
-#include "r_private.h"
 #include "Camera.h"
 #include "App.h"
 
@@ -19,12 +18,12 @@ data vars
 
 // misc
 uint w, h;
-uint frames_num = 0;
-float aspect_ratio;
+uint framesNum = 0;
+float aspectRatio;
 
-int max_color_atachments = 0;
-//float rendering_quality = 1.0;
-int screenshot_jpeg_quality = 90;
+int maxColorAtachments = 0;
+//float renderingQuality = 1.0;
+int screenshotJpegQuality = 90;
 
 static ShaderProg* shdr_final;
 
@@ -41,8 +40,8 @@ string std_shader_preproc_defines;
 // texture
 bool mipmaping = true;
 int max_anisotropy = 8;
-int max_texture_units = -1;
-bool texture_compression = false;
+int maxTextureUnits = -1;
+bool textureCompression = false;
 
 
 //=====================================================================================================================================
@@ -77,26 +76,26 @@ static void BuildStdShaderPreProcStr()
 	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::rendering_quality) + "\n";
-	tmp += "#define SHADOWMAP_SIZE " + Util::intToStr(r::is::shadows::shadow_resolution) + "\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 _SHADOW_MAPPING_PCF_\n";
 	if( r::pps::ssao::enabled )
 	{
 		tmp += "#define _SSAO_\n";
-		tmp += "#define SSAO_RENDERING_QUALITY " + Util::floatToStr(r::pps::ssao::rendering_quality) + "\n";
+		tmp += "#define SSAO_RENDERING_QUALITY " + Util::floatToStr(r::pps::ssao::renderingQuality) + "\n";
 	}
 	if( r::pps::edgeaa::enabled )
 		tmp += "#define _EDGEAA_\n";
 	if( r::pps::hdr::enabled )
 	{
 		tmp += "#define _HDR_\n";
-		tmp += "#define HDR_RENDERING_QUALITY " + Util::floatToStr(r::pps::hdr::rendering_quality) + "\n";
+		tmp += "#define HDR_RENDERING_QUALITY " + Util::floatToStr(r::pps::hdr::renderingQuality) + "\n";
 	}
 	if( r::pps::lscatt::enabled )
 	{
 		tmp += "#define _LSCATT_\n";
-		tmp += "#define LSCATT_RENDERING_QUALITY " + Util::floatToStr(r::pps::lscatt::rendering_quality) + "\n";
+		tmp += "#define LSCATT_RENDERING_QUALITY " + Util::floatToStr(r::pps::lscatt::renderingQuality) + "\n";
 	}
 }
 
@@ -106,7 +105,7 @@ static void BuildStdShaderPreProcStr()
 init                                                                                                                                  =
 =======================================================================================================================================
 */
-void Init()
+void init()
 {
 	PRINT( "Renderer initializing..." );
 
@@ -129,20 +128,20 @@ void Init()
 	if( !glewIsSupported("GL_ARB_vertex_buffer_object") )
 		WARNING( "Vertex Buffer Objects not supported. The application may crash (and burn)" );
 
-	w = App::windowW /* * rendering_quality*/;
-	h = App::windowH /* * rendering_quality*/;
-	aspect_ratio = float(w)/h;
+	w = App::windowW /* * renderingQuality*/;
+	h = App::windowH /* * renderingQuality*/;
+	aspectRatio = float(w)/h;
 
 	glClearColor( 0.1, 0.1, 0.1, 0.0 );
 	glClearDepth( 1.0 );
 	glClearStencil( 0 );
 	glDepthFunc( GL_LEQUAL );
 
-	// query for max_color_atachments
-	glGetIntegerv( GL_MAX_COLOR_ATTACHMENTS_EXT, &max_color_atachments );
+	// query for maxColorAtachments
+	glGetIntegerv( GL_MAX_COLOR_ATTACHMENTS_EXT, &maxColorAtachments );
 
 	// get max texture units
-	glGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &max_texture_units );
+	glGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &maxTextureUnits );
 
 	// CullFace is always on
 	glCullFace( GL_BACK );
@@ -170,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" );
 }
@@ -186,17 +185,17 @@ void Init()
 render                                                                                                                                =
 =======================================================================================================================================
 */
-void Render( const Camera& cam )
+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 );
@@ -205,19 +204,19 @@ void Render( const Camera& cam )
 	shdr_final->locTexUnit( shdr_final->GetUniLoc(0), r::pps::fai, 0 );
 
 	/*const int step = 100;
-	if( r::frames_num < step )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::ms::diffuse_fai, 0 );
-	else if( r::frames_num < step*2 )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::ms::normal_fai, 0 );
-	else if( r::frames_num < step*3 )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::ms::specular_fai, 0 );
-	else if( r::frames_num < step*4 )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::ms::depth_fai, 0 );
-	else if( r::frames_num < step*5 )
-		shdr_final->locTexUnit( shdr_final->getUniLoc(0), r::pps::ssao::blured_fai, 0 );
-	else if( r::frames_num < 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::pass2_fai, 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 );*/
@@ -229,10 +228,10 @@ void Render( const Camera& cam )
 
 /*
 =======================================================================================================================================
-SetProjectionMatrix                                                                                                                   =
+setProjectionMatrix                                                                                                                   =
 =======================================================================================================================================
 */
-void SetProjectionMatrix( const Camera& cam )
+void setProjectionMatrix( const Camera& cam )
 {
 	glMatrixMode( GL_PROJECTION );
 	loadMatrix( cam.getProjectionMatrix() );
@@ -241,10 +240,10 @@ void SetProjectionMatrix( const Camera& cam )
 
 /*
 =======================================================================================================================================
-SetViewMatrix                                                                                                                         =
+setViewMatrix                                                                                                                         =
 =======================================================================================================================================
 */
-void SetViewMatrix( const Camera& cam )
+void setViewMatrix( const Camera& cam )
 {
 	glMatrixMode( GL_MODELVIEW );
 	loadMatrix( cam.getViewMatrix() );
@@ -253,11 +252,11 @@ void SetViewMatrix( const Camera& cam )
 
 /*
 =======================================================================================================================================
-Unproject                                                                                                                             =
+unproject                                                                                                                             =
 my version of gluUnproject                                                                                                            =
 =======================================================================================================================================
 */
-bool Unproject( float winX, float winY, float winZ, // window screen coords
+bool unproject( float winX, float winY, float winZ, // window screen coords
                 const Mat4& modelview_mat, const Mat4& projection_mat, const int* view,
                 float& objX, float& objY, float& objZ )
 {
@@ -282,10 +281,10 @@ bool Unproject( float winX, float winY, float winZ, // window screen coords
 
 /*
 =======================================================================================================================================
-Ortho                                                                                                                                 =
+ortho                                                                                                                                 =
 =======================================================================================================================================
 */
-Mat4 Ortho( float left, float right, float bottom, float top, float near, float far )
+Mat4 ortho( float left, float right, float bottom, float top, float near, float far )
 {
 	float difx = right-left;
 	float dify = top-bottom;
@@ -318,12 +317,12 @@ Mat4 Ortho( float left, float right, float bottom, float top, float near, float
 
 /*
 =======================================================================================================================================
-PrepareNextFrame                                                                                                                      =
+prepareNextFrame                                                                                                                      =
 =======================================================================================================================================
 */
-void PrepareNextFrame()
+void prepareNextFrame()
 {
-	frames_num++;
+	framesNum++;
 }
 
 
@@ -341,9 +340,9 @@ void printLastError()
 
 
 //=====================================================================================================================================
-// GetLastError                                                                                                                       =
+// getLastError                                                                                                                       =
 //=====================================================================================================================================
-const uchar* GetLastError()
+const uchar* getLastError()
 {
 	return gluErrorString( glGetError() );
 }
@@ -421,7 +420,7 @@ static bool TakeScreenshotJPEG( const char* filename )
 	cinfo.input_components = 3;
 	cinfo.in_color_space   = JCS_RGB;
 	jpeg_set_defaults( &cinfo);
-	jpeg_set_quality ( &cinfo, screenshot_jpeg_quality, true );
+	jpeg_set_quality ( &cinfo, screenshotJpegQuality, true );
 	jpeg_start_compress( &cinfo, true );
 
 	// read from OGL
@@ -448,10 +447,10 @@ static bool TakeScreenshotJPEG( const char* filename )
 
 /*
 =======================================================================================================================================
-TakeScreenshot                                                                                                                        =
+takeScreenshot                                                                                                                        =
 =======================================================================================================================================
 */
-void TakeScreenshot( const char* filename )
+void takeScreenshot( const char* filename )
 {
 	char* ext = Util::getFileExtension( filename );
 	bool ret;

+ 91 - 50
src/renderer/renderer.h

@@ -19,59 +19,68 @@ namespace r { // begin namespace
 
 extern uint  w; ///< width of the rendering window
 extern uint  h; ///< height of the rendering window
-//extern float rendering_quality; ///< The global rendering quality of the raster image. From 0.0(low) to 1.0(high)
-extern uint  frames_num;
-extern float aspect_ratio;
-extern int   screenshot_jpeg_quality; ///< The quality of the JPEG screenshots. From 0 to 100
+//extern float renderingQuality; ///< The global rendering quality of the raster image. From 0.0(low) to 1.0(high)
+extern uint  framesNum;
+extern float aspectRatio;
+extern int   screenshotJpegQuality; ///< The quality of the JPEG screenshots. From 0 to 100
 
-extern int  max_color_atachments; ///< Max color atachements a FBO can accept
+extern int  maxColorAtachments; ///< Max color atachements a FBO can accept
 
 // texture stuff
-extern bool texture_compression; ///< Used in Texture::load to enable texture compression. Decreases video memory usage
-extern int  max_texture_units; ///< Used in Texture::bind so we wont bind in a nonexistent texture unit. Readonly
+extern bool textureCompression; ///< Used in Texture::load to enable texture compression. Decreases video memory usage
+extern int  maxTextureUnits; ///< Used in Texture::bind so we wont bind in a nonexistent texture unit. Readonly
 extern bool mipmaping; ///< Used in Texture::load. Enables mipmaping increases video memory usage
 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 PrepareNextFrame(); ///< Runs before rendering
-extern const uchar* GetLastError(); ///< GetLastError
+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 prepareNextFrame(); ///< Runs before rendering
+extern const uchar* getLastError(); ///< getLastError
 extern void printLastError(); ///< prints last OpenGL error
-inline const string& GetStdShaderPreprocDefines() { extern string std_shader_preproc_defines; return std_shader_preproc_defines; }
-extern void Render( const Camera& cam ); ///< The spine function of the renderer
+inline const string& getStdShaderPreprocDefines() { extern string std_shader_preproc_defines; return std_shader_preproc_defines; }
+extern void render( const Camera& cam ); ///< The spine function of the renderer
 
-extern void SetGLState_Wireframe();
-extern void SetGLState_Wireframedotted();
-extern void SetGLState_Solid();
-extern void SetGLState_AlphaSolid();
+extern float quad_vert_cords [][2];
+extern void DrawQuad( int vertCoords_uni_loc );
 
 // matrices
 //extern
 
 // ogl and glu wrappers
-inline void   MultMatrix( const Mat4& m4 ) { glMultMatrixf( &(m4.getTransposed())(0,0) ); } ///< OpenGL wrapper
+inline void   multMatrix( const Mat4& m4 ) { glMultMatrixf( &(m4.getTransposed())(0,0) ); } ///< OpenGL wrapper
 inline void   loadMatrix( const Mat4& m4 ) { glLoadMatrixf( &(m4.getTransposed())(0,0) ); } ///< OpenGL wrapper
 
-inline void   Color3( const Vec3& v ) { glColor3fv( &((Vec3&)v)[0] ); } ///< OpenGL wrapper
-inline void   Color4( const Vec4& v ) { glColor4fv( &((Vec4&)v)[0] ); } ///< OpenGL wrapper
-inline void   NoShaders() { ShaderProg::unbind(); } ///< unbind shaders
-extern bool   Unproject( float winX, float winY, float winZ, const Mat4& modelview_mat, const Mat4& projection_mat, const int* view, float& objX, float& objY, float& objZ ); ///< My version of gluUnproject
-extern Mat4 Ortho( float left, float right, float bottom, float top, float near, float far );
+inline void   color3( const Vec3& v ) { glColor3fv( &((Vec3&)v)[0] ); } ///< OpenGL wrapper
+inline void   color4( const Vec4& v ) { glColor4fv( &((Vec4&)v)[0] ); } ///< OpenGL wrapper
+inline void   noShaders() { ShaderProg::unbind(); } ///< unbind shaders
+extern bool   unproject( float winX, float winY, float winZ, const Mat4& modelview_mat, const Mat4& projection_mat, const int* view, float& objX, float& objY, float& objZ ); ///< My version of gluUnproject
+extern Mat4   ortho( float left, float right, float bottom, float top, float near, float far );
 
 // Matrix stuff
-extern void SetProjectionMatrix( const Camera& cam );
-extern void SetViewMatrix( const Camera& cam );
-inline void SetProjectionViewMatrices( const Camera& cam ) { SetProjectionMatrix(cam); SetViewMatrix(cam); }
-inline void SetViewport( uint x, uint y, uint w, uint h ) { glViewport(x,y,w,h); }
+extern void setProjectionMatrix( const Camera& cam );
+extern void setViewMatrix( const Camera& cam );
+inline void setProjectionViewMatrices( const Camera& cam ) { setProjectionMatrix(cam); setViewMatrix(cam); }
+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
 {
-	extern Texture normal_fai;
-	extern Texture depth_fai;
+	extern Texture normalFai, diffuseFai, specularFai, depthFai;
+
+	extern void init();
+	extern void runStage( const Camera& cam );
+
+#if defined( _EARLY_Z_ )
+	/// 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
+	}
+#endif
 }
 
 /// illumination stage namespace
@@ -79,12 +88,16 @@ namespace is
 {
 	extern Texture fai;
 
+	extern void init();
+	extern void runStage( const Camera& cam );
+
 	/// illumination stage shadows namesapce
 	namespace shadows
 	{
-		extern ShaderProg* shdr_depth;
-		extern ShaderProg* shdr_depth_grass;
-		extern ShaderProg* shdr_depth_hw_skinning;
+		extern void init();
+		extern void runPass( const Camera& cam );
+		extern Texture shadowMap;
+		extern int shadowResolution;
 		extern bool pcf; ///< PCF on/off
 		extern bool bilinear; ///< Shadowmap bilinear filtering on/off
 	}
@@ -93,28 +106,53 @@ namespace is
 /// blending stage namespace
 namespace bs
 {
-	extern void Init2();
-	extern void RunStage2( const Camera& cam );
+	extern Texture faiBsScene;
+
+	extern void init2();
+	extern void runStage2( const Camera& cam );
+	extern void init();
+	extern void runStage( const Camera& cam );
 }
 
 /// pre-processing stage namespace
 namespace pps
 {
+	extern void init();
+	extern void runStage( const Camera& cam );
+
 	namespace ssao
 	{
-		extern bool enabled; ///< SSAO on/of
+		extern bool enabled;
+		extern void init();
+		extern void runPass( const Camera& cam );
+		extern Texture fai;
+		extern Texture bluredFai;
+		extern float renderingQuality;
 	}
+
 	namespace edgeaa
 	{
-		extern bool enabled; ///< EdgeAA on/of
+		extern bool enabled;
 	}
+
 	namespace hdr
 	{
-		extern bool enabled; ///< Bloom on/of
+		extern bool    enabled;
+		extern void    init();
+		extern void    runPass( const Camera& cam );
+		extern Texture pass0Fai;
+		extern Texture pass1Fai;
+		extern Texture pass2Fai;
+		extern float   renderingQuality;
 	}
+
 	namespace lscatt
 	{
-		extern bool enabled; ///< Light scattering on/of
+		extern bool enabled;
+		extern void init();
+		extern void runPass( const Camera& cam );
+		extern Texture fai;
+		extern float renderingQuality;
 	}
 
 	extern Texture fai;
@@ -123,18 +161,21 @@ namespace pps
 /// debug stage namespace
 namespace dbg
 {
-	extern bool show_axis;
-	extern bool show_fnormals;
-	extern bool show_vnormals;
-	extern bool show_lights;
-	extern bool show_skeletons;
-	extern bool show_cameras;
-	extern bool show_bvolumes;
-
-	extern void RenderGrid();
-	extern void RenderSphere( float radius, int precision );
-	extern void RenderCube( bool cols = false, float size = 1.0f );
-	extern void RenderQuad( float w, float h );
+	extern bool showAxis;
+	extern bool showFnormals;
+	extern bool showVnormals;
+	extern bool showLights;
+	extern bool showSkeletons;
+	extern bool showCameras;
+	extern bool showBvolumes;
+
+	extern void init();
+	extern void runStage( const Camera& cam );
+
+	extern void renderGrid();
+	extern void renderSphere( float radius, int precision );
+	extern void renderCube( bool cols = false, float size = 1.0f );
+	extern void renderQuad( float w, float h );
 }
 
 } // end namespace

+ 1 - 1
src/renderer2/r_is.cpp

@@ -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

+ 5 - 5
src/renderer2/r_ms.cpp

@@ -13,7 +13,7 @@ void renderer_t::material_stage_t::init()
 	fbo.bind();
 
 	// inform in what buffers we draw
-	fbo.SetNumOfColorAttachements(3);
+	fbo.setNumOfColorAttachements(3);
 
 	// create buffers
 	const int internal_format = GL_RGBA16F_ARB;
@@ -23,8 +23,8 @@ void renderer_t::material_stage_t::init()
 
 	fais.depth.CreateEmpty( renderer.width, renderer.height, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT );
 	// you could use the above for SSAO but the difference is minimal.
-	//depth_fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-	//depth_fai.texParameter( GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+	//depthFai.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+	//depthFai.texParameter( GL_TEXTURE_MIN_FILTER, GL_LINEAR );
 
 	// attach the buffers to the FBO
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fais.normal.getGlId(), 0 );
@@ -34,7 +34,7 @@ void renderer_t::material_stage_t::init()
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,  GL_TEXTURE_2D, fais.depth.getGlId(), 0 );
 
 	// test if success
-	if( !fbo.IsGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading material pass FBO" );
 
 	// unbind
@@ -52,7 +52,7 @@ void renderer_t::material_stage_t::Run() const
 	glClear( GL_DEPTH_BUFFER_BIT );
 	renderer.matrices.view = renderer.camera->getViewMatrix();
 	renderer.matrices.projection = renderer.camera->getProjectionMatrix();
-	renderer.SetViewport( 0, 0, renderer.width, renderer.height );
+	renderer.setViewport( 0, 0, renderer.width, renderer.height );
 
 	//glEnable( GL_DEPTH_TEST );
 	Scene::skybox.render( renderer.camera->getViewMatrix().getRotationPart() );

+ 2 - 2
src/renderer2/renderer.hpp

@@ -248,8 +248,8 @@ struct renderer_t
 	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); };
-	static void NoShaders() { ShaderProg::unbind(); }
+	static void setViewport( uint x, uint y, uint w, uint h ) { glViewport(x,y,w,h); };
+	static void noShaders() { ShaderProg::unbind(); }
 	static void DrawQuad();
 	void init();
 	void Run( camera_t* cam );

+ 6 - 6
src/resources/Material.cpp

@@ -85,7 +85,7 @@ bool Material::load( const char* filename )
 		/*//** DEPTH_SHADER_PROG **
 		else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "DEPTH_SHADER_PROG" ) )
 		{
-			if( depth.shaderProg ) ERROR( "Depth shader program allready loaded" );
+			if( depth.shaderProg ) ERROR( "Depth shader program already loaded" );
 
 			token = &scanner.getNextToken();
 			if( token->code != Scanner::TC_STRING )
@@ -98,7 +98,7 @@ bool Material::load( const char* filename )
 		//** DEPTH_MATERIAL **
 		else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "DEPTH_PASS_MATERIAL" ) )
 		{
-			if( dp_mtl ) ERROR( "Depth material already loaded" );
+			if( dpMtl ) ERROR( "Depth material already loaded" );
 
 			token = &scanner.getNextToken();
 			if( token->code != Scanner::TC_STRING )
@@ -106,7 +106,7 @@ bool Material::load( const char* filename )
 				PARSE_ERR_EXPECTED( "string" );
 				return false;
 			}
-			dp_mtl = rsrc::materials.load( token->value.string );
+			dpMtl = rsrc::materials.load( token->value.string );
 		}
 		//** BLENDS **
 		else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "BLENDS" ) )
@@ -270,11 +270,11 @@ bool Material::load( const char* filename )
 						}
 						else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "MS_NORMAL_FAI" ) )
 						{
-							var.value.texture = &r::ms::normal_fai;
+							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::depth_fai;
+							var.value.texture = &r::ms::depthFai;
 						}
 						else if( token->code == Scanner::TC_IDENTIFIER && !strcmp( token->value.string, "PPS_FAI" ) )
 						{
@@ -422,7 +422,7 @@ void Material::setToDefault()
 	grassMap = NULL;
 	castsShadow = true;
 	refracts = false;
-	dp_mtl = NULL;
+	dpMtl = NULL;
 	/*depth.shaderProg = NULL;
 	depth.alpha_testing_map = NULL;*/
 }

+ 2 - 2
src/resources/Material.h

@@ -103,7 +103,7 @@ class Material: public Resource
 			} uniLocs;
 		} depth;*/
 
-		Material* dp_mtl;
+		Material* dpMtl;
 
 	//===================================================================================================================================
 	// funcs                                                                                                                            =
@@ -119,7 +119,7 @@ class Material: public Resource
 		void unload();
 
 		bool hasHWSkinning() const { return attribLocs.vertWeightBonesNum != -1; }
-		bool hasAlphaTesting() const { return dp_mtl!=NULL && dp_mtl->attribLocs.texCoords!=-1; }
+		bool hasAlphaTesting() const { return dpMtl!=NULL && dpMtl->attribLocs.texCoords!=-1; }
 };
 
 

+ 12 - 12
src/resources/Mesh.h

@@ -3,7 +3,7 @@
 
 #include "Common.h"
 #include "Math.h"
-#include "vbo.h"
+#include "Vbo.h"
 #include "Resource.h"
 #include "collision.h"
 
@@ -27,26 +27,26 @@ class Mesh: public Resource
 		class Triangle
 		{
 			public:
-				uint   vertIds[3]; // an array with the vertex indexes in the mesh class
+				uint vertIds[3]; // an array with the vertex indexes in the mesh class
 				Vec3 normal;
 		};
 
-		Vec<Vec3>       vertCoords;
-		Vec<Vec3>       vertNormals;
-		Vec<Vec4>       vertTangents;
-		Vec<Vec2>       texCoords;    ///< One for every vert so we can use vertex arrays
+		Vec<Vec3>         vertCoords;
+		Vec<Vec3>         vertNormals;
+		Vec<Vec4>         vertTangents;
+		Vec<Vec2>         texCoords;    ///< One for every vert so we can use vertex arrays
 		Vec<VertexWeight> vertWeights;
 		Vec<Triangle>     tris;
 		Vec<ushort>       vertIndeces; ///< Used for vertex arrays
 
 		struct
 		{
-			vbo_t vertCoords;
-			vbo_t vertNormals;
-			vbo_t vertTangents;
-			vbo_t texCoords;
-			vbo_t vertIndeces;
-			vbo_t vertWeights;
+			Vbo vertCoords;
+			Vbo vertNormals;
+			Vbo vertTangents;
+			Vbo texCoords;
+			Vbo vertIndeces;
+			Vbo vertWeights;
 		} vbos;
 
 		string materialName;

+ 2 - 2
src/resources/Resource.h

@@ -128,7 +128,7 @@ template<typename Type> class Container: public Vec<Type*>
 
 		public:
 		/**
-		 * load an object and register it. If its allready loaded return its pointer
+		 * load an object and register it. If its already loaded return its pointer
 		 * @param fname The filename that initializes the object
 		 * @return A pointer of a new resource or NULL on fail
 		 */
@@ -138,7 +138,7 @@ template<typename Type> class Container: public Vec<Type*>
 			string path = Util::getPath( fname );
 			Iterator it = findByNameAndPath( name, path.c_str() );
 
-			// if allready loaded then inc the users and return the pointer
+			// if already loaded then inc the users and return the pointer
 			if( it != BaseClass::end() )
 			{
 				++ (*it)->usersNum;

+ 7 - 7
src/resources/ShaderParser.cpp

@@ -84,16 +84,16 @@ bool ShaderParser::parseFileForPragmas( const string& filename, int id )
 					if( token->code == Scanner::TC_IDENTIFIER && strcmp(token->value.string, "vertShaderBegins") == 0 )
 					{
 						// play
-						if( fragShaderBegins.definedInLine != -1 ) // check if frag shader allready defined
+						if( fragShaderBegins.definedInLine != -1 ) // check if frag shader already defined
 						{
 							PARSE_ERR( "vertShaderBegins must precede fragShaderBegins defined at " << fragShaderBegins.definedInFile <<
 							           ":" << fragShaderBegins.definedInLine );
 							return false;
 						}
 						
-						if( vertShaderBegins.definedInLine != -1 ) // allready defined elseware so throw error
+						if( vertShaderBegins.definedInLine != -1 ) // already defined elseware so throw error
 						{
-							PARSE_ERR( "vertShaderBegins allready defined at " << vertShaderBegins.definedInFile << ":" <<
+							PARSE_ERR( "vertShaderBegins already defined at " << vertShaderBegins.definedInFile << ":" <<
 							           vertShaderBegins.definedInLine );
 							return false;
 						}
@@ -113,9 +113,9 @@ bool ShaderParser::parseFileForPragmas( const string& filename, int id )
 							return false;
 						}
 						
-						if( fragShaderBegins.definedInLine != -1 ) // if allready defined elseware throw error
+						if( fragShaderBegins.definedInLine != -1 ) // if already defined elseware throw error
 						{
-							PARSE_ERR( "fragShaderBegins allready defined at " << fragShaderBegins.definedInFile << ":" <<
+							PARSE_ERR( "fragShaderBegins already defined at " << fragShaderBegins.definedInFile << ":" <<
 							           fragShaderBegins.definedInLine );
 							return false;
 						}
@@ -158,7 +158,7 @@ bool ShaderParser::parseFileForPragmas( const string& filename, int id )
 								Vec<ShaderVarPragma>::iterator uniform = findShaderVar( output.uniforms, var_name );
 								if( uniform != output.uniforms.end() )
 								{
-									PARSE_ERR( "Uniform allready defined at " << uniform->definedInFile << ":" << uniform->definedInLine );
+									PARSE_ERR( "Uniform already defined at " << uniform->definedInFile << ":" << uniform->definedInLine );
 									return false;
 								}
 								
@@ -192,7 +192,7 @@ bool ShaderParser::parseFileForPragmas( const string& filename, int id )
 								Vec<ShaderVarPragma>::iterator attrib = findShaderVar( output.attributes, var_name );
 								if( attrib != output.attributes.end() )
 								{
-									PARSE_ERR( "Attribute allready defined at " << attrib->definedInFile << ":" << attrib->definedInLine );
+									PARSE_ERR( "Attribute already defined at " << attrib->definedInFile << ":" << attrib->definedInLine );
 									return false;
 								}
 								

+ 1 - 1
src/resources/ShaderProg.cpp

@@ -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;
 

+ 1 - 1
src/resources/SkelAnim.cpp

@@ -64,7 +64,7 @@ bool SkelAnim::load( const char* filename )
 	} // end for all bones
 
 
-	frames_num = keyframes[ keyframes.size()-1 ] + 1;
+	framesNum = keyframes[ keyframes.size()-1 ] + 1;
 
 	return true;
 }

+ 2 - 2
src/resources/SkelAnim.h

@@ -30,14 +30,14 @@ class SkelAnim: public Resource
 		};
 		
 		Vec<uint> keyframes;
-		uint frames_num;
+		uint framesNum;
 
 		Vec<BoneAnim> bones;
 
 		SkelAnim() {}
 		~SkelAnim() {}
 		bool load( const char* filename );
-		void unload() { keyframes.clear(); bones.clear(); frames_num=0; }
+		void unload() { keyframes.clear(); bones.clear(); framesNum=0; }
 };
 
 

+ 3 - 3
src/resources/Texture.cpp

@@ -307,7 +307,7 @@ bool Texture::load( const char* filename )
 	type = GL_TEXTURE_2D;
 	if( glId != numeric_limits<uint>::max() )
 	{
-		ERROR( "Texture allready loaded" );
+		ERROR( "Texture already loaded" );
 		return false;
 	}
 
@@ -332,7 +332,7 @@ 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::texture_compression )
+	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
@@ -410,7 +410,7 @@ void Texture::unload()
 //=====================================================================================================================================
 void Texture::bind( uint unit ) const
 {
-	if( unit>=(uint)r::max_texture_units )
+	if( unit>=(uint)r::maxTextureUnits )
 		WARNING("Max tex units passed");
 
 	glActiveTexture( GL_TEXTURE0+unit );

+ 3 - 3
src/resources/Texture.h

@@ -54,12 +54,12 @@ class Texture: public Resource
 
 		bool load( const char* filename );
 		void unload();
-		bool createEmpty2D( float width, float height, int internal_format, int format, GLenum type_ = GL_FLOAT );
-		bool createEmpty2DMSAA( float width, float height, int samples_num, int internal_format );
+		bool createEmpty2D( float width, float height, int internalFormat, int format, GLenum type_ = GL_FLOAT );
+		bool createEmpty2DMSAA( float width, float height, int samplesNum, int internalFormat );
 
 		void bind( uint unit=0 ) const;
 
-		inline void texParameter( GLenum param_name, GLint value ) const { bind(); glTexParameteri( GL_TEXTURE_2D, param_name, value ); }
+		inline void texParameter( GLenum paramName, GLint value ) const { bind(); glTexParameteri( GL_TEXTURE_2D, paramName, value ); }
 };
 
 

+ 6 - 6
src/scene/Camera.cpp

@@ -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;
@@ -149,7 +149,7 @@ bool Camera::insideFrustum( const Camera& cam ) const
 	points[1] = Vec3( -x, y, z ); // top left
 	points[2] = Vec3( -x, -y, z ); // bottom left
 	points[3] = Vec3( x, -y, z ); // bottom right
-	points[4] = Vec3( cam.translationWspace ); // eye (allready in world space)
+	points[4] = Vec3( cam.translationWspace ); // eye (already in world space)
 
 	// transform them to the given camera's world space (exept the eye)
 	for( uint i=0; i<4; i++ )
@@ -180,7 +180,7 @@ void Camera::calcProjectionMatrix()
 {
 	float f = 1.0/tan( fovY*0.5f ); // f = cot(fovY/2)
 
-	projectionMat(0,0) = f*fovY/fovX; // = f/aspect_ratio;
+	projectionMat(0,0) = f*fovY/fovX; // = f/aspectRatio;
 	projectionMat(0,1) = 0.0;
 	projectionMat(0,2) = 0.0;
 	projectionMat(0,3) = 0.0;
@@ -214,9 +214,9 @@ void Camera::updateViewMatrix()
 
 
 	// The view matrix is: Mview = camera.world_transform.Inverted(). Bus instead of inverting we do the following:
-	Mat3 cam_inverted_rot = rotationWspace.getTransposed();
-	Vec3 cam_inverted_tsl = -( cam_inverted_rot * translationWspace );
-	viewMat = Mat4( cam_inverted_tsl, cam_inverted_rot );
+	Mat3 camInvertedRot = rotationWspace.getTransposed();
+	Vec3 camInvertedTsl = -( camInvertedRot * translationWspace );
+	viewMat = Mat4( camInvertedTsl, camInvertedRot );
 }
 
 

+ 1 - 1
src/scene/Camera.h

@@ -20,7 +20,7 @@ class Camera: public Node
 		};
 
 		// Fovx is the angle in the y axis (imagine the cam positioned in the default OGL pos)
-		// Note that fovX > fovY (most of the time) and aspect_ratio = fovX/fovY
+		// Note that fovX > fovY (most of the time) and aspectRatio = fovX/fovY
 		// fovX and fovY in rad
 		float fovX, fovY;
 		float zNear, zFar;

+ 4 - 4
src/scene/Light.cpp

@@ -40,15 +40,15 @@ void Light::deinit()
 
 
 //=====================================================================================================================================
-// RenderSphere                                                                                                                       =
+// renderSphere                                                                                                                       =
 //=====================================================================================================================================
 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();
 }

+ 8 - 8
src/scene/MeshNode.cpp

@@ -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 )
@@ -56,7 +56,7 @@ void MeshNode::render( Material* mtl ) const
 		// then the attributes
 		DEBUG_ERR( !mtl->hasHWSkinning() ); // it has skel controller but no skinning
 
-		mesh->vbos.vertWeights.Bind();
+		mesh->vbos.vertWeights.bind();
 		glEnableVertexAttribArray( mtl->attribLocs.vertWeightBonesNum );
 		glVertexAttribPointer( mtl->attribLocs.vertWeightBonesNum, 1, GL_FLOAT, GL_FALSE, sizeof(Mesh::VertexWeight), BUFFER_OFFSET(0) );
 		glEnableVertexAttribArray( mtl->attribLocs.vertWeightBoneIds );
@@ -67,33 +67,33 @@ void MeshNode::render( Material* mtl ) const
 
 	if( mtl->attribLocs.position != -1 )
 	{
-		mesh->vbos.vertCoords.Bind();
+		mesh->vbos.vertCoords.bind();
 		glVertexAttribPointer( mtl->attribLocs.position, 3, GL_FLOAT, false, 0, NULL );
 		glEnableVertexAttribArray( mtl->attribLocs.position );
 	}
 
 	if( mtl->attribLocs.normal != -1 )
 	{
-		mesh->vbos.vertNormals.Bind();
+		mesh->vbos.vertNormals.bind();
 		glVertexAttribPointer( mtl->attribLocs.normal, 3, GL_FLOAT, false, 0, NULL );
 		glEnableVertexAttribArray( mtl->attribLocs.normal );
 	}
 
 	if( mtl->attribLocs.texCoords != -1 )
 	{
-		mesh->vbos.texCoords.Bind();
+		mesh->vbos.texCoords.bind();
 		glVertexAttribPointer( mtl->attribLocs.texCoords, 2, GL_FLOAT, false, 0, NULL );
 		glEnableVertexAttribArray( mtl->attribLocs.texCoords );
 	}
 
 	if( mtl->attribLocs.tanget != -1 )
 	{
-		mesh->vbos.vertTangents.Bind();
+		mesh->vbos.vertTangents.bind();
 		glVertexAttribPointer( mtl->attribLocs.tanget, 4, GL_FLOAT, false, 0, NULL );
 		glEnableVertexAttribArray( mtl->attribLocs.tanget );
 	}
 
-	mesh->vbos.vertIndeces.Bind();
+	mesh->vbos.vertIndeces.bind();
 
 	glDrawElements( GL_TRIANGLES, mesh->vertIndeces.size(), GL_UNSIGNED_SHORT, 0 );
 
@@ -110,6 +110,6 @@ void MeshNode::render( Material* mtl ) const
 		glDisableVertexAttribArray( mtl->attribLocs.vertWeightWeights );
 	}
 
-	vbo_t::UnbindAllTargets();
+	Vbo::unbindAllTargets();
 	glPopMatrix();
 }

+ 1 - 1
src/scene/MeshNode.h

@@ -25,7 +25,7 @@ class MeshNode: public Node
 		// funcs
 		MeshNode(): Node(NT_MESH), meshSkelCtrl(NULL) {}
 		virtual void render() { render(material); }
-		virtual void renderDepth() { render( material->dp_mtl ); }
+		virtual void renderDepth() { render( material->dpMtl ); }
 		void init( const char* filename );
 		void deinit();
 };

+ 3 - 3
src/scene/Node.h

@@ -58,9 +58,9 @@ class Node
 		virtual void deinit() = 0;
 		virtual void updateWorldStuff() { updateWorldTransform(); } ///< This update happens only when the object gets moved. Override it if you want more
 		void updateWorldTransform();
-		void rotateLocalX( float ang_degrees ) { rotationLspace.rotateXAxis( ang_degrees ); }
-		void rotateLocalY( float ang_degrees ) { rotationLspace.rotateYAxis( ang_degrees ); }
-		void rotateLocalZ( float ang_degrees ) { rotationLspace.rotateZAxis( ang_degrees ); }
+		void rotateLocalX( float angDegrees ) { rotationLspace.rotateXAxis( angDegrees ); }
+		void rotateLocalY( float angDegrees ) { rotationLspace.rotateYAxis( angDegrees ); }
+		void rotateLocalZ( float angDegrees ) { rotationLspace.rotateZAxis( angDegrees ); }
 		void moveLocalX( float distance );
 		void moveLocalY( float distance );
 		void moveLocalZ( float distance );

+ 4 - 4
src/scene/Scene.cpp

@@ -14,7 +14,7 @@ namespace Scene {
 DATA                                                                                                                                  =
 =======================================================================================================================================
 */
-skybox_t skybox;
+Skybox skybox;
 
 NodeContainer     nodes;
 LightContainer    lights;
@@ -28,15 +28,15 @@ Vec<Controller*> controllers;
 //=====================================================================================================================================
 // Static template funcs                                                                                                              =
 //=====================================================================================================================================
-template<typename container_Type, typename Type> static void PutBackNode( container_Type& container, Type* x )
+template<typename ContainerType, typename Type> static void PutBackNode( ContainerType& container, Type* x )
 {
 	DEBUG_ERR( std::find( container.begin(), container.end(), x ) != container.end() );
 	container.push_back( x );
 }
 
-template<typename container_Type, typename Type> static void EraseNode( container_Type& container, Type* x )
+template<typename ContainerType, typename Type> static void EraseNode( ContainerType& container, Type* x )
 {
-	typename container_Type::iterator it = std::find( container.begin(), container.end(), x );
+	typename ContainerType::iterator it = std::find( container.begin(), container.end(), x );
 	DEBUG_ERR( it == container.end() );
 	container.erase( it );
 }

+ 1 - 1
src/scene/Scene.h

@@ -16,7 +16,7 @@ class Controller;
 namespace Scene {
 
 // misc
-extern skybox_t skybox;
+extern Skybox skybox;
 inline Vec3 getAmbientColor() { return Vec3( 0.1, 0.05, 0.05 )*1; }
 inline Vec3 getSunPos() { return Vec3( 0.0, 1.0, -1.0 ) * 50.0; }
 

+ 1 - 1
src/scene/SkelNode.cpp

@@ -40,7 +40,7 @@ void SkelNode::deinit()
 void SkelNode::render()
 {
 	glPushMatrix();
-	r::MultMatrix( transformationWspace );
+	r::multMatrix( transformationWspace );
 
 	//glPointSize( 4.0f );
 	//glLineWidth( 2.0f );

+ 53 - 53
src/tokenizer/Scanner.cpp

@@ -188,7 +188,7 @@ char Scanner::putBackChar()
 //=====================================================================================================================================
 string Scanner::getTokenInfo( const Token& token )
 {
-	char token_info_str[256];
+	char tokenInfoStr[256];
 	switch( token.code )
 	{
 		case TC_COMMENT:
@@ -198,31 +198,31 @@ string Scanner::getTokenInfo( const Token& token )
 		case TC_EOF:
 			return "end of file";
 		case TC_STRING:
-			sprintf( token_info_str, "string \"%s\"", token.value.string );
+			sprintf( tokenInfoStr, "string \"%s\"", token.value.string );
 			break;
 		case TC_CHAR:
-			sprintf( token_info_str, "char '%c' (\"%s\")", token.value.char_, token.asString );
+			sprintf( tokenInfoStr, "char '%c' (\"%s\")", token.value.char_, token.asString );
 			break;
 		case TC_NUMBER:
 			if( token.type == DT_FLOAT )
-				sprintf( token_info_str, "float %f or %e (\"%s\")", token.value.float_, token.value.float_, token.asString );
+				sprintf( tokenInfoStr, "float %f or %e (\"%s\")", token.value.float_, token.value.float_, token.asString );
 			else
-				sprintf( token_info_str, "int %lu (\"%s\")", token.value.int_, token.asString );
+				sprintf( tokenInfoStr, "int %lu (\"%s\")", token.value.int_, token.asString );
 			break;
 		case TC_IDENTIFIER:
-			sprintf( token_info_str, "identifier \"%s\"", token.value.string );
+			sprintf( tokenInfoStr, "identifier \"%s\"", token.value.string );
 			break;
 		case TC_ERROR:
 			return "scanner error";
 			break;
 		default:
 			if( token.code>=TC_KE && token.code<=TC_KEYWORD )
-				sprintf( token_info_str, "reserved word \"%s\"", token.value.string );
+				sprintf( tokenInfoStr, "reserved word \"%s\"", token.value.string );
 			else if( token.code>=TC_SCOPERESOLUTION && token.code<=TC_ASSIGNOR )
-				sprintf( token_info_str, "operator no %d", token.code - TC_SCOPERESOLUTION );
+				sprintf( tokenInfoStr, "operator no %d", token.code - TC_SCOPERESOLUTION );
 	}
 
-	return string(token_info_str);
+	return string(tokenInfoStr);
 }
 
 
@@ -388,20 +388,20 @@ CHECKERS (bellow only checkers)
 //=====================================================================================================================================
 bool Scanner::checkWord()
 {
-	char* tmp_str = crntToken.asString;
+	char* tmpStr = crntToken.asString;
 	char ch = *pchar;
 
 	//build the string
 	do
 	{
-		*tmp_str++ = ch;
+		*tmpStr++ = ch;
 		ch = getNextChar();
 	}while ( asciiLookup(ch)==AC_LETTER || asciiLookup(ch)==AC_DIGIT );
 
-	*tmp_str = '\0'; // finalize it
+	*tmpStr = '\0'; // finalize it
 
 	//check if reserved
-	int len = tmp_str-crntToken.asString;
+	int len = tmpStr-crntToken.asString;
 	crntToken.code = TC_IDENTIFIER;
 	crntToken.value.string = crntToken.asString;
 	crntToken.type = DT_STR; // not important
@@ -447,14 +447,14 @@ bool Scanner::checkComment()
 	// multi-line comment
 	branchy_cmnt:
 		if( getNextChar()=='*' )
-			goto finalize_branchy;
+			goto finalizeBranchy;
 		else if( *pchar==eofChar )
 			goto error;
 		else
 			goto branchy_cmnt;
 
 	// multi-line "branchy"
-	finalize_branchy:
+	finalizeBranchy:
 		if( getNextChar()=='/' )
 		{
 			crntToken.code = TC_COMMENT;
@@ -481,9 +481,9 @@ bool Scanner::checkNumber()
 	long num = 0;      // value of the number & part of the float num before '.'
 	long fnum = 0;     // part of the float num after '.'
 	long dad = 0;      // digits after dot (for floats)
-	bool exp_sign = 0; // exponent sign in case float is represented in mant/exp format. 0 means positive and 1 negative
+	bool expSign = 0; // exponent sign in case float is represented in mant/exp format. 0 means positive and 1 negative
 	long exp = 0;      // the exponent in case float is represented in mant/exp format
-	char* tmp_str = crntToken.asString;
+	char* tmpStr = crntToken.asString;
 	crntToken.type = DT_INT;
 	uint asc;
 
@@ -502,7 +502,7 @@ bool Scanner::checkNumber()
 
 	// 0????
 	_0:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 		if ( *pchar == 'x' || *pchar == 'X' )
@@ -523,7 +523,7 @@ bool Scanner::checkNumber()
 
 	// 0x????
 	_0x:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 		if( (asc == AC_DIGIT)  ||
@@ -545,7 +545,7 @@ bool Scanner::checkNumber()
 
 	// 0x{0-9 || a-f}??
 	_0x0_9orA_F:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 		if( (asc == AC_DIGIT)         ||
@@ -569,7 +569,7 @@ bool Scanner::checkNumber()
 
 	// {0-9}
 	_0_9:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 		if( asc == AC_DIGIT )
@@ -588,7 +588,7 @@ bool Scanner::checkNumber()
 
 	// {0-9}.??
 	_float:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 		crntToken.type = DT_FLOAT;
@@ -600,7 +600,7 @@ bool Scanner::checkNumber()
 		}
 		else if( *pchar == '.' )
 		{
-			*tmp_str++ = *pchar;
+			*tmpStr++ = *pchar;
 			getNextChar();
 			goto error;
 		}
@@ -617,7 +617,7 @@ bool Scanner::checkNumber()
 
 	// [{0-9}].[{0-9}]f??
 	_0_9_dot_0_9_f:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 
@@ -628,15 +628,15 @@ bool Scanner::checkNumber()
 
 	// [{0-9}].[{0-9}]e??
 	_0_9_dot_0_9_e:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 		crntToken.type = DT_FLOAT;
 
 		if( *pchar == '+' || *pchar == '-' )
 		{
-			if( *pchar == '-' ) exp_sign = 1;
-			//*tmp_str++ = *pchar; getNextChar();
+			if( *pchar == '-' ) expSign = 1;
+			//*tmpStr++ = *pchar; getNextChar();
 			goto _0_9_dot_0_9_e_sign;
 		}
 		else if( asc == AC_DIGIT )
@@ -650,7 +650,7 @@ bool Scanner::checkNumber()
 	// [{0-9}].[{0-9}]e{+,-}??
 	// After the sign we want number
 	_0_9_dot_0_9_e_sign:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 
@@ -665,7 +665,7 @@ bool Scanner::checkNumber()
 	// [{0-9}].[{0-9}]e{+,-}{0-9}??
 	// After the number in exponent we want other number or we finalize
 	_0_9_dot_0_9_e_sign_0_9:
-		*tmp_str++ = *pchar;
+		*tmpStr++ = *pchar;
 		getNextChar();
 		asc = asciiLookup(*pchar);
 
@@ -692,13 +692,13 @@ bool Scanner::checkNumber()
 			double dbl = (double)num + (double)(pow(10, -dad)*fnum);
 			if( exp != 0 ) // if we have exponent
 			{
-				if( exp_sign == 1 ) exp = -exp; // change the sign if necessary
+				if( expSign == 1 ) exp = -exp; // change the sign if necessary
 				dbl = dbl * pow( 10, exp );
 			}
 
 			crntToken.value.float_ = dbl;
 		}
-		*tmp_str = '\0';
+		*tmpStr = '\0';
 		return true;
 
 	//error
@@ -709,11 +709,11 @@ bool Scanner::checkNumber()
 		asc = asciiLookup(*pchar);
 		while( asc!=AC_WHITESPACE && asc!=AC_SPECIAL && asc!=AC_EOF )
 		{
-			*tmp_str++ = *pchar;
+			*tmpStr++ = *pchar;
 			asc = asciiLookup(getNextChar());
 		}
 
-		*tmp_str = '\0';
+		*tmpStr = '\0';
 		SERROR( "Bad number suffix \"" << crntToken.asString << '\"' );
 
 	return false;
@@ -725,7 +725,7 @@ bool Scanner::checkNumber()
 //=====================================================================================================================================
 bool Scanner::checkString()
 {
-	char* tmp_str = crntToken.asString;
+	char* tmpStr = crntToken.asString;
 	char ch = getNextChar();
 
 	for(;;)
@@ -734,7 +734,7 @@ bool Scanner::checkString()
 		if( ch=='\0' || ch==eofChar ) // if end of line or eof
 		{
 			crntToken.code = TC_ERROR;
-			*tmp_str = '\0';
+			*tmpStr = '\0';
 			SERROR( "Incorect string ending \"" << crntToken.asString );
 			return false;
 		}
@@ -745,32 +745,32 @@ bool Scanner::checkString()
 			if( ch=='\0' || ch==eofChar )
 			{
 				crntToken.code = TC_ERROR;
-				*tmp_str = '\0';
+				*tmpStr = '\0';
 				SERROR( "Incorect string ending \"" << crntToken.asString << '\"' );
 				return false;
 			}
 
 			switch( ch )
 			{
-				case 'n' : *tmp_str++ = '\n'; break;
-				case 't' : *tmp_str++ = '\t'; break;
-				case '0' : *tmp_str++ = '\0'; break;
-				case 'a' : *tmp_str++ = '\a'; break;
-				case '\"': *tmp_str++ = '\"'; break;
-				case 'f' : *tmp_str++ = '\f'; break;
-				case 'v' : *tmp_str++ = '\v'; break;
-				case '\'': *tmp_str++ = '\''; break;
-				case '\\': *tmp_str++ = '\\'; break;
-				case '\?': *tmp_str++ = '\?'; break;
+				case 'n' : *tmpStr++ = '\n'; break;
+				case 't' : *tmpStr++ = '\t'; break;
+				case '0' : *tmpStr++ = '\0'; break;
+				case 'a' : *tmpStr++ = '\a'; break;
+				case '\"': *tmpStr++ = '\"'; break;
+				case 'f' : *tmpStr++ = '\f'; break;
+				case 'v' : *tmpStr++ = '\v'; break;
+				case '\'': *tmpStr++ = '\''; break;
+				case '\\': *tmpStr++ = '\\'; break;
+				case '\?': *tmpStr++ = '\?'; break;
 				default  :
 					SERROR( "Unrecognized escape charachter \'\\" << ch << '\'' );
-					*tmp_str++ = ch;
+					*tmpStr++ = ch;
 			}
 		}
 		//End
 		else if( ch=='\"' )
 		{
-			*tmp_str = '\0';
+			*tmpStr = '\0';
 			crntToken.code = TC_STRING;
 			crntToken.value.string = crntToken.asString;
 			getNextChar();
@@ -779,7 +779,7 @@ bool Scanner::checkString()
 		//Build str( main loop )
 		else
 		{
-			*tmp_str++ = ch;
+			*tmpStr++ = ch;
 		}
 
 		ch = getNextChar();
@@ -796,10 +796,10 @@ bool Scanner::checkChar()
 {
 	char ch = getNextChar();
 	char ch0 = ch;
-	char* tmp_str = crntToken.asString;
+	char* tmpStr = crntToken.asString;
 
 	crntToken.code = TC_ERROR;
-	*tmp_str++ = ch;
+	*tmpStr++ = ch;
 
 	if( ch=='\0' || ch==eofChar ) // check char after '
 	{
@@ -817,7 +817,7 @@ bool Scanner::checkChar()
 	if (ch=='\\')                // if \ then maybe escape char
 	{
 		ch = getNextChar();
-		*tmp_str++ = ch;
+		*tmpStr++ = ch;
 		if( ch=='\0' || ch==eofChar ) //check again after the \.
 		{
 			SERROR( "Newline in constant" );
@@ -848,7 +848,7 @@ bool Scanner::checkChar()
 	ch = getNextChar();
 	if( ch=='\'' )    //end
 	{
-		*tmp_str = '\0';
+		*tmpStr = '\0';
 		crntToken.code = TC_CHAR;
 		getNextChar();
 		return true;

+ 1 - 1
src/tokenizer/Scanner.h

@@ -144,7 +144,7 @@ class Scanner
 		bool  newlinesAsWhitespace; ///< Treat newlines as whitespace. This means that we extract new token for every line
 		/**
 		 * Used to keep track of the newlines in multiline comments so we can return the correct number of newlines in case of 
-		 * newlines_as_whitespace is false
+		 * newlinesAsWhitespace is false
 		 */
 		int     commentedLines;
 

+ 36 - 36
src/ui/Ui.cpp

@@ -13,17 +13,17 @@ namespace Ui {
 data members                                                                                                                          =
 =======================================================================================================================================
 */
-static Texture* font_map;
+static Texture* fontMap;
 
 static ShaderProg* shader;
 
-static float  initial_x;
-static float  font_w;
-static float  font_h;
+static float  initialX;
+static float  fontW;
+static float  fontH;
 static float  color[4];
 static bool   italic;
-static float  crnt_x;
-static float  crnt_y;
+static float  crntX;
+static float  crntY;
 
 
 
@@ -38,7 +38,7 @@ static funcs
 static void SetGL()
 {
 	shader->bind();
-	shader->locTexUnit( shader->GetUniLoc(0), *font_map, 0 );
+	shader->locTexUnit( shader->GetUniLoc(0), *fontMap, 0 );
 
 	glEnable( GL_BLEND );
 	glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
@@ -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();
@@ -74,20 +74,20 @@ static void RestoreGL()
 
 
 // DrawChar
-static void DrawChar( char c )
+static void drawChar( char c )
 {
 	// first check for special chars
 	if( c=='\n' ) // new line
 	{
 		//glTranslatef( initial_x, -font_h, 0.0f );
-		crnt_x = initial_x;
-		crnt_y -= font_h;
+		crntX = initialX;
+		crntY -= fontH;
 		return;
 	}
 	if( c=='\t' ) // tab
 	{
-		DrawChar( ' ' );
-		DrawChar( ' ' );
+		drawChar( ' ' );
+		drawChar( ' ' );
 		return;
 	}
 	if( c<' ' || c>'~' ) // out of range
@@ -95,28 +95,28 @@ static void DrawChar( char c )
 		c = '~'+1;
 	}
 
-	const int chars_per_line = 16; // the chars that font_map.tga has per line
-	const int lines_num       = 8; // the lines of chars in font_map.tga
+	const int charsPerLine = 16; // the chars that font_map.tga has per line
+	const int linesNum     = 8; // the lines of chars in font_map.tga
 
 	// the uvs
-	float char_width = 1.0f/float(chars_per_line);
-	float char_height = 1.0f/float(lines_num);
-	float uv_top = float(lines_num - (c-' ')/chars_per_line) / float(lines_num);
-	float uv_left = float( (c-' ')%chars_per_line ) / float(chars_per_line);
-	float uv_right = uv_left + char_width;
-	float uv_bottom = uv_top - char_height;
-	float uvs[4][2] = { {uv_left, uv_top}, {uv_left, uv_bottom}, {uv_right, uv_bottom}, {uv_right, uv_top} };
+	float charWidth = 1.0f/float(charsPerLine);
+	float charHeight = 1.0f/float(linesNum);
+	float uvTop = float(linesNum - (c-' ')/charsPerLine) / float(linesNum);
+	float uvLeft = float( (c-' ')%charsPerLine ) / float(charsPerLine);
+	float uvRight = uvLeft + charWidth;
+	float uvBottom = uvTop - charHeight;
+	float uvs[4][2] = { {uvLeft, uvTop}, {uvLeft, uvBottom}, {uvRight, uvBottom}, {uvRight, uvTop} };
 
 	// the coords
-	float fwh = font_w/2.0f;
-	float fhh = font_h/2.0f;
+	float fwh = fontW/2.0f;
+	float fhh = fontH/2.0f;
 	float coords[4][2] = { {-fwh, fhh}, {-fwh, -fhh}, {fwh, -fhh}, {fwh, fhh} }; // fron top left counterclockwise
 
 
 	if( italic )
 	{
-		coords[0][0] += font_w/5.0f;
-		coords[3][0] += font_w/5.0f;
+		coords[0][0] += fontW/5.0f;
+		coords[3][0] += fontW/5.0f;
 	}
 
 	glBegin(GL_QUADS);
@@ -143,7 +143,7 @@ static void DrawChar( char c )
 	glEnable( GL_TEXTURE_2D );*/
 	// end draw outline
 
-	crnt_x += font_w*0.8f;
+	crntX += fontW*0.8f;
 	//glTranslatef( font_w*0.8f, 0.0, 0.0 ); // font_w*(float) to remove the space
 }
 
@@ -159,8 +159,8 @@ non static funcs
 // exec after init SDL
 void init()
 {
-	font_map = rsrc::textures.load( "gfx/fontmapa.tga" );
-	font_map->texParameter( GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+	fontMap = rsrc::textures.load( "gfx/fontmapa.tga" );
+	fontMap->texParameter( GL_TEXTURE_MIN_FILTER, GL_LINEAR );
 	//font_map->texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
 	shader = rsrc::shaders.load( "shaders/txt.glsl" );
 	setPos( 0.0f, 0.0f );
@@ -175,9 +175,9 @@ void init()
 void setFontWidth( float w_ )
 {
 	// width
-	font_w = w_;
+	fontW = w_;
 	// height
-	font_h = font_w * r::aspect_ratio;
+	fontH = fontW * r::aspectRatio;
 }
 
 
@@ -191,8 +191,8 @@ void setColor( const Vec4& color_ )
 // setPos
 void setPos( float x_, float y_ )
 {
-	initial_x = crnt_x = x_;
-	crnt_y = y_;
+	initialX = crntX = x_;
+	crntY = y_;
 }
 
 
@@ -214,12 +214,12 @@ void printf( const char* format, ... )
 void print( const char* text )
 {
 	SetGL();
-	glTranslatef( crnt_x, crnt_y, 0.0f );
+	glTranslatef( crntX, crntY, 0.0f );
 	for( char* pc=const_cast<char*>(text); *pc!='\0'; pc++ )
 	{
 		glLoadIdentity();
-		glTranslatef( crnt_x, crnt_y, 0.0f );
-		DrawChar( *pc );
+		glTranslatef( crntX, crntY, 0.0f );
+		drawChar( *pc );
 	}
 	RestoreGL();
 }

+ 6 - 6
src/uncategorized/collision.cpp

@@ -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();

+ 3 - 3
src/uncategorized/particles.cpp

@@ -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

@@ -29,7 +29,7 @@ static float coords [][4][3] =
 load                                                                                                                                  =
 =======================================================================================================================================
 */
-bool skybox_t::load( const char* filenames[6] )
+bool Skybox::load( const char* filenames[6] )
 {
 	for( int i=0; i<6; i++ )
 	{
@@ -51,7 +51,7 @@ bool skybox_t::load( const char* filenames[6] )
 render                                                                                                                                =
 =======================================================================================================================================
 */
-void skybox_t::Render( const Mat3& rotation )
+void Skybox::Render( const Mat3& rotation )
 {
 	//glDisable( GL_DEPTH_TEST );
 	glDisable( GL_BLEND );

+ 2 - 2
src/uncategorized/skybox.h

@@ -7,7 +7,7 @@
 
 class ShaderProg;
 
-class skybox_t
+class Skybox
 {
 	protected:
 		enum textures_e
@@ -27,7 +27,7 @@ class skybox_t
 		float rotation_ang;
 
 	public:
-		skybox_t() { rotation_ang=0.0; }
+		Skybox() { rotation_ang=0.0; }
 
 		bool load( const char* filenames[6] );
 		void Render( const Mat3& rotation );

+ 2 - 2
src/utility/Input.cpp

@@ -81,7 +81,7 @@ void handleEvents()
 
 			case SDL_MOUSEMOTION:
 			{
-				Vec2 prev_mouse_pos_ndc( mousePosNdc );
+				Vec2 prevMousePosNdc( mousePosNdc );
 
 				mousePos.x = event_.button.x;
 				mousePos.y = event_.button.y;
@@ -98,7 +98,7 @@ void handleEvents()
 					SDL_WarpMouse( App::windowW/2, App::windowH/2);
 				}
 
-				mouseVelocity = mousePosNdc - prev_mouse_pos_ndc;
+				mouseVelocity = mousePosNdc - prevMousePosNdc;
 				break;
 			}
 

+ 8 - 8
src/utility/Util.cpp

@@ -24,10 +24,10 @@ float randRange( float min, float max )
 	int precision = 1000; // more accurate
 
 	mant *= precision;
-	double new_mant = rand() % (int)mant;
-	new_mant /= precision;
+	double newMant = rand() % (int)mant;
+	newMant /= precision;
 
-	return min + (float)ldexp( new_mant, exp ); // return min + (new_mant * e^exp)
+	return min + (float)ldexp( newMant, exp ); // return min + (new_mant * e^exp)
 }
 
 
@@ -99,9 +99,9 @@ string getPath( const char* path )
 	++str;
 	int n = str - path;
 	DEBUG_ERR( n<0 || n>100 ); // check the func. probably something wrong
-	string ret_str;
-	ret_str.assign( path, n );
-	return ret_str;
+	string retStr;
+	retStr.assign( path, n );
+	return retStr;
 }
 
 
@@ -109,9 +109,9 @@ string getPath( const char* path )
 // getFunctionFromPrettyFunction                                                                                                      =
 //=====================================================================================================================================
 /// The function gets __PRETTY_FUNCTION__ and strips it to get only the function name with its namespace
-string getFunctionFromPrettyFunction( const char* pretty_function )
+string getFunctionFromPrettyFunction( const char* prettyFunction )
 {
-	string ret( pretty_function );
+	string ret( prettyFunction );
 
 	size_t index = ret.find( "(" );