Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMal Duffin <malachyduffin@gmail.com>2007-09-29 22:51:01 +0400
committerMal Duffin <malachyduffin@gmail.com>2007-09-29 22:51:01 +0400
commit51b56a4d3f17e8cea35ba02132af0c2b893e1ff2 (patch)
tree721c5d1d3e015cb4432e22d4bf23f75d93319ad9 /source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
parentae40a1d86e5917dbd23ac4bcdcbeca07a3505e0d (diff)
GE Patch by Hamed Zaghaghi - Adding Motion Blur to the Game Engine.
I reviewed the code, suggested an update ( initialising accumulation buffer ), and tested the resulting update successfully. It's great to see more GE developers!GE Patch by Hamed Zaghaghi to add motion blur to the GE ( using the accumulation buffer ). I reviewed code and tested, gave some feedback ( initialising accumulation buffer ) which was implemented straight away, and re-reviewed. It's great to have another GE coder on the team!
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 53ec7a02e6f..85250fcd552 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -82,7 +82,9 @@ RAS_OpenGLRasterizer::RAS_OpenGLRasterizer(RAS_ICanvas* canvas)
m_setfocallength(false),
m_noOfScanlines(32),
m_useTang(false),
- m_materialCachingInfo(0)
+ m_materialCachingInfo(0),
+ m_motionblur(0),
+ m_motionblurvalue(-1.0)
{
m_viewmatrix.Identity();
@@ -1979,3 +1981,15 @@ void RAS_OpenGLRasterizer::SetPolygonOffset(float mult, float add)
else
glDisable(mode);
}
+
+void RAS_OpenGLRasterizer::EnableMotionBlur(float motionblurvalue)
+{
+ m_motionblur = 1;
+ m_motionblurvalue = motionblurvalue;
+}
+
+void RAS_OpenGLRasterizer::DisableMotionBlur()
+{
+ m_motionblur = 0;
+ m_motionblurvalue = -1.0;
+}