Apply BGE patch 11137: Render objects with negative scaling correctly (as in Blender)

This commit is contained in:
2008-05-25 14:37:39 +00:00
parent f680b56ebf
commit da1f38f99d
8 changed files with 50 additions and 1 deletions

View File

@@ -125,6 +125,22 @@ void KX_BlenderRenderTools::BeginFrame(RAS_IRasterizer* rasty)
}
void KX_BlenderRenderTools::SetClientObject(void* obj)
{
if (m_clientobject != obj)
{
if (obj == NULL || !((KX_GameObject*)obj)->IsNegativeScaling())
{
glFrontFace(GL_CCW);
} else
{
glFrontFace(GL_CW);
}
m_clientobject = obj;
m_modified = true;
}
}
bool KX_BlenderRenderTools::RayHit(KX_ClientObjectInfo* client, MT_Point3& hit_point, MT_Vector3& hit_normal, void * const data)
{
double* const oglmatrix = (double* const) data;