Просмотр исходного кода

- Added a new script in build dir for external libs update. Nothing special
- Working on the new version of renderer
- Unimportand changes in the Scanner

Panagiotis Christopoulos Charitos 15 лет назад
Родитель
Сommit
45a90af67d

+ 2 - 1
build/README

@@ -12,7 +12,8 @@ build system that generates GNU makefiles.
 	- GLEW
 
 	So before generating makefiles or building AnKi you have to download from
-	their repositories and build the above libraries. Instructions follow:
+	their repositories and build the above libraries. Instructions follow. You can
+	alternately use the script download-and-build-externals.sh
 	
 
 1.1) Bullet Physics Library

+ 550 - 27
build/debug/Makefile

@@ -4,8 +4,8 @@ PHFLAGS = -c -pedantic-errors -pedantic -ansi -Wall -Wextra -W -pipe -O0 -g3 -pg
 LFLAGS = -rdynamic -L../../../SDL-hg/build/.libs -L../../../glew/lib -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 -lSDL -Wl,-Bdynamic -lGL -ljpeg -lpng -ltiff
 EXECUTABLE = AnKi.bin
 INCPATH = -I../../src/Math/ -I../../src/Util/Tokenizer/ -I../../src/Misc/ -I../../src/ -I../../src/Renderer/ -I../../src/Scene/ -I../../src/Ui/ -I../../src/Resources/ -I../../src/Util/ -I../../src/Scene/Controllers/ -I../../src/Physics/ -I../../src/Renderer/BufferObjects/ -I../../src/Renderer2/ -I../../../bullet_svn/src/ -I../../../SDL-hg/include -I../../glew/include 
-SOURCES = ../../src/Util/Tokenizer//Scanner.cpp ../../src/Misc//skybox.cpp ../../src/Misc//particles.cpp ../../src/Misc//memory.cpp ../../src/Misc//collision.cpp ../../src/Misc//map.cpp ../../src//Main.cpp ../../src/Renderer//PpsHdr.cpp ../../src/Renderer//Pps.cpp ../../src/Renderer//Bs.cpp ../../src/Renderer//IsShadows.cpp ../../src/Renderer//MsEarlyz.cpp ../../src/Renderer//Renderer.cpp ../../src/Renderer//Is.cpp ../../src/Renderer//PpsLscatt.cpp ../../src/Renderer//Ms.cpp ../../src/Renderer//BulletDebuger.cpp ../../src/Renderer//Bs2.cpp ../../src/Renderer//PpsSsao.cpp ../../src/Renderer//Dbg.cpp ../../src/Scene//MeshNode.cpp ../../src/Scene//SkelNode.cpp ../../src/Scene//SkelModelNode.cpp ../../src/Scene//Light.cpp ../../src/Scene//Camera.cpp ../../src/Scene//Scene.cpp ../../src/Scene//ParticleEmitter.cpp ../../src/Scene//SceneNode.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//Skeleton.cpp ../../src/Resources//ShaderPrePreprocessor.cpp ../../src/Resources//Resource.cpp ../../src/Resources//LightProps.cpp ../../src/Resources//Mesh.cpp ../../src/Util//Input.cpp ../../src/Util//App.cpp ../../src/Util//Common.cpp ../../src/Util//Util.cpp ../../src/Scene/Controllers//Controller.cpp ../../src/Scene/Controllers//SkelAnimCtrl.cpp ../../src/Physics//PhyWorld.cpp ../../src/Renderer2//Ms.cpp ../../src/Renderer2//Hdr.cpp ../../src/Renderer2//Ssao.cpp ../../src/Renderer2//Renderer.cpp 
-OBJECTS = Scanner.o skybox.o particles.o memory.o collision.o map.o Main.o PpsHdr.o Pps.o Bs.o IsShadows.o MsEarlyz.o Renderer.o Is.o PpsLscatt.o Ms.o BulletDebuger.o Bs2.o PpsSsao.o Dbg.o MeshNode.o SkelNode.o SkelModelNode.o Light.o Camera.o Scene.o ParticleEmitter.o SceneNode.o Ui.o Material.o ShaderProg.o Texture.o SkelAnim.o Extension.o Skeleton.o ShaderPrePreprocessor.o Resource.o LightProps.o Mesh.o Input.o App.o Common.o Util.o Controller.o SkelAnimCtrl.o PhyWorld.o 36.Ms.o Hdr.o Ssao.o 60.Renderer.o 
+SOURCES = ../../src/Util/Tokenizer//Scanner.cpp ../../src/Misc//skybox.cpp ../../src/Misc//particles.cpp ../../src/Misc//memory.cpp ../../src/Misc//collision.cpp ../../src/Misc//map.cpp ../../src//Main.cpp ../../src/Renderer//PpsHdr.cpp ../../src/Renderer//Pps.cpp ../../src/Renderer//Bs.cpp ../../src/Renderer//IsShadows.cpp ../../src/Renderer//MsEarlyz.cpp ../../src/Renderer//Renderer.cpp ../../src/Renderer//Is.cpp ../../src/Renderer//PpsLscatt.cpp ../../src/Renderer//Ms.cpp ../../src/Renderer//BulletDebuger.cpp ../../src/Renderer//Bs2.cpp ../../src/Renderer//PpsSsao.cpp ../../src/Renderer//Dbg.cpp ../../src/Scene//MeshNode.cpp ../../src/Scene//SkelNode.cpp ../../src/Scene//SkelModelNode.cpp ../../src/Scene//Light.cpp ../../src/Scene//Camera.cpp ../../src/Scene//Scene.cpp ../../src/Scene//ParticleEmitter.cpp ../../src/Scene//SceneNode.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//Skeleton.cpp ../../src/Resources//ShaderPrePreprocessor.cpp ../../src/Resources//Resource.cpp ../../src/Resources//LightProps.cpp ../../src/Resources//Mesh.cpp ../../src/Util//Input.cpp ../../src/Util//App.cpp ../../src/Util//Common.cpp ../../src/Util//Util.cpp ../../src/Scene/Controllers//Controller.cpp ../../src/Scene/Controllers//SkelAnimCtrl.cpp ../../src/Physics//PhyWorld.cpp ../../src/Renderer2//Ms.cpp ../../src/Renderer2//Hdr.cpp ../../src/Renderer2//Is.cpp ../../src/Renderer2//Ssao.cpp ../../src/Renderer2//Renderer.cpp ../../src/Renderer2//Sm.cpp 
+OBJECTS = Scanner.o skybox.o particles.o memory.o collision.o map.o Main.o PpsHdr.o Pps.o Bs.o IsShadows.o MsEarlyz.o Renderer.o Is.o PpsLscatt.o Ms.o BulletDebuger.o Bs2.o PpsSsao.o Dbg.o MeshNode.o SkelNode.o SkelModelNode.o Light.o Camera.o Scene.o ParticleEmitter.o SceneNode.o Ui.o Material.o ShaderProg.o Texture.o SkelAnim.o Extension.o Skeleton.o ShaderPrePreprocessor.o Resource.o LightProps.o Mesh.o Input.o App.o Common.o Util.o Controller.o SkelAnimCtrl.o PhyWorld.o 50.Ms.o Hdr.o 1.Is.o Ssao.o 36.Renderer.o Sm.o 
 PRECOMPILED_HEADERS = 
 
 all: $(PRECOMPILED_HEADERS) $(SOURCES) $(EXECUTABLE)
