diff options
author | Dave Parks <davep@lindenlab.com> | 2024-05-28 09:45:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-28 09:45:40 -0500 |
commit | 2f4120038429c6aff865f153f708ceefb60d67f4 (patch) | |
tree | 85e63488eb66760996fd2e0c55c40fdc7b5b38b3 /indra/llrender | |
parent | db627bc3544b828982a2a366972e0adf86e42f75 (diff) |
Remove tinygltf dependency from LL::GLTF (#1541)
* #1535 Image loading/saving support in boost::json driven GLTF parser
* #1536 GLB Support in boost::json drvien GLTF parser
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 6 | ||||
-rw-r--r-- | indra/llrender/llglslshader.h | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index f6b1ca3741..ecd0c6908b 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1049,6 +1049,12 @@ void LLGLSLShader::bind() } } +void LLGLSLShader::bind(LLGLSLShader::GLTFVariant variant) +{ + llassert(mGLTFVariants.size() == LLGLSLShader::NUM_GLTF_VARIANTS); + mGLTFVariants[variant].bind(); +} + void LLGLSLShader::bind(bool rigged) { if (rigged) diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 75e1bdfd54..fa01d212e1 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -44,6 +44,7 @@ public: bool hasTransport = false; // implies no lighting (it's possible to have neither though) bool hasSkinning = false; bool hasObjectSkinning = false; + bool mGLTF = false; bool hasAtmospherics = false; bool hasGamma = false; bool hasShadows = false; @@ -318,6 +319,22 @@ public: // this pointer should be set to whichever shader represents this shader's rigged variant LLGLSLShader* mRiggedVariant = nullptr; + // variants for use by GLTF renderer + // "this" is considered to be OPAQUE + enum GLTFVariant + { + STATIC_OPAQUE, + STATIC_BLEND, + RIGGED_OPAQUE, + RIGGED_BLEND, + NUM_GLTF_VARIANTS + }; + + std::vector<LLGLSLShader> mGLTFVariants; + + //helper to bind GLTF variant + void bind(GLTFVariant variant); + // hacky flag used for optimization in LLDrawPoolAlpha bool mCanBindFast = false; |