Hi guys,

in VRMLAppearanceBinder::finish (VRMLToOSGAction* ) there is a bug which prevents
nontextured, transparent materials:
The early exit if (pTexChunk == NullFC) is wrong and should be
if (pTexChunk != NullFC) {
...
}
around the pTexChunk modifying block.

*void* *VRMLAppearanceBinder::finish*(VRMLToOSGAction *)
{
ChunkMaterialPtr pChunkMat = ChunkMaterialPtr::dcast(_pFieldContainer);

TextureChunkPtr pTexChunk = TextureChunkPtr::dcast(pChunkMat->find(TextureChunk::getClassType())); *if*(pTexChunk == NullFC)
       *return*;

   beginEditCP(pTexChunk, TextureChunk::EnvModeFieldMask);
   {
       *if*(pMatChunk == NullFC)
       {
           pTexChunk->setEnvMode(GL_REPLACE);
       }
       *else*
       {
           pTexChunk->setEnvMode(GL_MODULATE);
       }
   }
   endEditCP  (pTexChunk, TextureChunk::EnvModeFieldMask);

*if*(pChunkMat != NullFC && (pChunkMat->isTransparent() == true || _has_alpha))
   {
   ...
   }
}


Thanks for the fix,
Christoph



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to