|
From: Frank C. <dev...@ch...> - 2004-10-06 06:35:35
|
On 5-Oct-04, at 7:09 PM, Dair Grant wrote:
> Frank Condello wrote:
>
>> This would be a temporary fix at best, but if someone with CVS access
>> wants to check it in that's fine with me.
>
> So in all the back and forth on this thread, I'm not sure what the
> final
> patch was; can you forward that to me or point me at the bug with it
> attached?
I added some notes to bug #967773 - basically the workaround is to set
the illumination state in ir_geom_transparent_render before drawing:
if (thePrim->illumination == kQ3IlluminationTypeNULL)
{
glDisable(GL_LIGHTING);
glDisable(GL_COLOR_MATERIAL);
}
else
{
glEnable(GL_LIGHTING);
glEnable(GL_COLOR_MATERIAL);
}
Then add a glEnable(GL_LIGHTING); call before the specular pass in
IRTransBuffer_Draw. Kinda brute force but it works...
I have an even nastier workaround for bug #967958
<http://sf.net/tracker/index.php?
func=detail&aid=967958&group_id=45158&atid=442052>. In
IRGeometryTriMesh.c, ir_geom_trimesh_build_transparent, in the last
"Check for transparent vertices" loop, replace these two lines:
m = vertexArray->vertexParents[n];
E3Bit_Set(vertexArray->triFlags[m], kQ3TriFlagTransparent);
With this:
for (m = 0; m < vertexArray->geomData->numTriangles; m++)
{
if (vertexArray->triFlags[m] & kQ3TriFlagTransparent)
continue;
theIndices = vertexArray->geomData->triangles[n].pointIndices;
if ( (theIndices[0] == n) || (theIndices[1] == n) || (theIndices[2]
== n) )
E3Bit_Set(vertexArray->triFlags[m], kQ3TriFlagTransparent);
}
This is pretty ugly and slow but it illustrates the underlying problem
detailed in the bug report.
Frank.
|