@@ -175,7 +175,30 @@ skybox.o: ../../src/Misc//skybox.cpp ../../src/Misc//skybox.h \
  ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
  ../../src/Physics/PhyConversions.h ../../src/Physics/MotionState.h \
  ../../src/Scene/SceneNode.h ../../src/Physics/PhyWorld.h \
- ../../src/Util/App.h
+ ../../src/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Misc//skybox.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Misc//skybox.cpp -o skybox.o
 
@@ -263,10 +286,28 @@ Main.o: ../../src//Main.cpp ../../src/Util/Common.h \
  ../../../SDL-hg/include/SDL_platform.h \
  ../../../SDL-hg/include/begin_code.h \
  ../../../SDL-hg/include/close_code.h ../../src/Util/Common.h \
- ../../src/Util/App.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/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_atomic.h \
+ ../../../SDL-hg/include/SDL_audio.h ../../../SDL-hg/include/SDL_error.h \
+ ../../../SDL-hg/include/SDL_endian.h ../../../SDL-hg/include/SDL_mutex.h \
+ ../../../SDL-hg/include/SDL_thread.h ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.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 \
@@ -772,7 +813,31 @@ Bs.o: ../../src/Renderer//Bs.cpp ../../src/Renderer//Renderer.h \
  ../../src/Renderer/BufferObjects/BufferObject.h \
  ../../src/Resources/Resource.h ../../src/Renderer/BufferObjects/Fbo.h \
  ../../src/Scene/MeshNode.h ../../src/Resources/Material.h \
- ../../src/Resources/ShaderProg.h ../../src/Util/App.h
+ ../../src/Resources/ShaderProg.h ../../src/Util/App.h \
+ ../../../SDL-hg/include/SDL.h ../../../SDL-hg/include/SDL_main.h \
+ ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Renderer//Bs.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer//Bs.cpp -o Bs.o
 
@@ -932,7 +997,31 @@ IsShadows.o: ../../src/Renderer//IsShadows.cpp \
  ../../src/Scene/SceneNode.h ../../src/Physics/PhyWorld.h \
  ../../src/Resources/Resource.h ../../src/Renderer/BufferObjects/Fbo.h \
  ../../src/Resources/Material.h ../../src/Resources/ShaderProg.h \
- ../../src/Scene/MeshNode.h ../../src/Util/App.h
+ ../../src/Scene/MeshNode.h ../../src/Util/App.h \
+ ../../../SDL-hg/include/SDL.h ../../../SDL-hg/include/SDL_main.h \
+ ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Renderer//IsShadows.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer//IsShadows.cpp -o IsShadows.o
 
@@ -1248,7 +1337,30 @@ Renderer.o: ../../src/Renderer//Renderer.cpp \
  ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
  ../../src/Physics/PhyConversions.h ../../src/Physics/MotionState.h \
  ../../src/Scene/SceneNode.h ../../src/Physics/PhyWorld.h \
- ../../src/Util/App.h
+ ../../src/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Renderer//Renderer.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer//Renderer.cpp -o Renderer.o
 
@@ -1409,7 +1521,30 @@ Is.o: ../../src/Renderer//Is.cpp ../../src/Renderer//Renderer.h \
  ../../src/Renderer/BufferObjects/BufferObject.h ../../src/Scene/Light.h \
  ../../src/Scene/Camera.h ../../src/Resources/Resource.h \
  ../../src/Renderer/BufferObjects/Fbo.h ../../src/Resources/LightProps.h \
- ../../src/Util/App.h
+ ../../src/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Renderer//Is.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer//Is.cpp -o Is.o
 
@@ -1567,7 +1702,31 @@ PpsLscatt.o: ../../src/Renderer//PpsLscatt.cpp \
  ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
  ../../src/Physics/PhyConversions.h ../../src/Physics/MotionState.h \
  ../../src/Scene/SceneNode.h ../../src/Physics/PhyWorld.h \
- ../../src/Renderer/BufferObjects/Fbo.h ../../src/Util/App.h
+ ../../src/Renderer/BufferObjects/Fbo.h ../../src/Util/App.h \
+ ../../../SDL-hg/include/SDL.h ../../../SDL-hg/include/SDL_main.h \
+ ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Renderer//PpsLscatt.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer//PpsLscatt.cpp -o PpsLscatt.o
 
@@ -1728,7 +1887,30 @@ Ms.o: ../../src/Renderer//Ms.cpp ../../src/Renderer//Renderer.h \
  ../../src/Renderer/BufferObjects/BufferObject.h \
  ../../src/Renderer/BufferObjects/Fbo.h ../../src/Resources/Material.h \
  ../../src/Resources/ShaderProg.h ../../src/Scene/MeshNode.h \
