// Filename: preparedGraphicsObjects.I
// Created by:  drose (23Feb04)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc.  All rights reserved
//
// All use of this software is subject to the terms of the Panda 3d
// Software license.  You should have received a copy of this license
// along with this source code; you will also find a current copy of
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
//
// To contact the maintainers of this program write to
// panda3d-general@lists.sourceforge.net .
//
////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////
//     Function: PreparedGraphicsObjects::get_name
//       Access: Public
//  Description: Returns the name of the PreparedGraphicsObjects
//               structure.  This is an arbitrary name that serves
//               mainly to uniquify the context for PStats reporting.
////////////////////////////////////////////////////////////////////
INLINE const string &PreparedGraphicsObjects::
get_name() const {
  return _name;
}

////////////////////////////////////////////////////////////////////
//     Function: PreparedGraphicsObjects::release_all
//       Access: Public
//  Description: Releases all prepared objects of all kinds at once.
////////////////////////////////////////////////////////////////////
INLINE void PreparedGraphicsObjects::
release_all() {
  release_all_textures();
  release_all_geoms();
  release_all_shaders();
  release_all_vertex_buffers();
  release_all_index_buffers();
}

////////////////////////////////////////////////////////////////////
//     Function: PreparedGraphicsObjects::get_num_queued
//       Access: Public
//  Description: Returns the number of objects of any kind that have
//               been enqueued to be prepared on this GSG.
////////////////////////////////////////////////////////////////////
INLINE int PreparedGraphicsObjects::
get_num_queued() const {
  return (get_num_queued_textures() + 
          get_num_queued_geoms() +
          get_num_queued_shaders() +
          get_num_queued_vertex_buffers() +
          get_num_queued_index_buffers());
}

////////////////////////////////////////////////////////////////////
//     Function: PreparedGraphicsObjects::get_num_prepared
//       Access: Public
//  Description: Returns the number of objects of any kind that have
//               already been prepared on this GSG.
////////////////////////////////////////////////////////////////////
INLINE int PreparedGraphicsObjects::
get_num_prepared() const {
  return (get_num_prepared_textures() + 
          get_num_prepared_geoms() +
          get_num_prepared_shaders() +
          get_num_prepared_vertex_buffers() +
          get_num_prepared_index_buffers());
}
