diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-16 16:16:53 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-16 16:16:53 -0500 |
commit | 18b0aa03717cd8209b6c239457bcf69f0d39ecf7 (patch) | |
tree | 7ad75cf8db7249a49b1bd55770390991c1198e7e /indra/llimage | |
parent | f5d66e79eec07384ef6f4fd3f516f7a9d010fb9e (diff) |
SL-17619 Add support for embedded textures to GLTF importer
Diffstat (limited to 'indra/llimage')
-rw-r--r-- | indra/llimage/llimage.cpp | 9 | ||||
-rw-r--r-- | indra/llimage/llimage.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 0fa027c9c3..ad7124b5aa 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -815,6 +815,15 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) ++sRawImageCount; } +LLImageRaw::LLImageRaw(const U8* data, U16 width, U16 height, S8 components) + : LLImageBase() +{ + if (allocateDataSize(width, height, components)) + { + memcpy(getData(), data, width * height * components); + } +} + LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy) : LLImageBase() { diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 7a588cfb03..59c192d9f8 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -184,6 +184,7 @@ protected: public: LLImageRaw(); LLImageRaw(U16 width, U16 height, S8 components); + LLImageRaw(const U8* data, U16 width, U16 height, S8 components); LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy = false); // Construct using createFromFile (used by tools) //LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only = false); |