- ../../src/Util/App.h
+ ../../src/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Renderer//Ms.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer//Ms.cpp -o Ms.o
 
@@ -1918,7 +2100,31 @@ Bs2.o: ../../src/Renderer//Bs2.cpp ../../src/Renderer//Renderer.h \
  ../../src/Renderer/BufferObjects/BufferObject.h \
  ../../src/Resources/Resource.h ../../src/Renderer/BufferObjects/Fbo.h \
  ../../src/Scene/MeshNode.h ../../src/Resources/Material.h \
- ../../src/Resources/ShaderProg.h ../../src/Util/App.h
+ ../../src/Resources/ShaderProg.h ../../src/Util/App.h \
+ ../../../SDL-hg/include/SDL.h ../../../SDL-hg/include/SDL_main.h \
+ ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Renderer//Bs2.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer//Bs2.cpp -o Bs2.o
 
@@ -2233,7 +2439,30 @@ Dbg.o: ../../src/Renderer//Dbg.cpp ../../src/Renderer//Renderer.h \
  ../../src/Physics/PhyConversions.h ../../src/Physics/MotionState.h \
  ../../src/Scene/SceneNode.h ../../src/Physics/PhyWorld.h \
  ../../src/Scene/SkelNode.h ../../src/Scene/Controllers/Controller.h \
- ../../src/Util/App.h ../../src/Physics/PhyCommon.h
+ ../../src/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h ../../src/Physics/PhyCommon.h
 	@echo Compiling ../../src/Renderer//Dbg.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer//Dbg.cpp -o Dbg.o
 
@@ -2670,8 +2899,32 @@ ParticleEmitter.o: ../../src/Scene//ParticleEmitter.cpp \
  ../../src/Physics/PhyWorld.h ../../src/Renderer/Renderer.h \
  ../../src/Resources/ShaderProg.h ../../src/Scene/Camera.h \
  ../../src/Misc/collision.h ../../src/Scene/SceneNode.h \
- ../../src/Util/App.h ../../src/Scene//Scene.h ../../src/Misc/skybox.h \
- ../../src/Resources/Texture.h ../../src/Physics/PhyWorld.h
+ ../../src/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h ../../src/Scene//Scene.h \
+ ../../src/Misc/skybox.h ../../src/Resources/Texture.h \
+ ../../src/Physics/PhyWorld.h
 	@echo Compiling ../../src/Scene//ParticleEmitter.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Scene//ParticleEmitter.cpp -o ParticleEmitter.o
 
@@ -2828,9 +3081,32 @@ SceneNode.o: ../../src/Scene//SceneNode.cpp ../../src/Scene//SceneNode.h \
  ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
  ../../src/Physics/PhyConversions.h ../../src/Physics/MotionState.h \
  ../../src/Scene/SceneNode.h ../../src/Physics/PhyWorld.h \
- ../../src/Util/App.h
-	@echo Compiling ../../src/Scene//SceneNode.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Scene//SceneNode.cpp -o SceneNode.o
+ ../../src/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
+	@echo Compiling ../../src/Scene//SceneNode.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Scene//SceneNode.cpp -o SceneNode.o
 
 Ui.o: ../../src/Ui//Ui.cpp ../../src/Ui//Ui.h ../../src/Util/Common.h \
  ../../src/Misc/memory.h ../../src/Renderer/Renderer.h \
@@ -3419,7 +3695,30 @@ Controller.o: ../../src/Scene/Controllers//Controller.cpp \
  ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
  ../../src/Physics/PhyConversions.h ../../src/Physics/MotionState.h \
  ../../src/Scene/SceneNode.h ../../src/Physics/PhyWorld.h \
- ../../src/Util/App.h
+ ../../src/Util/App.h ../../../SDL-hg/include/SDL.h \
+ ../../../SDL-hg/include/SDL_main.h ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h
 	@echo Compiling ../../src/Scene/Controllers//Controller.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Scene/Controllers//Controller.cpp -o Controller.o
 
@@ -3598,7 +3897,7 @@ PhyWorld.o: ../../src/Physics//PhyWorld.cpp ../../src/Physics//PhyWorld.h \
 	@echo Compiling ../../src/Physics//PhyWorld.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Physics//PhyWorld.cpp -o PhyWorld.o
 
-36.Ms.o: ../../src/Renderer2//Ms.cpp ../../src/Renderer2//Renderer.hpp \
+50.Ms.o: ../../src/Renderer2//Ms.cpp ../../src/Renderer2//Renderer.hpp \
  ../../src/Util/Common.h ../../src/Misc/memory.h ../../src/Math/Math.h \
  ../../src/Math/Vec2.h ../../src/Math/MathForwardDecls.h \
  ../../src/Math/Vec2.inl.h ../../src/Math/MathDfltHeader.h \
@@ -3614,8 +3913,32 @@ PhyWorld.o: ../../src/Physics//PhyWorld.cpp ../../src/Physics//PhyWorld.h \
  ../../src/Resources/Texture.h ../../src/Resources/Resource.h \
  ../../src/Util/Util.h ../../src/Util/Common.h \
  ../../src/Resources/ShaderProg.h ../../src/Util/App.h \
- ../../src/Scene/Scene.h ../../src/Misc/skybox.h \
- ../../src/Physics/PhyWorld.h ../../src/Physics/PhyCommon.h \
+ ../../../SDL-hg/include/SDL.h ../../../SDL-hg/include/SDL_main.h \
+ ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h ../../src/Scene/Scene.h \
+ ../../src/Misc/skybox.h ../../src/Physics/PhyWorld.h \
+ ../../src/Physics/PhyCommon.h \
  ../../../bullet_svn/src/btBulletCollisionCommon.h \
  ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
  ../../../bullet_svn/src/LinearMath/btVector3.h \
