bool MeshAttachment::IsFullyOpaque( BufferIndex updateBufferIndex )
{
  bool fullyOpaque = true; // good default, since transparency is evil.

  /**
   * Fully opaque when:
   *   1) The material is opaque
   *   2) The inherited color is not transparent nor semi-transparent
   *   3) The inherited shader does not blend
   */

  const SceneGraph::Material* material = mMesh.material;

  if ( material && !material->IsOpaque() )
  {
    fullyOpaque = false;
  }

  if( mParent != NULL )
  {
    if( fullyOpaque )
    {
      fullyOpaque = ( mParent->GetWorldColor(updateBufferIndex).a >= FULLY_OPAQUE );
    }

    if ( fullyOpaque )
    {
      Shader* shader = mParent->GetInheritedShader();
      if( shader != NULL )
      {
        fullyOpaque = (shader->GetGeometryHints() != Dali::ShaderEffect::HINT_BLENDING );
      }
    }
  }
  return fullyOpaque;
}