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!
This commit is contained in:
2007-09-29 18:51:01 +00:00
parent ae40a1d86e
commit 51b56a4d3f
10 changed files with 130 additions and 3 deletions

View File

@@ -618,7 +618,31 @@ static PyObject* gPyMakeScreenshot(PyObject*,
Py_Return;
}
static PyObject* gPyEnableMotionBlur(PyObject*,
PyObject* args,
PyObject*)
{
float motionblurvalue;
if (PyArg_ParseTuple(args,"f",&motionblurvalue))
{
if(gp_Rasterizer)
{
gp_Rasterizer->EnableMotionBlur(motionblurvalue);
}
}
Py_Return;
}
static PyObject* gPyDisableMotionBlur(PyObject*,
PyObject* args,
PyObject*)
{
if(gp_Rasterizer)
{
gp_Rasterizer->DisableMotionBlur();
}
Py_Return;
}
STR_String gPyGetWindowHeight__doc__="getWindowHeight doc";
STR_String gPyGetWindowWidth__doc__="getWindowWidth doc";
@@ -645,6 +669,9 @@ static struct PyMethodDef rasterizer_methods[] = {
{"setMistColor",(PyCFunction)gPySetMistColor,METH_VARARGS,"set Mist Color (rgb)"},
{"setMistStart",(PyCFunction)gPySetMistStart,METH_VARARGS,"set Mist Start(rgb)"},
{"setMistEnd",(PyCFunction)gPySetMistEnd,METH_VARARGS,"set Mist End(rgb)"},
{"enableMotionBlur",(PyCFunction)gPyEnableMotionBlur,METH_VARARGS,"enable motion blur"},
{"disableMotionBlur",(PyCFunction)gPyDisableMotionBlur,METH_VARARGS,"disable motion blur"},
{"setEyeSeparation", (PyCFunction) gPySetEyeSeparation, METH_VARARGS, "set the eye separation for stereo mode"},
{"getEyeSeparation", (PyCFunction) gPyGetEyeSeparation, METH_VARARGS, "get the eye separation for stereo mode"},