@@ -3754,7 +4077,7 @@ PhyWorld.o: ../../src/Physics//PhyWorld.cpp ../../src/Physics//PhyWorld.h \
  ../../src/Scene/SceneNode.h ../../src/Scene/MeshNode.h \
  ../../src/Resources/Material.h ../../src/Resources/ShaderProg.h
 	@echo Compiling ../../src/Renderer2//Ms.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer2//Ms.cpp -o 36.Ms.o
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer2//Ms.cpp -o 50.Ms.o
 
 Hdr.o: ../../src/Renderer2//Hdr.cpp ../../src/Renderer2//Renderer.hpp \
  ../../src/Util/Common.h ../../src/Misc/memory.h ../../src/Math/Math.h \
@@ -3775,6 +4098,25 @@ Hdr.o: ../../src/Renderer2//Hdr.cpp ../../src/Renderer2//Renderer.hpp \
 	@echo Compiling ../../src/Renderer2//Hdr.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer2//Hdr.cpp -o Hdr.o
 
+1.Is.o: ../../src/Renderer2//Is.cpp ../../src/Renderer2//Renderer.hpp \
+ ../../src/Util/Common.h ../../src/Misc/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/Math/Transform.h \
+ ../../src/Math/Transform.inl.h ../../src/Renderer/BufferObjects/Fbo.h \
+ ../../src/Resources/Texture.h ../../src/Resources/Resource.h \
+ ../../src/Util/Util.h ../../src/Util/Common.h \
+ ../../src/Resources/ShaderProg.h
+	@echo Compiling ../../src/Renderer2//Is.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer2//Is.cpp -o 1.Is.o
+
 Ssao.o: ../../src/Renderer2//Ssao.cpp ../../src/Renderer2//Renderer.hpp \
  ../../src/Util/Common.h ../../src/Misc/memory.h ../../src/Math/Math.h \
  ../../src/Math/Vec2.h ../../src/Math/MathForwardDecls.h \
@@ -3795,7 +4137,7 @@ Ssao.o: ../../src/Renderer2//Ssao.cpp ../../src/Renderer2//Renderer.hpp \
 	@echo Compiling ../../src/Renderer2//Ssao.cpp...
 	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer2//Ssao.cpp -o Ssao.o
 
-60.Renderer.o: ../../src/Renderer2//Renderer.cpp \
+36.Renderer.o: ../../src/Renderer2//Renderer.cpp \
  ../../src/Renderer2//Renderer.hpp ../../src/Util/Common.h \
  ../../src/Misc/memory.h ../../src/Math/Math.h ../../src/Math/Vec2.h \
  ../../src/Math/MathForwardDecls.h ../../src/Math/Vec2.inl.h \
@@ -3813,7 +4155,188 @@ Ssao.o: ../../src/Renderer2//Ssao.cpp ../../src/Renderer2//Renderer.hpp \
  ../../src/Util/Util.h ../../src/Util/Common.h \
  ../../src/Resources/ShaderProg.h
 	@echo Compiling ../../src/Renderer2//Renderer.cpp...
