Exemplo n.º 1
0
void Destroy_Light_Buffers()
{
  int Axis;
  LIGHT_SOURCE *Light;

 /*YS 29 april 2000 bugfix*/
 if (opts.Options & USE_LIGHT_BUFFER && BuffersInit==true)
/*YS 29 april 2000 bugfix*/
  {
    for (Light = Frame.Light_Sources; Light != NULL; Light = Light->Next_Light_Source)
    {
      if ((!Light->Area_Light) && (Light->Light_Type!=FILL_LIGHT_SOURCE))
      {
        for (Axis = 0; Axis < 6; Axis++)
        {
          if (Light->Light_Buffer[Axis] != NULL)
          {
            Destroy_Project_Tree(Light->Light_Buffer[Axis]);
          }

          Light->Light_Buffer[Axis] = NULL;
        }
      }
    }
  }
/*YS 29 april 2000 bugfix*/
  BuffersInit=false;
/*YS 29 april 2000 bugfix*/
}
Exemplo n.º 2
0
void Destroy_Project_Tree(PROJECT_TREE_NODE *Node)
{
  unsigned short i;

  if (Node->is_leaf & true)
  {
    Do_Cooperate(1);
    POV_FREE(Node);
  }
  else
  {
    for (i = 0; i < Node->Entries; i++)
    {
      Destroy_Project_Tree(Node->Entry[i]);
    }

    POV_FREE(Node->Entry);

    POV_FREE(Node);
  }
}