diff options
Diffstat (limited to 'indra/newview/llvlcomposition.h')
-rw-r--r-- | indra/newview/llvlcomposition.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h index 5db832e034..2a00f61803 100644 --- a/indra/newview/llvlcomposition.h +++ b/indra/newview/llvlcomposition.h @@ -35,6 +35,7 @@ class LLSurface; class LLViewerFetchedTexture; +class LLGLTFMaterial; class LLFetchedGLTFMaterial; class LLTerrainMaterials @@ -56,12 +57,14 @@ public: COUNT }; - BOOL generateMaterials(); + bool generateMaterials(); void boost(); virtual LLUUID getDetailAssetID(S32 asset); virtual void setDetailAssetID(S32 asset, const LLUUID& id); + virtual const LLGLTFMaterial* getMaterialOverride(S32 asset); + virtual void setMaterialOverride(S32 asset, LLGLTFMaterial* mat_override); Type getMaterialType(); bool texturesReady(bool boost, bool strict); // strict = true -> all materials must be sufficiently loaded @@ -74,8 +77,13 @@ protected: // strict = true -> all materials must be sufficiently loaded // strict = false -> at least one material must be loaded static bool materialReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, bool boost, bool strict); + // *NOTE: Prefer calling materialReady if mat is known to be LLFetchedGLTFMaterial + static bool materialTexturesReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, bool boost, bool strict); + LLPointer<LLViewerFetchedTexture> mDetailTextures[ASSET_COUNT]; LLPointer<LLFetchedGLTFMaterial> mDetailMaterials[ASSET_COUNT]; + LLPointer<LLGLTFMaterial> mDetailMaterialOverrides[ASSET_COUNT]; + LLPointer<LLFetchedGLTFMaterial> mDetailRenderMaterials[ASSET_COUNT]; bool mMaterialTexturesSet[ASSET_COUNT]; }; @@ -96,10 +104,11 @@ public: void setSurface(LLSurface *surfacep); // Viewer side hack to generate composition values - BOOL generateHeights(const F32 x, const F32 y, const F32 width, const F32 height); - BOOL generateComposition(); + bool generateHeights(const F32 x, const F32 y, const F32 width, const F32 height); + bool generateComposition(); // Generate texture from composition values. - BOOL generateMinimapTileLand(const F32 x, const F32 y, const F32 width, const F32 height); + bool generateMinimapTileLand(const F32 x, const F32 y, const F32 width, const F32 height); + bool generateTexture(const F32 x, const F32 y, const F32 width, const F32 height); // Use these as indeces ito the get/setters below that use 'corner' enum ECorner @@ -120,14 +129,11 @@ public: friend class LLVOSurfacePatch; friend class LLDrawPoolTerrain; - void setParamsReady() { mParamsReady = TRUE; } - BOOL getParamsReady() const { return mParamsReady; } + void setParamsReady() { mParamsReady = true; } + bool getParamsReady() const { return mParamsReady; } protected: - static bool textureReady(LLPointer<LLViewerFetchedTexture>& tex, bool boost = false); - static bool materialReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, bool boost = false); - - BOOL mParamsReady = FALSE; + bool mParamsReady = false; LLSurface *mSurfacep; // Final minimap raw images |