-	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer2//Renderer.cpp -o 60.Renderer.o
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer2//Renderer.cpp -o 36.Renderer.o
+
+Sm.o: ../../src/Renderer2//Sm.cpp ../../src/Renderer2//Renderer.hpp \
+ ../../src/Util/Common.h ../../src/Misc/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/Math/Transform.h \
+ ../../src/Math/Transform.inl.h ../../src/Renderer/BufferObjects/Fbo.h \
+ ../../src/Resources/Texture.h ../../src/Resources/Resource.h \
+ ../../src/Util/Util.h ../../src/Util/Common.h \
+ ../../src/Resources/ShaderProg.h ../../src/Util/App.h \
+ ../../../SDL-hg/include/SDL.h ../../../SDL-hg/include/SDL_main.h \
+ ../../../SDL-hg/include/SDL_stdinc.h \
+ ../../../SDL-hg/include/SDL_config.h \
+ ../../../SDL-hg/include/SDL_platform.h \
+ ../../../SDL-hg/include/begin_code.h \
+ ../../../SDL-hg/include/close_code.h \
+ ../../../SDL-hg/include/SDL_atomic.h ../../../SDL-hg/include/SDL_audio.h \
+ ../../../SDL-hg/include/SDL_error.h ../../../SDL-hg/include/SDL_endian.h \
+ ../../../SDL-hg/include/SDL_mutex.h ../../../SDL-hg/include/SDL_thread.h \
+ ../../../SDL-hg/include/SDL_rwops.h \
+ ../../../SDL-hg/include/SDL_cpuinfo.h \
+ ../../../SDL-hg/include/SDL_events.h ../../../SDL-hg/include/SDL_video.h \
+ ../../../SDL-hg/include/SDL_pixels.h ../../../SDL-hg/include/SDL_rect.h \
+ ../../../SDL-hg/include/SDL_surface.h \
+ ../../../SDL-hg/include/SDL_keyboard.h \
+ ../../../SDL-hg/include/SDL_keysym.h \
+ ../../../SDL-hg/include/SDL_scancode.h \
+ ../../../SDL-hg/include/SDL_mouse.h \
+ ../../../SDL-hg/include/SDL_joystick.h \
+ ../../../SDL-hg/include/SDL_quit.h ../../../SDL-hg/include/SDL_loadso.h \
+ ../../../SDL-hg/include/SDL_power.h ../../../SDL-hg/include/SDL_timer.h \
+ ../../../SDL-hg/include/SDL_version.h \
+ ../../../SDL-hg/include/SDL_revision.h \
+ ../../../SDL-hg/include/SDL_compat.h ../../src/Scene/Scene.h \
+ ../../src/Misc/skybox.h ../../src/Physics/PhyWorld.h \
+ ../../src/Physics/PhyCommon.h \
+ ../../../bullet_svn/src/btBulletCollisionCommon.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.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/btVector3.h \
+ ../../../bullet_svn/src/LinearMath/btQuaternion.h \
+ ../../../bullet_svn/src/LinearMath/btQuadWord.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionObject.h \
+ ../../../bullet_svn/src/LinearMath/btMotionState.h \
+ ../../../bullet_svn/src/LinearMath/btTransform.h \
+ ../../../bullet_svn/src/LinearMath/btAlignedAllocator.h \
+ ../../../bullet_svn/src/LinearMath/btAlignedObjectArray.h \
+ ../../../bullet_svn/src/LinearMath/btAlignedAllocator.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btDispatcher.h \
+ ../../../bullet_svn/src/LinearMath/btScalar.h \
+ ../../../bullet_svn/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h \
+ ../../../bullet_svn/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h \
+ ../../../bullet_svn/src/LinearMath/btTransformUtil.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btManifoldResult.h \
+ ../../../bullet_svn/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionObject.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btBoxShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h \
+ ../../../bullet_svn/src/LinearMath/btMatrix3x3.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btConvexInternalShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btConvexShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btCollisionShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btCollisionMargin.h \
+ ../../../bullet_svn/src/LinearMath/btAabbUtil2.h \
+ ../../../bullet_svn/src/LinearMath/btMinMax.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btSphereShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btCapsuleShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btCylinderShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btBoxShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btConeShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btConcaveShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btTriangleCallback.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btConvexHullShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btTriangleMesh.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btOptimizedBvh.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h \
+ ../../../bullet_svn/src/LinearMath/btHashMap.h \
+ ../../../bullet_svn/src/LinearMath/btAlignedObjectArray.h \
+ ../../../bullet_svn/src/LinearMath/btSerializer.h \
+ ../../../bullet_svn/src/LinearMath/btStackAlloc.h \
+ ../../../bullet_svn/src/LinearMath/btHashMap.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btCompoundShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btTetrahedronShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btEmptyShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btMultiSphereShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionShapes/btUniformScalingShape.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btDbvt.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h \
+ ../../../bullet_svn/src/LinearMath/btQuaternion.h \
+ ../../../bullet_svn/src/LinearMath/btTransform.h \
+ ../../../bullet_svn/src/LinearMath/btDefaultMotionState.h \
+ ../../../bullet_svn/src/LinearMath/btMotionState.h \
+ ../../../bullet_svn/src/LinearMath/btQuickprof.h \
+ ../../../bullet_svn/src/LinearMath/btIDebugDraw.h \
+ ../../../bullet_svn/src/LinearMath/btSerializer.h \
+ ../../../bullet_svn/src/btBulletDynamicsCommon.h \
+ ../../../bullet_svn/src/btBulletCollisionCommon.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btDynamicsWorld.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btRigidBody.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionObject.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btRigidBody.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btSolverBody.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btContactConstraint.h \
+ ../../../bullet_svn/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h \
+ ../../../bullet_svn/src/BulletDynamics/Vehicle/btRaycastVehicle.h \
+ ../../../bullet_svn/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h \
+ ../../../bullet_svn/src/BulletDynamics/Vehicle/btVehicleRaycaster.h \
+ ../../../bullet_svn/src/BulletDynamics/Vehicle/btWheelInfo.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btActionInterface.h \
+ ../../../bullet_svn/src/BulletDynamics/Dynamics/btRigidBody.h \
+ ../../../bullet_svn/src/BulletDynamics/Character/btKinematicCharacterController.h \
+ ../../../bullet_svn/src/BulletDynamics/Character/btCharacterControllerInterface.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btGhostObject.h \
+ ../../../bullet_svn/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h \
+ ../../../bullet_svn/src/BulletCollision/CollisionDispatch/btCollisionWorld.h \
+ ../../src/Physics/PhyConversions.h ../../src/Physics/MotionState.h \
+ ../../src/Scene/SceneNode.h ../../src/Physics/PhyWorld.h \
+ ../../src/Scene/MeshNode.h ../../src/Scene/SceneNode.h \
+ ../../src/Resources/Material.h ../../src/Resources/ShaderProg.h
+	@echo Compiling ../../src/Renderer2//Sm.cpp...
+	@$(CXX) $(INCPATH) $(CFLAGS) ../../src/Renderer2//Sm.cpp -o Sm.o
 
 clean:
 	rm -f *.o

+ 1 - 0
build/download-and-build-externals.sh

@@ -1,5 +1,6 @@
 #! /bin/bash
 
+set -x
 cd ../../
 svn checkout http://bullet.googlecode.com/svn/trunk/ bullet_svn
 cd bullet_svn

+ 17 - 0
build/update-and-build-externals.sh

@@ -0,0 +1,17 @@
+#! /bin/bash
+
+set -x
+cd ../../bullet_svn
+svn update
+cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release
+make
+cd ../SDL-hg
+hg pull
+./autogen.sh
+./configure
+make
+cd ../glew
+svn update
+make extensions
+make
+

+ 1 - 1
src/Renderer2/Hdr.cpp

