diff options
Diffstat (limited to 'indra/newview/lllocalbitmaps.h')
-rw-r--r-- | indra/newview/lllocalbitmaps.h | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h index bb026ed3aa..1fdf9dccbf 100644 --- a/indra/newview/lllocalbitmaps.h +++ b/indra/newview/lllocalbitmaps.h @@ -36,6 +36,7 @@ class LLScrollListCtrl; class LLImageRaw; class LLViewerObject; +class LLGLTFMaterial; class LLLocalBitmap { @@ -44,11 +45,11 @@ class LLLocalBitmap ~LLLocalBitmap(); public: /* accessors */ - std::string getFilename(); - std::string getShortName(); - LLUUID getTrackingID(); - LLUUID getWorldID(); - bool getValid(); + std::string getFilename() const; + std::string getShortName() const; + LLUUID getTrackingID() const; + LLUUID getWorldID() const; + bool getValid() const; public: /* self update public section */ enum EUpdateType @@ -59,13 +60,21 @@ class LLLocalBitmap bool updateSelf(EUpdateType = UT_REGUPDATE); + typedef boost::signals2::signal<void(const LLUUID& tracking_id, + const LLUUID& old_id, + const LLUUID& new_id)> LLLocalTextureChangedSignal; + typedef LLLocalTextureChangedSignal::slot_type LLLocalTextureCallback; + boost::signals2::connection setChangedCallback(const LLLocalTextureCallback& cb); + void addGLTFMaterial(LLGLTFMaterial* mat); + private: /* self update private section */ bool decodeBitmap(LLPointer<LLImageRaw> raw); - void replaceIDs(LLUUID old_id, LLUUID new_id); + void replaceIDs(const LLUUID &old_id, LLUUID new_id); std::vector<LLViewerObject*> prepUpdateObjects(LLUUID old_id, U32 channel); void updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel); void updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel); void updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableType::EType type); + void updateGLTFMaterials(LLUUID old_id, LLUUID new_id); LLAvatarAppearanceDefines::ETextureIndex getTexIndex(LLWearableType::EType type, LLAvatarAppearanceDefines::EBakedTextureIndex baked_texind); private: /* private enums */ @@ -93,6 +102,12 @@ class LLLocalBitmap EExtension mExtension; ELinkStatus mLinkStatus; S32 mUpdateRetries; + LLLocalTextureChangedSignal mChangedSignal; + + // Store a list of accosiated materials + // Might be a better idea to hold this in LLGLTFMaterialList + typedef std::vector<LLPointer<LLGLTFMaterial> > mat_list_t; + mat_list_t mGLTFMaterialWithLocalTextures; }; @@ -120,10 +135,12 @@ public: void delUnit(LLUUID tracking_id); bool checkTextureDimensions(std::string filename); - LLUUID getWorldID(LLUUID tracking_id); - bool isLocal(LLUUID world_id); - std::string getFilename(LLUUID tracking_id); - + LLUUID getWorldID(const LLUUID &tracking_id) const; + bool isLocal(const LLUUID& world_id) const; + std::string getFilename(const LLUUID &tracking_id) const; + boost::signals2::connection setOnChangedCallback(const LLUUID tracking_id, const LLLocalBitmap::LLLocalTextureCallback& cb); + void associateGLTFMaterial(const LLUUID tracking_id, LLGLTFMaterial* mat); + void feedScrollList(LLScrollListCtrl* ctrl); void doUpdates(); void setNeedsRebake(); @@ -134,6 +151,7 @@ private: LLLocalBitmapTimer mTimer; bool mNeedsRebake; typedef std::list<LLLocalBitmap*>::iterator local_list_iter; + typedef std::list<LLLocalBitmap*>::const_iterator local_list_citer; }; #endif |