00001 // Filename: textureReloadRequest.I 00002 // Created by: drose (12Aug08) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: TextureReloadRequest::Constructor 00018 // Access: Published 00019 // Description: Create a new TextureReloadRequest, and add it to the loader 00020 // via load_async(), to begin an asynchronous load. 00021 //////////////////////////////////////////////////////////////////// 00022 INLINE TextureReloadRequest:: 00023 TextureReloadRequest(const string &name, 00024 PreparedGraphicsObjects *pgo, Texture *texture, 00025 bool allow_compressed) : 00026 AsyncTask(name), 00027 _pgo(pgo), 00028 _texture(texture), 00029 _allow_compressed(allow_compressed), 00030 _is_ready(false) 00031 { 00032 nassertv(_pgo != (PreparedGraphicsObjects *)NULL); 00033 nassertv(_texture != (Texture *)NULL); 00034 } 00035 00036 //////////////////////////////////////////////////////////////////// 00037 // Function: TextureReloadRequest::get_prepared_graphics_objects 00038 // Access: Published 00039 // Description: Returns the PreparedGraphicsObjects object associated with 00040 // this asynchronous TextureReloadRequest. 00041 //////////////////////////////////////////////////////////////////// 00042 INLINE PreparedGraphicsObjects *TextureReloadRequest:: 00043 get_prepared_graphics_objects() const { 00044 return _pgo; 00045 } 00046 00047 //////////////////////////////////////////////////////////////////// 00048 // Function: TextureReloadRequest::get_texture 00049 // Access: Published 00050 // Description: Returns the Texture object associated with 00051 // this asynchronous TextureReloadRequest. 00052 //////////////////////////////////////////////////////////////////// 00053 INLINE Texture *TextureReloadRequest:: 00054 get_texture() const { 00055 return _texture; 00056 } 00057 00058 //////////////////////////////////////////////////////////////////// 00059 // Function: TextureReloadRequest::get_allow_compressed 00060 // Access: Published 00061 // Description: Returns the "allow compressed" flag associated with 00062 // this asynchronous TextureReloadRequest. 00063 //////////////////////////////////////////////////////////////////// 00064 INLINE bool TextureReloadRequest:: 00065 get_allow_compressed() const { 00066 return _allow_compressed; 00067 } 00068 00069 //////////////////////////////////////////////////////////////////// 00070 // Function: TextureReloadRequest::is_ready 00071 // Access: Published 00072 // Description: Returns true if this request has completed, false if 00073 // it is still pending. 00074 //////////////////////////////////////////////////////////////////// 00075 INLINE bool TextureReloadRequest:: 00076 is_ready() const { 00077 return _is_ready; 00078 }