@@ -39,7 +39,7 @@ void Renderer::Pps::Hdr::initFbos( Fbo& fbo, Texture& fai, int internalFormat )
 //=====================================================================================================================================
 void Renderer::Pps::Hdr::init()
 {
-	int width = renderingQuality * r.width;
+	//int width = renderingQuality * r.width;
 	int height = renderingQuality * r.height;
 
 	initFbos( pass0Fbo, pass0Fai, GL_RGB );

Разница между файлами не показана из-за своего большого размера
+ 7 - 0
src/Renderer2/Is.cpp


+ 50 - 20
src/Renderer2/Renderer.hpp

@@ -14,19 +14,6 @@ class SpotLight;
 
 /**
  * @todo write
- *
- * @note Because of the many members of the class there is a naming convention that helps
- * - MS: material stage
- * - IS: illumination stage
- * - SM: shadowmapping
- * - AP: ambient pass
- * - PLS: point light pass
- * - SLS: spot light pass
- * - PPS: preprocessing stage
- * - HDR: high dynamic range lighting
- * - SSAO: screen space ambient occlusion
- * - LScat: light scattering
- * - FAI: frame buffer attachable image
  */
 class Renderer
 {
@@ -83,12 +70,17 @@ class Renderer
 						Texture shadowMap;
 
 						void init();
+
+						/**
+						 * Render the scene only with depth and store the result in the shadowMap
+						 * @param cam The light camera
+						 */
 						void run( const Camera& cam );
 
 					public:
 						bool pcfEnabled;
 						bool bilinearEnabled;
-						int  resolution;
+						int  resolution; ///< Shadowmap resolution. The higher the more quality
 
 						Sm( Renderer& r_ ): RenderingStage( r_ ) {}
 				};
@@ -96,10 +88,21 @@ class Renderer
 			private:
 				Fbo fbo;
 				uint stencilRb; ///< Illumination stage stencil buffer
+				// shader stuff
 				ShaderProg apSProg; ///< Illumination stage ambient pass shader program
 				ShaderProg plSProg; ///< Illumination stage point light shader program
 				ShaderProg slSProg; ///< Illumination stage spot light w/o shadow shader program
 				ShaderProg slSSProg; ///< Illumination stage spot light w/ shadow shader program
+				struct
+				{
+					struct
+					{
+						int ambientCol;
+						int sceneColMap;
+					} ap;
+
+				} uniLocs;
+				// other
 				Vec3 viewVectors[4];
 				Vec2 planes;
 				static float sMOUvSCoords []; ///< Illumination stage stencil masking optimizations UV sphere vertex coords
@@ -107,8 +110,16 @@ class Renderer
 
 				static void initSMOUvS(); ///< Init the illumination stage stencil masking optimizations uv sphere (eg create the @ref sMOUvSVboId VBO)
 				void renderSMOUvS( const PointLight& light ); ///< Render the illumination stage stencil masking optimizations uv sphere
-				void calcViewVector(); ///< Calc the view vector that we will use inside the shader to calculate the frag pos in view space
-				void calcPlanes(); ///< Calc the planes that we will use inside the shader to calculate the frag pos in view space
+
+				/**
+				 * Calc the view vector that we will use inside the shader to calculate the frag pos in view space
+				 */
+				void calcViewVector();
+
+				/**
+				 * Calc the planes that we will use inside the shader to calculate the frag pos in view space
+				 */
+				void calcPlanes();
 				void setStencilMask( const PointLight& light );
 				void setStencilMask( const SpotLight& light );
 				void ambientPass( const Vec3& color );
@@ -120,7 +131,6 @@ class Renderer
 
 			public:
 				Texture fai;
-
 				Sm sm;
 
 				Is( Renderer& r_ ): RenderingStage( r_ ), sm(r) {}
@@ -172,7 +182,12 @@ class Renderer
 				};
 
 				/**
-				 * Screen space ambien occlusion stage
+				 * Screen space ambient occlusion stage
+				 *
+				 * Three passes:
+				 * - Calc ssao factor
+				 * - Blur vertically
+				 * - Blur horizontally
 				 */
 				class Saao: private RenderingStage
 				{
@@ -180,15 +195,30 @@ class Renderer
 						Fbo pass0Fbo, pass1Fbo, pass2Fbo;
 						uint width, height, bwidth, bheight;
 						Texture* noiseMap;
+						struct
+						{
+							struct
+							{
+								int camerarange, msDepthFai, noiseMap, msNormalFai;
+							} pass0SProg;
+							struct
+							{
+								int fai;
+							} pass1SProg;
+							struct
+							{
+								int fai;
+							} pass2SProg;
+						} uniLocs;
 
-						void initBlurFbos();
+						void initBlurFbo( Fbo& fbo, Texture& fai );
 						void init();
 						void run();
 
 					public:
 						float renderingQuality;
 						float bluringQuality;
-						Texture pass0Fai, pass1Fai, fai;
+						Texture pass0Fai, pass1Fai, fai /** The final FAI */;
 						ShaderProg ssaoSProg, blurSProg, blurSProg2;
 
 						Saao( Renderer& r_ ): RenderingStage(r_) {}

+ 106 - 0
src/Renderer2/Sm.cpp

@@ -0,0 +1,106 @@
+#include "Renderer.hpp"
+#include "App.h"
+#include "Scene.h"
+#include "MeshNode.h"
+
+
+//=====================================================================================================================================
+// init                                                                                                                               =
+//=====================================================================================================================================
+void Renderer::Is::Sm::init()
+{
+	// create FBO
+	fbo.create();
+	fbo.bind();
+
+	// texture
+	shadowMap.createEmpty2D( resolution, resolution, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT );
+	shadowMap.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+	if( bilinearEnabled )
+	{
+		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 );
+
+	// attach the texture
+	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, shadowMap.getGlId(), 0 );
+
+	// test if success
+	if( !fbo.isGood() )
+		FATAL( "Cannot create shadowmapping FBO" );
+
+	// unbind
+	fbo.unbind();
+}
+
+
+//=====================================================================================================================================
+// run                                                                                                                                =
+//=====================================================================================================================================
+void Renderer::Is::Sm::run( const Camera& cam )
+{
+	// FBO
+	fbo.bind();
+
+	// push attribs
+	glMatrixMode( GL_PROJECTION );
+	glPushMatrix();
+	glMatrixMode( GL_MODELVIEW );
+	glPushMatrix();
+	glPushAttrib( GL_VIEWPORT_BIT );
+
+
+	glClear( GL_DEPTH_BUFFER_BIT );
+	r.setProjectionViewMatrices( cam );
+	r.setViewport( 0, 0, resolution, resolution );
+
+	// disable color & blend & enable depth test
+	glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );
+	glEnable( GL_DEPTH_TEST );
+	glDisable( GL_BLEND );
+
+	// for artifacts
+	glPolygonOffset( 2.0, 2.0 ); // keep the values as low as possible!!!!
+	glEnable( GL_POLYGON_OFFSET_FILL );
+
+	// render all meshes
+	for( uint i=0; i<app->getScene()->meshNodes.size(); i++ )
+	{
+		MeshNode* meshNode = app->getScene()->meshNodes[i];
+		if( meshNode->material->blends || meshNode->material->refracts ) continue;
+
+		DEBUG_ERR( meshNode->material->dpMtl == NULL );
+
+		//meshNode->material->dpMtl->setup();
+		//meshNode->renderDepth();
+		meshNode->material->setup();
+		meshNode->render();
+	}
+
+	glDisable( GL_POLYGON_OFFSET_FILL );
+
+	glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
+
+	// restore attribs
+	glPopAttrib();
+	glMatrixMode( GL_MODELVIEW );
+	glPopMatrix();
+	glMatrixMode( GL_PROJECTION );
+	glPopMatrix();
+
+	// FBO
+	fbo.unbind();
+}

