summaryrefslogtreecommitdiff
path: root/indra/newview/llvlcomposition.h
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-10-13 09:56:55 -0700
committerCosmic Linden <cosmic@lindenlab.com>2023-10-13 09:56:55 -0700
commit76bf3390eb119a7dfd879bbbc31b4d5e687aac8f (patch)
treec9ffb43b525d5c73915603690fe51c329ef124c6 /indra/newview/llvlcomposition.h
parent2d10941459cf66d34073925c136d70bd6dbece3f (diff)
DRTVWR-592: (WIP) Detect when terrain materials are loaded, use as fallback when terrain textures do not load
Diffstat (limited to 'indra/newview/llvlcomposition.h')
-rw-r--r--indra/newview/llvlcomposition.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h
index 2dd04ac5a5..3e465efc95 100644
--- a/indra/newview/llvlcomposition.h
+++ b/indra/newview/llvlcomposition.h
@@ -28,10 +28,13 @@
#define LL_LLVLCOMPOSITION_H
#include "llviewerlayer.h"
-#include "llviewertexture.h"
+#include "llpointer.h"
class LLSurface;
+class LLViewerFetchedTexture;
+class LLFetchedGLTFMaterial;
+
class LLVLComposition : public LLViewerLayer
{
public:
@@ -46,6 +49,10 @@ public:
// Generate texture from composition values.
BOOL generateTexture(const F32 x, const F32 y, const F32 width, const F32 height);
+ // Heights map into textures (or materials) as 0-1 = first, 1-2 = second, etc.
+ // So we need to compress heights into this range.
+ static const S32 ASSET_COUNT = 4;
+
// Use these as indeces ito the get/setters below that use 'corner'
enum ECorner
{
@@ -55,12 +62,12 @@ public:
NORTHEAST = 3,
CORNER_COUNT = 4
};
- LLUUID getDetailTextureID(S32 corner);
- LLViewerFetchedTexture* getDetailTexture(S32 corner);
+
+ LLUUID getDetailAssetID(S32 asset);
F32 getStartHeight(S32 corner);
F32 getHeightRange(S32 corner);
- void setDetailTextureID(S32 corner, const LLUUID& id);
+ void setDetailAssetID(S32 asset, const LLUUID& id);
void setStartHeight(S32 corner, F32 start_height);
void setHeightRange(S32 corner, F32 range);
@@ -73,8 +80,10 @@ protected:
LLSurface *mSurfacep;
BOOL mTexturesLoaded;
- LLPointer<LLViewerFetchedTexture> mDetailTextures[CORNER_COUNT];
- LLPointer<LLImageRaw> mRawImages[CORNER_COUNT];
+ // TODO: Set flag to indicate whether the textures or materials loaded first
+ LLPointer<LLViewerFetchedTexture> mDetailTextures[ASSET_COUNT];
+ LLPointer<LLImageRaw> mRawImages[ASSET_COUNT];
+ LLPointer<LLFetchedGLTFMaterial> mDetailMaterials[ASSET_COUNT];
F32 mStartHeight[CORNER_COUNT];
F32 mHeightRange[CORNER_COUNT];