00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TEXTURERELOADREQUEST
00016 #define TEXTURERELOADREQUEST
00017
00018 #include "pandabase.h"
00019
00020 #include "asyncTask.h"
00021 #include "texture.h"
00022 #include "preparedGraphicsObjects.h"
00023 #include "pointerTo.h"
00024 #include "pmutex.h"
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class EXPCL_PANDA_GOBJ TextureReloadRequest : public AsyncTask {
00035 public:
00036 ALLOC_DELETED_CHAIN(TextureReloadRequest);
00037
00038 PUBLISHED:
00039 INLINE TextureReloadRequest(const string &name,
00040 PreparedGraphicsObjects *pgo, Texture *texture,
00041 bool allow_compressed);
00042
00043 INLINE PreparedGraphicsObjects *get_prepared_graphics_objects() const;
00044 INLINE Texture *get_texture() const;
00045 INLINE bool get_allow_compressed() const;
00046 INLINE bool is_ready() const;
00047
00048 protected:
00049 virtual DoneStatus do_task();
00050
00051 private:
00052 PT(PreparedGraphicsObjects) _pgo;
00053 PT(Texture) _texture;
00054 bool _allow_compressed;
00055 bool _is_ready;
00056
00057 public:
00058 static TypeHandle get_class_type() {
00059 return _type_handle;
00060 }
00061 static void init_type() {
00062 AsyncTask::init_type();
00063 register_type(_type_handle, "TextureReloadRequest",
00064 AsyncTask::get_class_type());
00065 }
00066 virtual TypeHandle get_type() const {
00067 return get_class_type();
00068 }
00069 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00070
00071 private:
00072 static TypeHandle _type_handle;
00073 };
00074
00075 #include "textureReloadRequest.I"
00076
00077 #endif