+ 52 - 59
src/Renderer2/Ssao.cpp

@@ -5,53 +5,29 @@
 //=====================================================================================================================================
 // initBlurFbos                                                                                                                       =
 //=====================================================================================================================================
-void Renderer::Pps::Saao::initBlurFbos()
+void Renderer::Pps::Saao::initBlurFbo( Fbo& fbo, Texture& fai )
 {
 	// create FBO
-	pass1Fbo.create();
-	pass1Fbo.bind();
+	fbo.create();
+	fbo.bind();
 
 	// inform in what buffers we draw
-	pass1Fbo.setNumOfColorAttachements(1);
-
-	// create the texes
-	pass1Fai.createEmpty2D( bwidth, bheight, GL_ALPHA8, GL_ALPHA );
-	pass1Fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
-	pass1Fai.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
-
-	// attach
-	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, pass1Fai.getGlId(), 0 );
-
-	// test if success
-	if( !pass1Fbo.isGood() )
-		FATAL( "Cannot create deferred shading post-processing stage SSAO blur FBO" );
-
-	// unbind
-	pass1Fbo.unbind();
-
-
-
-	// create FBO
-	pass2Fbo.create();
-	pass2Fbo.bind();
-
-	// inform in what buffers we draw
-	pass2Fbo.setNumOfColorAttachements(1);
+	fbo.setNumOfColorAttachements( 1 );
 
 	// create the texes
 	fai.createEmpty2D( bwidth, bheight, GL_ALPHA8, GL_ALPHA );
-	fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+	fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
 	fai.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
 
 	// attach
 	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, fai.getGlId(), 0 );
 
 	// test if success
-	if( !pass2Fbo.isGood() )
+	if( !fbo.isGood() )
 		FATAL( "Cannot create deferred shading post-processing stage SSAO blur FBO" );
 
 	// unbind
-	pass2Fbo.unbind();
+	fbo.unbind();
 }
 
 
@@ -65,6 +41,11 @@ void Renderer::Pps::Saao::init()
 	bwidth = height * bluringQuality;
 	bheight = height * bluringQuality;
 
+
+	//
+	// init FBOs
+	//
+
 	// create FBO
 	pass0Fbo.create();
 	pass0Fbo.bind();
@@ -72,7 +53,7 @@ void Renderer::Pps::Saao::init()
 	// inform in what buffers we draw
 	pass0Fbo.setNumOfColorAttachements(1);
 
-	// create the texes
+	// create the FAI
 	pass0Fai.createEmpty2D( width, height, GL_ALPHA8, GL_ALPHA );
 	pass0Fai.texParameter( GL_TEXTURE_MAG_FILTER, GL_NEAREST );
 	pass0Fai.texParameter( GL_TEXTURE_MIN_FILTER, GL_NEAREST );
@@ -87,11 +68,31 @@ void Renderer::Pps::Saao::init()
 	// unbind
 	pass0Fbo.unbind();
 
+	initBlurFbo( pass1Fbo, pass1Fai );
+	initBlurFbo( pass2Fbo, fai );
+
+
+	//
+	// Shaders
+	//
 
-	// init shaders
 	ssaoSProg.customLoad( "shaders/PpsSsao.glsl" );
+	blurSProg.customLoad( "shaders/PpsSsaoBlur.glsl", ("#define _PPS_SSAO_PASS_0_\n#define PASS0_FAI_WIDTH " + Util::floatToStr(width) + "\n").c_str() );
+	blurSProg2.customLoad( "shaders/PpsSsaoBlur.glsl", ("#define _PPS_SSAO_PASS_1_\n#define PASS1_FAI_HEIGHT " + Util::floatToStr(bheight) + "\n").c_str() );
 
-	// load noise map and disable temporaly the texture compression and enable mipmapping
+	uniLocs.pass0SProg.camerarange = ssaoSProg.getUniVar("camerarange")->getLoc();
+	uniLocs.pass0SProg.msDepthFai = ssaoSProg.getUniVar("msDepthFai")->getLoc();
+	uniLocs.pass0SProg.noiseMap = ssaoSProg.getUniVar("noiseMap")->getLoc();
+	uniLocs.pass0SProg.msNormalFai = ssaoSProg.getUniVar("msNormalFai")->getLoc();
+	uniLocs.pass1SProg.fai = blurSProg.getUniVar("tex")->getLoc(); /// @todo rename the tex in the shader
+	uniLocs.pass2SProg.fai = blurSProg2.getUniVar("tex")->getLoc(); /// @todo rename the tex in the shader
+
+
+	//
+	// noise map
+	//
+
+	// load noise map and disable temporally the texture compression and enable mipmapping
 	bool texCompr = Renderer::textureCompression;
 	bool mipmaping = Renderer::mipmapping;
 	Renderer::textureCompression = false;
@@ -104,10 +105,6 @@ void Renderer::Pps::Saao::init()
 	Renderer::textureCompression = texCompr;
 	Renderer::mipmapping = mipmaping;
 
