BGE: Fix T19241: draw debug shape with overlay/background scene.

It's for the function render.drawLine and physics debug.
This commit is contained in:
2015-07-27 10:58:19 +02:00
parent ba146899c8
commit 76beb7b7d4
5 changed files with 38 additions and 35 deletions

View File

@@ -186,17 +186,17 @@ class KX_KetsjiEngine* KX_GetActiveEngine()
}
/* why is this in python? */
void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)
void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)
{
if (gp_Rasterizer)
gp_Rasterizer->DrawDebugLine(from,to,color);
gp_Rasterizer->DrawDebugLine(gp_KetsjiScene, from, to, color);
}
void KX_RasterizerDrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
const MT_Vector3& normal, int nsector)
{
if (gp_Rasterizer)
gp_Rasterizer->DrawDebugCircle(center, radius, color, normal, nsector);
gp_Rasterizer->DrawDebugCircle(gp_KetsjiScene, center, radius, color, normal, nsector);
}
#ifdef WITH_PYTHON
@@ -1265,7 +1265,7 @@ static PyObject *gPyDrawLine(PyObject *, PyObject *args)
if (!PyVecTo(ob_color, color))
return NULL;
gp_Rasterizer->DrawDebugLine(from,to,color);
gp_Rasterizer->DrawDebugLine(gp_KetsjiScene, from, to, color);
Py_RETURN_NONE;
}