diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-06-13 14:59:28 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-06-13 14:59:28 -0700 |
commit | 5e60392c273f0c9c5efa765a05414c618381780a (patch) | |
tree | d1eedbb1dfa86e66532a6d8746b7a81e5a444d3a /indra/newview/gltfscenemanager.h | |
parent | 0f3c3563b0861e8ea82b201aab8343d99f993bbc (diff) | |
parent | 100ebbab2437de7f5d124a0d7b8279a7a7b57656 (diff) |
Merge branch 'develop' of github.com:secondlife/viewer into roxie/webrtc-voice
Diffstat (limited to 'indra/newview/gltfscenemanager.h')
-rw-r--r-- | indra/newview/gltfscenemanager.h | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/indra/newview/gltfscenemanager.h b/indra/newview/gltfscenemanager.h index 7966606dfa..7da413e8b2 100644 --- a/indra/newview/gltfscenemanager.h +++ b/indra/newview/gltfscenemanager.h @@ -28,6 +28,10 @@ #include "llsingleton.h" #include "llviewerobject.h" +#include "gltf/common.h" + +class LLVOVolume; +class LLDrawable; namespace LL { @@ -40,16 +44,30 @@ namespace LL void load(); // open filepicker to choose asset void load(const std::string& filename); // load asset from filename + void saveAs(); // open filepicker and choose file to save selected asset to + void save(const std::string& filename); // save selected asset to filename (suitable for use in external programs) + void uploadSelection(); // decompose selected asset and upload to simulator + void update(); - void render(bool opaque, bool rigged = false); + void render(bool opaque, bool rigged = false, bool unlit = false); + + // render the given variant of all assets + // variant - bitmask according to LLGLSLShader::GLTFVariant flags + void render(U8 variant); + + void render(LL::GLTF::Asset& asset, U8 variant); + + // bind the given material for rendering + void bind(LL::GLTF::Asset& asset, LL::GLTF::Material& material); + void renderOpaque(); void renderAlpha(); LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probe, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probe, S32* node_hit, // return the index of the node that was hit S32* primitive_hit, // return the index of the primitive that was hit LLVector4a* intersection, // return the intersection point @@ -57,12 +75,25 @@ namespace LL LLVector4a* normal, // return the surface normal at the intersection point LLVector4a* tangent); // return the surface tangent at the intersection point - bool lineSegmentIntersect(LLVOVolume* obj, GLTF::Asset* asset, const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32* face_hitp, S32* primitive_hitp, + bool lineSegmentIntersect(LLVOVolume* obj, LL::GLTF::Asset* asset, const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32* face_hitp, S32* primitive_hitp, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent); void renderDebug(); + void addGLTFObject(LLViewerObject* object, LLUUID gltf_id); + static void onGLTFLoadComplete(const LLUUID& id, LLAssetType::EType asset_type, void* user_data, S32 status, LLExtStat ext_status); + static void onGLTFBinLoadComplete(const LLUUID& id, LLAssetType::EType asset_type, void* user_data, S32 status, LLExtStat ext_status); + std::vector<LLPointer<LLViewerObject>> mObjects; + + std::shared_ptr<GLTF::Asset> mUploadingAsset; + bool mGLTFUploadPending = false; + LLPointer<LLViewerObject> mUploadingObject; + U32 mPendingImageUploads = 0; + U32 mPendingBinaryUploads = 0; + U32 mPendingGLTFUploads = 0; + + U32 mJointUBO = 0; }; } |