-	// blur FBO
-	initBlurFbos();
-	blurSProg.customLoad( "shaders/PpsSsaoBlur.glsl", ("#define _PPS_SSAO_PASS_0_\n#define PASS0_FAI_WIDTH " + Util::floatToStr(width) + "\n").c_str() );
-	blurSProg2.customLoad( "shaders/PpsSsaoBlur.glsl", ("#define _PPS_SSAO_PASS_1_\n#define PASS1_FAI_HEIGHT " + Util::floatToStr(bheight) + "\n").c_str() );
 }
 
 
@@ -116,40 +113,36 @@ void Renderer::Pps::Saao::init()
 //=====================================================================================================================================
 void Renderer::Pps::Saao::run()
 {
-	Camera& cam = *r.cam;
-	pass0Fbo.bind();
-
-	r.setViewport( 0, 0, width, height );
+	const Camera& cam = *r.cam;
 
 	glDisable( GL_BLEND );
 	glDisable( GL_DEPTH_TEST );
 
-	// fill SSAO FAI
-	ssaoSProg.bind();
-	glUniform2fv( ssaoSProg.getUniVar("camerarange")->getLoc(), 1, &(Vec2(cam.getZNear(), cam.getZFar()))[0] );
-	ssaoSProg.locTexUnit( ssaoSProg.getUniVar("msDepthFai")->getLoc(), r.ms.depthFai, 0 );
-	ssaoSProg.locTexUnit( ssaoSProg.getUniVar("noiseMap")->getLoc(), *noiseMap, 1 );
-	ssaoSProg.locTexUnit( ssaoSProg.getUniVar("msNormalFai")->getLoc(), r.ms.normalFai, 2 );
-	r.drawQuad( 0 ); // Draw quad
 
-	/*glBindFramebuffer( GL_READ_FRAMEBUFFER, pass0Fbo.getGlId() );
-	glBindFramebuffer( GL_DRAW_FRAMEBUFFER, pass1Fbo.getGlId() );
-	glBlitFramebuffer( 0, 0, w, h, 0, 0, bw, bh, GL_COLOR_BUFFER_BIT, GL_NEAREST);*/
+	// 1st pass
+	r.setViewport( 0, 0, width, height );
+	pass0Fbo.bind();
+	ssaoSProg.bind();
+	glUniform2fv( uniLocs.pass0SProg.camerarange, 1, &(Vec2(cam.getZNear(), cam.getZFar()))[0] );
+	ssaoSProg.locTexUnit( uniLocs.pass0SProg.msDepthFai, r.ms.depthFai, 0 );
+	ssaoSProg.locTexUnit( uniLocs.pass0SProg.noiseMap, *noiseMap, 1 );
+	ssaoSProg.locTexUnit( uniLocs.pass0SProg.msNormalFai, r.ms.normalFai, 2 );
+	r.drawQuad( 0 );
 
+	// for 2nd and 3rd passes
 	r.setViewport( 0, 0, bwidth, bheight );
 
-	// second pass. blur
+	// 2nd pass
 	pass1Fbo.bind();
 	blurSProg.bind();
-	blurSProg.locTexUnit( blurSProg.getUniVar("tex")->getLoc(), pass0Fai, 0 );
-	r.drawQuad( 0 ); // Draw quad
+	blurSProg.locTexUnit( uniLocs.pass1SProg.fai, pass0Fai, 0 );
+	r.drawQuad( 0 );
 
-	// third pass. blur
+	// 3rd pass
 	pass2Fbo.bind();
 	blurSProg2.bind();
-	blurSProg2.locTexUnit( blurSProg2.getUniVar("tex")->getLoc(), pass1Fai, 0 );
-	r.drawQuad( 0 ); // Draw quad
-
+	blurSProg2.locTexUnit( uniLocs.pass2SProg.fai, pass1Fai, 0 );
+	r.drawQuad( 0 );
 
 	// end
 	Fbo::unbind();

+ 1 - 1
src/Util/Tokenizer/Scanner.cpp

@@ -82,7 +82,7 @@ Scanner::ResWord* Scanner::rwTable [] =  // reserved word table
 //=====================================================================================================================================
 // ascii map                                                                                                                          =
 //=====================================================================================================================================
-uint Scanner::asciiLookupTable [128] = {AC_ERROR};
+Scanner::AsciiFlag Scanner::asciiLookupTable [128] = {AC_ERROR};
 
 void Scanner::initAsciiMap()
 {

+ 4 - 4
src/Util/Tokenizer/Scanner.h

@@ -40,7 +40,7 @@ class Scanner
 		/**
 		 * Every char in the Ascii table is binded with one characteristic code type. This helps the scanning
 		 */
-		enum AsciiFlagsE
+		enum AsciiFlag
 		{
 			AC_ERROR = 0,
 			AC_EOF = 1,
@@ -52,12 +52,12 @@ class Scanner
 			AC_DOUBLEQUOTE = 64
 		};
 
-		static uint asciiLookupTable []; ///< The array contains one ascii_code_e for every symbol of the ASCII table
+		static AsciiFlag asciiLookupTable []; ///< The array contains one ascii_code_e for every symbol of the ASCII table
 		/// Initializes the asciiLookupTable. It runs only once in the construction of the first Scanner @see Scanner()
 		static void initAsciiMap();
 
 		/// To save us from typing for example asciiLookupTable[ (int)'a' ]
-		inline uint asciiLookup( char ch_ )
+		inline AsciiFlag asciiLookup( char ch_ )
 		{
 			return asciiLookupTable[ (int)ch_ ];
 		}
@@ -191,7 +191,7 @@ class Scanner
 		~Scanner() { /* The destructor does NOTHING. The class does not make any mem allocations */ }
 
 		bool loadFile( const char* filename ); ///< Load a file to extract tokens
-		bool loadIstream( istream& iostream_, const char* scriptName_ = "unamed-istream" ); ///< Load a STL iostream to extract tokens
+		bool loadIstream( istream& istream_, const char* scriptName_ = "unamed-istream" ); ///< Load a STL istream to extract tokens
 		void unload();
 
 		static void   printTokenInfo( const Token& token ); ///< Print info of the given token

Некоторые файлы не были показаны из-за большого количества измененных файлов