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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user