Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts: # autobuild.xml # indra/cmake/APR.cmake # indra/cmake/Copy3rdPartyLibs.cmake # indra/newview/llappviewer.cpp # indra/newview/llface.cpp # indra/newview/llface.h # indra/newview/llpanelface.cpp # indra/newview/llpanelface.h # indra/newview/llviewerobjectlist.cpp # indra/newview/llviewerobjectlist.h # indra/newview/llvoavatar.cpp # indra/newview/pipeline.cpp # indra/newview/viewer_manifest.pymaster
commit
3be6763aa0
|
|
@ -396,11 +396,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>dc4a38439f90325b406ec3f7cc4fa66edf0eeec8</string>
|
||||
<string>058ffb9080ac03abd8ecd1f57fcc1160351c71ed</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.2-e935465/apr_suite-1.7.2-e935465-darwin64-e935465.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.4-r1/apr_suite-1.7.4-10278668642-darwin64-10278668642.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -410,11 +410,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>95137cd3f4d6ffa5bd7a00d7d91bd8fc272b7ca2</string>
|
||||
<string>272d97471f6ecf6e1eb4802f353d1f8c6f024eb3</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.2-c5f3347/apr_suite-1.7.2-c5f3347-linux64-c5f3347.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.4-r1/apr_suite-1.7.4-10278668642-linux64-10278668642.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux64</string>
|
||||
|
|
@ -424,11 +424,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>8233de9a11f323a03d569db1043ba5198176457b</string>
|
||||
<string>587b0b61ecff2ac55cfbcb8e57a7b07c844a0069</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.2-e935465/apr_suite-1.7.2-e935465-windows64-e935465.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.4-r1/apr_suite-1.7.4-10278668642-windows64-10278668642.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
|
|
@ -441,7 +441,7 @@
|
|||
<key>copyright</key>
|
||||
<string>Copyright © 2012 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.</string>
|
||||
<key>version</key>
|
||||
<string>1.7.2-e935465</string>
|
||||
<string>1.7.4-10278668642</string>
|
||||
<key>name</key>
|
||||
<string>apr_suite</string>
|
||||
<key>description</key>
|
||||
|
|
@ -862,11 +862,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>b85526ca80b6a7e73c7870285cf68d568f742095</string>
|
||||
<string>bd61ec7787ea96d11f735afa5a6296ed175472b6</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-expat/releases/download/v2.1.1.1f36d02/expat-2.1.1.1f36d02-darwin64-1f36d02.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-expat/releases/download/v2.6.2-r4/expat-2.6.2-r4-darwin64-10278332617.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -876,11 +876,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>4cd82e2dec06ddff19e9b3dc0254f2593ec80452</string>
|
||||
<string>acf891bda4125a92f6347e69f0e7867f32cebd20</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-expat/releases/download/v2.1.1.1f36d02/expat-2.1.1.1f36d02-linux64-1f36d02.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-expat/releases/download/v2.6.2-r4/expat-2.6.2-r4-linux64-10278332617.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux64</string>
|
||||
|
|
@ -890,11 +890,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>47c01a89bc32c5740efe51be43e459ffd9b7cd34</string>
|
||||
<string>1b9c198626fca0f30fb2770856e65767a9951683</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-expat/releases/download/v2.1.1.1f36d02/expat-2.1.1.1f36d02-windows64-1f36d02.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-expat/releases/download/v2.6.2-r4/expat-2.6.2-r4-windows64-10278332617.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
|
|
@ -905,9 +905,9 @@
|
|||
<key>license_file</key>
|
||||
<string>LICENSES/expat.txt</string>
|
||||
<key>copyright</key>
|
||||
<string>Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.</string>
|
||||
<string>Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper - Copyright (c) 2001-2022 Expat maintainers.</string>
|
||||
<key>version</key>
|
||||
<string>2.1.1.1f36d02</string>
|
||||
<string>2.6.2-r4</string>
|
||||
<key>name</key>
|
||||
<string>expat</string>
|
||||
<key>description</key>
|
||||
|
|
@ -3030,11 +3030,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>1a73c476b371b62066d1c3eced249660e9467e53</string>
|
||||
<string>fc9362865e33391d55c64d6101726da0a25d924e</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1-69ff69a/xxhash-0.8.1-69ff69a-common-69ff69a.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.2-r1/xxhash-0.8.2-10285735820-common-10285735820.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>common</string>
|
||||
|
|
@ -3047,7 +3047,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>copyright</key>
|
||||
<string>Copyright (c) 2012-2021 Yann Collet</string>
|
||||
<key>version</key>
|
||||
<string>0.8.1-69ff69a</string>
|
||||
<string>0.8.2-10285735820</string>
|
||||
<key>name</key>
|
||||
<string>xxhash</string>
|
||||
<key>description</key>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ if (WINDOWS)
|
|||
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
|
||||
)
|
||||
target_compile_definitions( ll::apr INTERFACE APR_DECLARE_STATIC=1 APU_DECLARE_STATIC=1 API_DECLARE_STATIC=1)
|
||||
elseif (DARWIN)
|
||||
if (LLCOMMON_LINK_SHARED)
|
||||
set(APR_selector "0.dylib")
|
||||
|
|
@ -28,17 +29,16 @@ elseif (DARWIN)
|
|||
endif (LLCOMMON_LINK_SHARED)
|
||||
|
||||
target_link_libraries( ll::apr INTERFACE
|
||||
libapr-1.${APR_selector}
|
||||
libaprutil-1.${APRUTIL_selector}
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.${APR_selector}
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.${APR_selector}
|
||||
iconv
|
||||
)
|
||||
else (WINDOWS)
|
||||
else()
|
||||
# linux
|
||||
target_link_libraries( ll::apr INTERFACE
|
||||
apr-1
|
||||
aprutil-1
|
||||
uuid
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a
|
||||
rt
|
||||
)
|
||||
endif (WINDOWS)
|
||||
endif ()
|
||||
target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 )
|
||||
|
|
|
|||
|
|
@ -55,12 +55,15 @@ if(WINDOWS)
|
|||
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(release_files
|
||||
#openjp2.dll # <FS:Ansariel> Only copy OpenJPEG dll if needed
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
nghttp2.dll
|
||||
glod.dll # <FS:Beq> restore GLOD
|
||||
)
|
||||
|
||||
if(LLCOMMON_LINK_SHARED)
|
||||
set(release_files ${release_files} libapr-1.dll)
|
||||
set(release_files ${release_files} libaprutil-1.dll)
|
||||
endif()
|
||||
|
||||
# <FS:Ansariel> Only copy OpenJPEG dll if needed
|
||||
if (NOT USE_KDU)
|
||||
set(release_files ${release_files} openjp2.dll)
|
||||
|
|
@ -194,11 +197,6 @@ elseif(DARWIN)
|
|||
)
|
||||
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(release_files
|
||||
libapr-1.0.dylib
|
||||
libapr-1.dylib
|
||||
libaprutil-1.0.dylib
|
||||
libaprutil-1.dylib
|
||||
${EXPAT_COPY}
|
||||
libGLOD.dylib # <FS:Beq> restore GLOD
|
||||
libndofdev.dylib
|
||||
libnghttp2.dylib
|
||||
|
|
@ -207,6 +205,15 @@ elseif(DARWIN)
|
|||
libgrowl++.dylib
|
||||
)
|
||||
|
||||
if(LLCOMMON_LINK_SHARED)
|
||||
set(release_files ${release_files}
|
||||
libapr-1.0.dylib
|
||||
libapr-1.dylib
|
||||
libaprutil-1.0.dylib
|
||||
libaprutil-1.dylib
|
||||
)
|
||||
endif()
|
||||
|
||||
if (TARGET ll::fmodstudio)
|
||||
set(debug_files ${debug_files} libfmodL.dylib)
|
||||
set(release_files ${release_files} libfmod.dylib)
|
||||
|
|
@ -264,8 +271,6 @@ elseif(LINUX)
|
|||
|
||||
if( USE_AUTOBUILD_3P )
|
||||
list( APPEND release_files
|
||||
libapr-1.so.0
|
||||
libaprutil-1.so.0
|
||||
|
||||
|
||||
#libopenjp2.so
|
||||
|
|
@ -276,6 +281,13 @@ elseif(LINUX)
|
|||
libgmodule-2.0.a
|
||||
libgobject-2.0.a
|
||||
)
|
||||
|
||||
if(LLCOMMON_LINK_SHARED)
|
||||
set(release_files ${release_files}
|
||||
libapr-1.so.0
|
||||
libaprutil-1.so.0
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TARGET ll::fmodstudio)
|
||||
|
|
|
|||
|
|
@ -7,14 +7,13 @@ add_library( ll::expat INTERFACE IMPORTED )
|
|||
use_system_binary(expat)
|
||||
use_prebuilt_binary(expat)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::expat INTERFACE libexpatMT )
|
||||
set(EXPAT_COPY libexpatMT.dll)
|
||||
else (WINDOWS)
|
||||
target_link_libraries( ll::expat INTERFACE expat )
|
||||
if (DARWIN)
|
||||
set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
|
||||
else ()
|
||||
set(EXPAT_COPY libexpat.so.1 libexpat.so)
|
||||
endif ()
|
||||
endif (WINDOWS)
|
||||
target_compile_definitions( ll::expat INTERFACE XML_STATIC=1)
|
||||
target_link_libraries( ll::expat INTERFACE
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpatd.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.lib)
|
||||
else ()
|
||||
target_link_libraries( ll::expat INTERFACE
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpat.a
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.a)
|
||||
endif ()
|
||||
target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
|
||||
|
|
|
|||
|
|
@ -155,8 +155,6 @@ if (DARWIN)
|
|||
# for portability. This operation is Darwin-specific. We can count on the
|
||||
# 'cp' command.
|
||||
set(copy_dylibs
|
||||
libapr-1.0.dylib
|
||||
libaprutil-1.0.dylib
|
||||
libnghttp2*.dylib
|
||||
${EXPAT_COPY}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -303,15 +303,18 @@ public:
|
|||
|
||||
enum eTexIndex : U8
|
||||
{
|
||||
DIFFUSE_MAP = 0,
|
||||
ALTERNATE_DIFFUSE_MAP = 1,
|
||||
NORMAL_MAP = 1,
|
||||
SPECULAR_MAP = 2,
|
||||
BASECOLOR_MAP = 3,
|
||||
// Channels for material textures
|
||||
DIFFUSE_MAP = 0,
|
||||
ALTERNATE_DIFFUSE_MAP = 1,
|
||||
NORMAL_MAP = 1,
|
||||
SPECULAR_MAP = 2,
|
||||
// Channels for PBR textures
|
||||
BASECOLOR_MAP = 3,
|
||||
METALLIC_ROUGHNESS_MAP = 4,
|
||||
GLTF_NORMAL_MAP = 5,
|
||||
EMISSIVE_MAP = 6,
|
||||
NUM_TEXTURE_CHANNELS = 7,
|
||||
GLTF_NORMAL_MAP = 5,
|
||||
EMISSIVE_MAP = 6,
|
||||
// Total number of channels
|
||||
NUM_TEXTURE_CHANNELS = 7,
|
||||
};
|
||||
|
||||
enum eVolumeTexIndex : U8
|
||||
|
|
|
|||
|
|
@ -913,7 +913,7 @@ void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& c
|
|||
}
|
||||
gGL.end();
|
||||
|
||||
LLRender2D::getInstance()->setLineWidth(1.f);
|
||||
LLRender2D::setLineWidth(1.f);
|
||||
}
|
||||
|
||||
void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, bool filled, F32 start_angle, F32 end_angle)
|
||||
|
|
|
|||
|
|
@ -122,12 +122,13 @@ inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, bool
|
|||
|
||||
class LLImageProviderInterface;
|
||||
|
||||
class LLRender2D : public LLParamSingleton<LLRender2D>
|
||||
class LLRender2D : public LLSimpleton<LLRender2D>
|
||||
{
|
||||
LLSINGLETON(LLRender2D, LLImageProviderInterface* image_provider);
|
||||
LOG_CLASS(LLRender2D);
|
||||
~LLRender2D();
|
||||
public:
|
||||
LLRender2D(LLImageProviderInterface* image_provider);
|
||||
~LLRender2D();
|
||||
|
||||
static void pushMatrix();
|
||||
static void popMatrix();
|
||||
static void loadIdentity();
|
||||
|
|
|
|||
|
|
@ -81,10 +81,10 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
|
|||
}
|
||||
}
|
||||
|
||||
LLRender2D::getInstance()->pushMatrix();
|
||||
LLRender2D::pushMatrix();
|
||||
{
|
||||
LLVector3 rect_origin = origin_agent + ((F32)rect.mLeft * x_axis) + ((F32)rect.mBottom * y_axis);
|
||||
LLRender2D::getInstance()->translate(rect_origin.mV[VX],
|
||||
LLRender2D::translate(rect_origin.mV[VX],
|
||||
rect_origin.mV[VY],
|
||||
rect_origin.mV[VZ]);
|
||||
gGL.getTexUnit(0)->bind(getImage());
|
||||
|
|
@ -103,7 +103,7 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
|
|||
(F32)rect.getWidth() * x_axis,
|
||||
(F32)rect.getHeight() * y_axis);
|
||||
|
||||
} LLRender2D::getInstance()->popMatrix();
|
||||
} LLRender2D::popMatrix();
|
||||
}
|
||||
|
||||
//#include "lluiimage.inl"
|
||||
|
|
|
|||
|
|
@ -811,6 +811,18 @@ void LLVertexBuffer::setLabel(const char* label) {
|
|||
}
|
||||
#endif
|
||||
|
||||
void LLVertexBuffer::clone(LLVertexBuffer& target) const
|
||||
{
|
||||
target.mTypeMask = mTypeMask;
|
||||
target.mIndicesType = mIndicesType;
|
||||
target.mIndicesStride = mIndicesStride;
|
||||
if (target.getNumVerts() != getNumVerts() ||
|
||||
target.getNumIndices() != getNumIndices())
|
||||
{
|
||||
target.allocateBuffer(getNumVerts(), getNumIndices());
|
||||
}
|
||||
}
|
||||
|
||||
void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const
|
||||
{
|
||||
llassert(validateRange(start, end, count, indices_offset));
|
||||
|
|
|
|||
|
|
@ -163,13 +163,13 @@ public:
|
|||
|
||||
// set for rendering
|
||||
// assumes (and will assert on) the following:
|
||||
// - this buffer has no pending unampBuffer call
|
||||
// - this buffer has no pending unmapBuffer call
|
||||
// - a shader is currently bound
|
||||
// - This buffer has sufficient attributes within it to satisfy the needs of the currently bound shader
|
||||
void setBuffer();
|
||||
|
||||
// Only call each getVertexPointer, etc, once before calling unmapBuffer()
|
||||
// call unmapBuffer() after calls to getXXXStrider() before any cals to setBuffer()
|
||||
// call unmapBuffer() after calls to getXXXStrider() before any calls to setBuffer()
|
||||
// example:
|
||||
// vb->getVertexBuffer(verts);
|
||||
// vb->getNormalStrider(norms);
|
||||
|
|
@ -222,12 +222,12 @@ public:
|
|||
U32 getNumIndices() const { return mNumIndices; }
|
||||
|
||||
U32 getTypeMask() const { return mTypeMask; }
|
||||
bool hasDataType(AttributeType type) const { return ((1 << type) & getTypeMask()); }
|
||||
bool hasDataType(AttributeType type) const { return ((1 << type) & getTypeMask()); }
|
||||
U32 getSize() const { return mSize; }
|
||||
U32 getIndicesSize() const { return mIndicesSize; }
|
||||
U8* getMappedData() const { return mMappedData; }
|
||||
U8* getMappedIndices() const { return mMappedIndexData; }
|
||||
U32 getOffset(AttributeType type) const { return mOffsets[type]; }
|
||||
U32 getOffset(AttributeType type) const { return mOffsets[type]; }
|
||||
|
||||
// these functions assume (and assert on) the current VBO being bound
|
||||
// Detailed error checking can be enabled by setting gDebugGL to true
|
||||
|
|
@ -246,6 +246,7 @@ public:
|
|||
void setLabel(const char* label);
|
||||
#endif
|
||||
|
||||
void clone(LLVertexBuffer& target) const;
|
||||
|
||||
protected:
|
||||
U32 mGLBuffer = 0; // GL VBO handle
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ void LLFocusMgr::releaseFocusIfNeeded( LLView* view )
|
|||
}
|
||||
}
|
||||
|
||||
LLUI::getInstance()->removePopup(view);
|
||||
if(LLUI::instanceExists()) LLUI::getInstance()->removePopup(view);
|
||||
}
|
||||
|
||||
void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, bool lock, bool keystrokes_only)
|
||||
|
|
@ -481,7 +481,7 @@ void LLFocusMgr::setAppHasFocus(bool focus)
|
|||
// release focus from "top ctrl"s, which generally hides them
|
||||
if (!focus)
|
||||
{
|
||||
LLUI::getInstance()->clearPopups();
|
||||
if(LLUI::instanceExists()) LLUI::getInstance()->clearPopups();
|
||||
}
|
||||
mAppHasFocus = focus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ mWindow(NULL), // set later in startup
|
|||
mRootView(NULL),
|
||||
mHelpImpl(NULL)
|
||||
{
|
||||
LLRender2D::initParamSingleton(image_provider);
|
||||
LLRender2D::createInstance(image_provider);
|
||||
|
||||
if ((get_ptr_in_map(mSettingGroups, std::string("config")) == NULL) ||
|
||||
(get_ptr_in_map(mSettingGroups, std::string("floater")) == NULL) ||
|
||||
|
|
@ -223,6 +223,11 @@ mHelpImpl(NULL)
|
|||
LLCommandManager::load();
|
||||
}
|
||||
|
||||
LLUI::~LLUI()
|
||||
{
|
||||
LLRender2D::deleteSingleton();
|
||||
}
|
||||
|
||||
void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& remove_popup, const clear_popups_t& clear_popups)
|
||||
{
|
||||
mAddPopupFunc = add_popup;
|
||||
|
|
|
|||
|
|
@ -118,18 +118,18 @@ class LLImageProviderInterface;
|
|||
|
||||
typedef void (*LLUIAudioCallback)(const LLUUID& uuid);
|
||||
|
||||
class LLUI : public LLParamSingleton<LLUI>
|
||||
class LLUI : public LLSimpleton<LLUI>
|
||||
{
|
||||
LOG_CLASS(LLUI);
|
||||
public:
|
||||
typedef std::map<std::string, LLControlGroup*, std::less<> > settings_map_t;
|
||||
|
||||
private:
|
||||
LLSINGLETON(LLUI , const settings_map_t &settings,
|
||||
LLUI(const settings_map_t &settings,
|
||||
LLImageProviderInterface* image_provider,
|
||||
LLUIAudioCallback audio_callback,
|
||||
LLUIAudioCallback deferred_audio_callback);
|
||||
LOG_CLASS(LLUI);
|
||||
public:
|
||||
~LLUI();
|
||||
|
||||
//
|
||||
// Classes
|
||||
//
|
||||
|
|
|
|||
|
|
@ -977,7 +977,7 @@ bool LLAppViewer::init()
|
|||
// <FS:Ansariel> Optional legacy notification well
|
||||
gSavedSettings.setBOOL("FSInternalLegacyNotificationWell", gSavedSettings.getBOOL("FSLegacyNotificationWell"));
|
||||
|
||||
LLUI::initParamSingleton(settings_map,
|
||||
LLUI::createInstance(settings_map,
|
||||
LLUIImageList::getInstance(),
|
||||
ui_audio_callback,
|
||||
deferred_ui_audio_callback);
|
||||
|
|
@ -2536,6 +2536,7 @@ bool LLAppViewer::cleanup()
|
|||
LLViewerEventRecorder::deleteSingleton();
|
||||
LLWorld::deleteSingleton();
|
||||
LLVoiceClient::deleteSingleton();
|
||||
LLUI::deleteSingleton();
|
||||
|
||||
// It's not at first obvious where, in this long sequence, a generic cleanup
|
||||
// call OUGHT to go. So let's say this: as we migrate cleanup from
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
|
|||
mDrawablep->getSpatialGroup()->rebuildGeom();
|
||||
mDrawablep->getSpatialGroup()->rebuildMesh();
|
||||
|
||||
if(mVertexBuffer.isNull())
|
||||
if (mVertexBuffer.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -596,8 +596,20 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
|
|||
{
|
||||
// cheaters sometimes prosper...
|
||||
//
|
||||
mVertexBuffer->setBuffer();
|
||||
mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
|
||||
LLVertexBuffer* vertex_buffer = mVertexBuffer.get();
|
||||
// To display selection markers (white squares with the rounded cross at the center)
|
||||
// on faces with GLTF textures we use a spectal vertex buffer with other transforms
|
||||
if (const LLTextureEntry* te = getTextureEntry())
|
||||
{
|
||||
if (LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial())
|
||||
{
|
||||
vertex_buffer = mVertexBufferGLTF.get();
|
||||
vertex_buffer->unmapBuffer();
|
||||
}
|
||||
}
|
||||
// Draw the selection marker using the correctly chosen vertex buffer
|
||||
vertex_buffer->setBuffer();
|
||||
vertex_buffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
|
||||
}
|
||||
|
||||
gGL.popMatrix();
|
||||
|
|
@ -1192,7 +1204,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
const LLMatrix3& mat_norm_in,
|
||||
U16 index_offset,
|
||||
bool force_rebuild,
|
||||
bool no_debug_assert)
|
||||
bool no_debug_assert,
|
||||
bool rebuild_for_gltf)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
|
||||
llassert(verify());
|
||||
|
|
@ -1264,6 +1277,58 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
}
|
||||
}
|
||||
|
||||
const LLTextureEntry* tep = mVObjp->getTE(face_index);
|
||||
llassert(tep);
|
||||
if (!tep)
|
||||
return false;
|
||||
|
||||
LLGLTFMaterial* gltf_mat = tep->getGLTFRenderMaterial();
|
||||
// To display selection markers (white squares with the rounded cross at the center)
|
||||
// on faces with GLTF textures we use a special vertex buffer with other transforms
|
||||
if (gltf_mat && !rebuild_for_gltf && tep->isSelected() && mVertexBuffer.notNull())
|
||||
{
|
||||
// Create a temporary vertex buffer to provide transforms for GLTF textures
|
||||
if (mVertexBufferGLTF.isNull())
|
||||
{
|
||||
mVertexBufferGLTF = new LLVertexBuffer(mVertexBuffer->getTypeMask());
|
||||
}
|
||||
|
||||
// Clone the existing vertex buffer into the temporary one
|
||||
mVertexBuffer->clone(*mVertexBufferGLTF);
|
||||
|
||||
// Recursive call the same function with the argument rebuild_for_gltf set to true
|
||||
// This call will make geometry in mVertexBuffer but in fact for mVertexBufferGLTF
|
||||
mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
|
||||
getGeometryVolume(volume, face_index, mat_vert_in, mat_norm_in, index_offset, force_rebuild, no_debug_assert, true);
|
||||
mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
|
||||
}
|
||||
else if (!tep->isSelected() && mVertexBufferGLTF.notNull())
|
||||
{
|
||||
// Free the temporary vertex buffer when it is not needed anymore
|
||||
mVertexBufferGLTF = nullptr;
|
||||
}
|
||||
|
||||
LLGLTFMaterial::TextureInfo gltf_info_index = (LLGLTFMaterial::TextureInfo)0;
|
||||
if (gltf_mat && rebuild_for_gltf)
|
||||
{
|
||||
switch (LLPipeline::sRenderHighlightTextureChannel)
|
||||
{
|
||||
case LLRender::BASECOLOR_MAP:
|
||||
gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR;
|
||||
break;
|
||||
case LLRender::METALLIC_ROUGHNESS_MAP:
|
||||
gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS;
|
||||
break;
|
||||
case LLRender::GLTF_NORMAL_MAP:
|
||||
gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL;
|
||||
break;
|
||||
case LLRender::EMISSIVE_MAP:
|
||||
gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE;
|
||||
break;
|
||||
default:; // just to make clang happy
|
||||
}
|
||||
}
|
||||
|
||||
LLStrider<LLVector3> vert;
|
||||
LLStrider<LLVector2> tex_coords0;
|
||||
LLStrider<LLVector2> tex_coords1;
|
||||
|
|
@ -1282,7 +1347,7 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
LLVector3 scale;
|
||||
if (global_volume)
|
||||
{
|
||||
scale.setVec(1,1,1);
|
||||
scale.setVec(1, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1297,7 +1362,6 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
bool rebuild_tangent = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TANGENT);
|
||||
bool rebuild_weights = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_WEIGHT4);
|
||||
|
||||
const LLTextureEntry *tep = mVObjp->getTE(face_index);
|
||||
const U8 bump_code = tep ? tep->getBumpmap() : 0;
|
||||
|
||||
bool is_static = mDrawablep->isStatic();
|
||||
|
|
@ -1390,7 +1454,6 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
// LLMaterial* mat = tep->getMaterialParams().get();
|
||||
LLMaterial* mat = tep ? tep->getMaterialParams().get() : 0;
|
||||
// </FS:ND>
|
||||
LLGLTFMaterial* gltf_mat = tep->getGLTFRenderMaterial();
|
||||
// <FS:Beq> show legacy when editing the fallback materials.
|
||||
static LLCachedControl<bool> showSelectedinBP(gSavedSettings, "FSShowSelectedInBlinnPhong");
|
||||
if( gltf_mat && getViewerObject()->isSelected() && showSelectedinBP )
|
||||
|
|
@ -1408,13 +1471,27 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
S32 xforms = XFORM_NONE;
|
||||
// For GLTF, transforms will be applied later
|
||||
if (rebuild_tcoord && tep && !gltf_mat)
|
||||
if (rebuild_tcoord && tep && (!gltf_mat || rebuild_for_gltf))
|
||||
{
|
||||
r = tep->getRotation();
|
||||
os = tep->mOffsetS;
|
||||
ot = tep->mOffsetT;
|
||||
ms = tep->mScaleS;
|
||||
mt = tep->mScaleT;
|
||||
if (gltf_mat && rebuild_for_gltf)
|
||||
{
|
||||
// Apply special transformations for mVertexBufferGLTF
|
||||
// They are used only to display a face selection marker
|
||||
// (white square with a rounded cross at the center)
|
||||
const auto& tt = gltf_mat->mTextureTransform[gltf_info_index];
|
||||
r = -tt.mRotation * 2;
|
||||
ms = tt.mScale[VX];
|
||||
mt = tt.mScale[VY];
|
||||
os += tt.mOffset[VX] + (ms - 1) / 2;
|
||||
ot -= tt.mOffset[VY] + (mt - 1) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = tep->getRotation();
|
||||
tep->getOffset(&os, &ot);
|
||||
tep->getScale(&ms, &mt);
|
||||
}
|
||||
|
||||
cos_ang = cos(r);
|
||||
sin_ang = sin(r);
|
||||
|
||||
|
|
@ -1555,12 +1632,9 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
break;
|
||||
}
|
||||
|
||||
F32 s_scale = 1.f;
|
||||
F32 t_scale = 1.f;
|
||||
if( tep )
|
||||
{
|
||||
tep->getScale( &s_scale, &t_scale );
|
||||
}
|
||||
F32 s_scale = tep->getScaleS();
|
||||
F32 t_scale = tep->getScaleT();
|
||||
|
||||
// Use the nudged south when coming from above sun angle, such
|
||||
// that emboss mapping always shows up on the upward faces of cubes when
|
||||
// it's noon (since a lot of builders build with the sun forced to noon).
|
||||
|
|
@ -1586,8 +1660,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
bool tex_anim = false;
|
||||
|
||||
LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;
|
||||
tex_mode = vobj->mTexAnimMode;
|
||||
LLVOVolume* vobj = (LLVOVolume*)mVObjp.get();
|
||||
tex_mode = vobj->mTexAnimMode;
|
||||
|
||||
if (vobj->mTextureAnimp)
|
||||
{ //texture animation is in play, override specular and normal map tex coords with diffuse texcoords
|
||||
|
|
|
|||
|
|
@ -162,7 +162,8 @@ public:
|
|||
const LLMatrix3& mat_normal,
|
||||
U16 index_offset,
|
||||
bool force_rebuild = false,
|
||||
bool no_debug_assert = false);
|
||||
bool no_debug_assert = false,
|
||||
bool rebuild_for_gltf = false);
|
||||
|
||||
// For avatar
|
||||
U16 getGeometryAvatar(
|
||||
|
|
@ -274,6 +275,8 @@ public:
|
|||
|
||||
private:
|
||||
LLPointer<LLVertexBuffer> mVertexBuffer;
|
||||
LLPointer<LLVertexBuffer> mVertexBufferGLTF;
|
||||
|
||||
U32 mState;
|
||||
LLFacePool* mDrawPoolp;
|
||||
U32 mPoolType;
|
||||
|
|
|
|||
|
|
@ -109,8 +109,9 @@ BOOL CALLBACK di8_list_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr,
|
|||
#endif
|
||||
|
||||
LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
|
||||
: LLFloater(data),
|
||||
mHasDeviceList(false)
|
||||
: LLFloater(data)
|
||||
, mHasDeviceList(false)
|
||||
, mJoystickInitialized(false)
|
||||
{
|
||||
// <FS:Zi> FIRE-14344 - Add button preview and allow for more than 6 axes
|
||||
mAxisStatsBar = new LLStatBar*[MAX_JOYSTICK_AXES];
|
||||
|
|
@ -130,7 +131,10 @@ void LLFloaterJoystick::draw()
|
|||
{
|
||||
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
|
||||
bool joystick_inited = joystick->isJoystickInitialized();
|
||||
if (joystick_inited != mHasDeviceList)
|
||||
if (!mHasDeviceList
|
||||
|| mJoystickInitialized != joystick_inited
|
||||
|| (joystick->isDeviceUUIDSet() && joystick->getDeviceUUID().asUUID() != mCurrentDeviceId)
|
||||
|| (!joystick->isDeviceUUIDSet() && mCurrentDeviceId.notNull()))
|
||||
{
|
||||
refreshListOfDevices();
|
||||
}
|
||||
|
|
@ -367,15 +371,16 @@ void LLFloaterJoystick::refreshListOfDevices()
|
|||
mHasDeviceList = true;
|
||||
}
|
||||
|
||||
bool is_device_id_set = LLViewerJoystick::getInstance()->isDeviceUUIDSet();
|
||||
LLViewerJoystick* joystick = LLViewerJoystick::getInstance();
|
||||
bool is_device_id_set = joystick->isDeviceUUIDSet();
|
||||
|
||||
if (LLViewerJoystick::getInstance()->isJoystickInitialized() &&
|
||||
if (joystick->isJoystickInitialized() &&
|
||||
(!mHasDeviceList || !is_device_id_set))
|
||||
{
|
||||
#if LL_WINDOWS && !LL_MESA_HEADLESS
|
||||
LL_WARNS() << "NDOF connected to device without using SL provided handle" << LL_ENDL;
|
||||
#endif
|
||||
std::string desc = LLViewerJoystick::getInstance()->getDescription();
|
||||
std::string desc = joystick->getDescription();
|
||||
if (!desc.empty())
|
||||
{
|
||||
LLSD value = LLSD::Integer(1); // value for selection
|
||||
|
|
@ -388,11 +393,13 @@ void LLFloaterJoystick::refreshListOfDevices()
|
|||
{
|
||||
if (is_device_id_set)
|
||||
{
|
||||
LLSD guid = LLViewerJoystick::getInstance()->getDeviceUUID();
|
||||
LLSD guid = joystick->getDeviceUUID();
|
||||
mCurrentDeviceId = guid.asUUID();
|
||||
mJoysticksCombo->selectByValue(guid);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurrentDeviceId.setNull();
|
||||
mJoysticksCombo->selectByValue(LLSD::Integer(1));
|
||||
}
|
||||
}
|
||||
|
|
@ -400,6 +407,18 @@ void LLFloaterJoystick::refreshListOfDevices()
|
|||
{
|
||||
mJoysticksCombo->selectByValue(LLSD::Integer(0));
|
||||
}
|
||||
|
||||
// Update tracking
|
||||
if (is_device_id_set)
|
||||
{
|
||||
LLSD guid = joystick->getDeviceUUID();
|
||||
mCurrentDeviceId = guid.asUUID();
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurrentDeviceId.setNull();
|
||||
}
|
||||
mJoystickInitialized = joystick->isJoystickInitialized();
|
||||
}
|
||||
|
||||
void LLFloaterJoystick::cancel()
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ private:
|
|||
LLComboBox *mJoysticksCombo;
|
||||
|
||||
bool mHasDeviceList;
|
||||
bool mJoystickInitialized;
|
||||
LLUUID mCurrentDeviceId;
|
||||
|
||||
// stats view
|
||||
// <FS:Zi> FIRE-14344 - Add button preview and allow for more than 6 axes
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -126,59 +126,62 @@ public:
|
|||
return new_material;
|
||||
}
|
||||
|
||||
LLGLTFMaterial::TextureInfo getPBRTextureInfo();
|
||||
LLRender::eTexIndex getTextureChannelToEdit();
|
||||
LLRender::eTexIndex getMatTextureChannel();
|
||||
LLRender::eTexIndex getPBRTextureChannel();
|
||||
LLRender::eTexIndex getTextureDropChannel();
|
||||
LLGLTFMaterial::TextureInfo getPBRDropChannel();
|
||||
|
||||
protected:
|
||||
void navigateToTitleMedia(const std::string url);
|
||||
bool selectedMediaEditable();
|
||||
void clearMediaSettings();
|
||||
void updateMediaSettings();
|
||||
void updateMediaTitle();
|
||||
void navigateToTitleMedia(const std::string url);
|
||||
bool selectedMediaEditable();
|
||||
void clearMediaSettings();
|
||||
void updateMediaSettings();
|
||||
void updateMediaTitle();
|
||||
|
||||
void getState();
|
||||
void getState();
|
||||
|
||||
void sendTexture(); // applies and sends texture
|
||||
void sendTextureInfo(); // applies and sends texture scale, offset, etc.
|
||||
void sendColor(); // applies and sends color
|
||||
void sendAlpha(); // applies and sends transparency
|
||||
void sendBump(U32 bumpiness); // applies and sends bump map
|
||||
void sendTexGen(); // applies and sends bump map
|
||||
void sendShiny(U32 shininess); // applies and sends shininess
|
||||
void sendFullbright(); // applies and sends full bright
|
||||
void sendTexture(); // applies and sends texture
|
||||
void sendTextureInfo(); // applies and sends texture scale, offset, etc.
|
||||
void sendColor(); // applies and sends color
|
||||
void sendAlpha(); // applies and sends transparency
|
||||
void sendBump(U32 bumpiness); // applies and sends bump map
|
||||
void sendTexGen(); // applies and sends bump map
|
||||
void sendShiny(U32 shininess); // applies and sends shininess
|
||||
void sendFullbright(); // applies and sends full bright
|
||||
|
||||
void sendGlow();
|
||||
void alignTextureLayer();
|
||||
void sendGlow();
|
||||
void alignTextureLayer();
|
||||
|
||||
void updateCopyTexButton();
|
||||
void updateCopyTexButton();
|
||||
|
||||
void onCommitPbr(const LLSD& data);
|
||||
void onCancelPbr(const LLSD& data);
|
||||
void onSelectPbr(const LLSD& data);
|
||||
static bool onDragPbr(LLUICtrl* ctrl, LLInventoryItem* item);
|
||||
void onCommitPbr();
|
||||
void onCancelPbr();
|
||||
void onSelectPbr();
|
||||
|
||||
// this function is to return true if the drag should succeed.
|
||||
static bool onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item);
|
||||
// These functions are to return true if the drag should succeed
|
||||
bool onDragPbr(LLInventoryItem* item);
|
||||
bool onDragTexture(LLInventoryItem* item);
|
||||
|
||||
void onCommitTexture(const LLSD& data);
|
||||
void onCancelTexture(const LLSD& data);
|
||||
void onSelectTexture(const LLSD& data);
|
||||
void onCommitSpecularTexture(const LLSD& data);
|
||||
void onCancelSpecularTexture(const LLSD& data);
|
||||
void onSelectSpecularTexture(const LLSD& data);
|
||||
void onCommitNormalTexture(const LLSD& data);
|
||||
void onCancelNormalTexture(const LLSD& data);
|
||||
void onSelectNormalTexture(const LLSD& data);
|
||||
void onCommitColor(const LLSD& data);
|
||||
void onCommitShinyColor(const LLSD& data);
|
||||
void onCommitAlpha(const LLSD& data);
|
||||
void onCancelColor(const LLSD& data);
|
||||
void onCancelShinyColor(const LLSD& data);
|
||||
void onSelectColor(const LLSD& data);
|
||||
void onSelectShinyColor(const LLSD& data);
|
||||
void onCommitTexture();
|
||||
void onCancelTexture();
|
||||
void onSelectTexture();
|
||||
void onCommitSpecularTexture(const LLSD& data);
|
||||
void onCancelSpecularTexture(const LLSD& data);
|
||||
void onSelectSpecularTexture(const LLSD& data);
|
||||
void onCommitNormalTexture(const LLSD& data);
|
||||
void onCancelNormalTexture(const LLSD& data);
|
||||
void onSelectNormalTexture(const LLSD& data);
|
||||
void onCommitColor();
|
||||
void onCommitShinyColor();
|
||||
void onCommitAlpha();
|
||||
void onCancelColor();
|
||||
void onCancelShinyColor();
|
||||
void onSelectColor();
|
||||
void onSelectShinyColor();
|
||||
|
||||
void onCloseTexturePicker(const LLSD& data);
|
||||
void onCloseTexturePicker(const LLSD& data);
|
||||
|
||||
static bool deleteMediaConfirm(const LLSD& notification, const LLSD& response);
|
||||
static bool multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response);
|
||||
|
|
@ -196,113 +199,96 @@ protected:
|
|||
|
||||
// Callback funcs for individual controls
|
||||
//
|
||||
static void onCommitTextureInfo(LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTextureScaleX(LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTextureScaleY(LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTextureRot(LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTextureOffsetX(LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTextureOffsetY(LLUICtrl* ctrl, void* userdata);
|
||||
void onCommitTextureInfo();
|
||||
void onCommitTextureScaleX();
|
||||
void onCommitTextureScaleY();
|
||||
void onCommitTextureRot();
|
||||
void onCommitTextureOffsetX();
|
||||
void onCommitTextureOffsetY();
|
||||
|
||||
static void onCommitMaterialBumpyScaleX( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialBumpyScaleY( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialBumpyRot( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialBumpyOffsetX( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialBumpyOffsetY( LLUICtrl* ctrl, void* userdata);
|
||||
void onCommitMaterialBumpyScaleX();
|
||||
void onCommitMaterialBumpyScaleY();
|
||||
void onCommitMaterialBumpyRot();
|
||||
void onCommitMaterialBumpyOffsetX();
|
||||
void onCommitMaterialBumpyOffsetY();
|
||||
|
||||
static void syncRepeatX(LLPanelFace* self, F32 scaleU);
|
||||
static void syncRepeatY(LLPanelFace* self, F32 scaleV);
|
||||
static void syncOffsetX(LLPanelFace* self, F32 offsetU);
|
||||
static void syncOffsetY(LLPanelFace* self, F32 offsetV);
|
||||
static void syncMaterialRot(LLPanelFace* self, F32 rot, int te = -1);
|
||||
void syncRepeatX(F32 scaleU);
|
||||
void syncRepeatY(F32 scaleV);
|
||||
void syncOffsetX(F32 offsetU);
|
||||
void syncOffsetY(F32 offsetV);
|
||||
void syncMaterialRot(F32 rot, int te = -1);
|
||||
|
||||
static void onCommitMaterialShinyScaleX( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialShinyScaleY( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialShinyRot( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialShinyOffsetX( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialShinyOffsetY( LLUICtrl* ctrl, void* userdata);
|
||||
void onCommitMaterialShinyScaleX();
|
||||
void onCommitMaterialShinyScaleY();
|
||||
void onCommitMaterialShinyRot();
|
||||
void onCommitMaterialShinyOffsetX();
|
||||
void onCommitMaterialShinyOffsetY();
|
||||
|
||||
static void onCommitMaterialGloss( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialEnv( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialMaskCutoff( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialID( LLUICtrl* ctrl, void* userdata);
|
||||
void onCommitMaterialGloss();
|
||||
void onCommitMaterialEnv();
|
||||
void onCommitMaterialMaskCutoff();
|
||||
void onCommitMaterialID();
|
||||
|
||||
static void onCommitMaterialsMedia( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitMaterialType( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitPbrType(LLUICtrl* ctrl, void* userdata);
|
||||
static void onClickBtnEditMedia(LLUICtrl* ctrl, void* userdata);
|
||||
static void onClickBtnDeleteMedia(LLUICtrl* ctrl, void* userdata);
|
||||
static void onClickBtnAddMedia(LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitBump( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTexGen( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitShiny( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitAlphaMode( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitFullbright( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitGlow( LLUICtrl* ctrl, void *userdata);
|
||||
static void onCommitPlanarAlign( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitRepeatsPerMeter( LLUICtrl* ctrl, void* userinfo);
|
||||
void onCommitMaterialsMedia();
|
||||
void onCommitMaterialType();
|
||||
void onCommitPbrType();
|
||||
void onClickBtnEditMedia();
|
||||
void onClickBtnDeleteMedia();
|
||||
void onClickBtnAddMedia();
|
||||
void onCommitBump();
|
||||
void onCommitTexGen();
|
||||
void onCommitShiny();
|
||||
void onCommitAlphaMode();
|
||||
void onCommitFullbright();
|
||||
void onCommitGlow();
|
||||
void onCommitPlanarAlign();
|
||||
void onCommitRepeatsPerMeter();
|
||||
|
||||
void onCommitGLTFTextureScaleU(LLUICtrl* ctrl);
|
||||
void onCommitGLTFTextureScaleV(LLUICtrl* ctrl);
|
||||
void onCommitGLTFRotation(LLUICtrl* ctrl);
|
||||
void onCommitGLTFTextureOffsetU(LLUICtrl* ctrl);
|
||||
void onCommitGLTFTextureOffsetV(LLUICtrl* ctrl);
|
||||
void onCommitGLTFTextureScaleU();
|
||||
void onCommitGLTFTextureScaleV();
|
||||
void onCommitGLTFRotation();
|
||||
void onCommitGLTFTextureOffsetU();
|
||||
void onCommitGLTFTextureOffsetV();
|
||||
|
||||
static void onClickAutoFix(void*);
|
||||
static void onAlignTexture(void*);
|
||||
static void onClickBtnLoadInvPBR(void* userdata);
|
||||
static void onClickBtnEditPBR(void* userdata);
|
||||
static void onClickBtnSavePBR(void* userdata);
|
||||
void onClickAutoFix();
|
||||
void onAlignTexture();
|
||||
void onClickBtnLoadInvPBR();
|
||||
void onClickBtnEditPBR();
|
||||
void onClickBtnSavePBR();
|
||||
|
||||
// <FS> Extended copy & paste buttons
|
||||
void onCopyFaces();
|
||||
void onPasteFaces();
|
||||
void onCopyFaces();
|
||||
void onPasteFaces();
|
||||
// </FS>
|
||||
|
||||
void onClickBtnSelectSameTexture(const LLUICtrl* ctrl, const LLSD& user_data); // <FS:Zi> Find all faces with same texture
|
||||
void onClickBtnSelectSameTexture(const LLSD& user_data); // <FS:Zi> Find all faces with same texture
|
||||
|
||||
public: // needs to be accessible to selection manager
|
||||
void onCopyColor(); // records all selected faces
|
||||
void onPasteColor(); // to specific face
|
||||
void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face
|
||||
void onCopyTexture();
|
||||
void onPasteTexture();
|
||||
void onPasteTexture(LLViewerObject* objectp, S32 te);
|
||||
void onCopyColor(); // records all selected faces
|
||||
void onPasteColor(); // to specific face
|
||||
void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face
|
||||
void onCopyTexture();
|
||||
void onPasteTexture();
|
||||
void onPasteTexture(LLViewerObject* objectp, S32 te);
|
||||
|
||||
protected:
|
||||
// <FS> Extended copy & paste buttons
|
||||
//void menuDoToSelected(const LLSD& userdata);
|
||||
//bool menuEnableItem(const LLSD& userdata);
|
||||
//void menuDoToSelected(const LLSD& userdata);
|
||||
//bool menuEnableItem(const LLSD& userdata);
|
||||
// </FS>
|
||||
|
||||
static F32 valueGlow(LLViewerObject* object, S32 face);
|
||||
static F32 valueGlow(LLViewerObject* object, S32 face);
|
||||
|
||||
// <FS:CR> Build tool enhancements
|
||||
static void onClickMapsSync(LLUICtrl* ctrl, void *userdata);
|
||||
static void alignMaterialsProperties(LLPanelFace* self);
|
||||
void onClickMapsSync();
|
||||
void alignMaterialsProperties();
|
||||
|
||||
public:
|
||||
static void onCommitFlip(const LLUICtrl* ctrl, const LLSD& user_data);
|
||||
LLSpinCtrl* mCtrlTexScaleU;
|
||||
LLSpinCtrl* mCtrlTexScaleV;
|
||||
LLSpinCtrl* mCtrlBumpyScaleU;
|
||||
LLSpinCtrl* mCtrlBumpyScaleV;
|
||||
LLSpinCtrl* mCtrlShinyScaleU;
|
||||
LLSpinCtrl* mCtrlShinyScaleV;
|
||||
|
||||
LLSpinCtrl* mCtrlTexOffsetU;
|
||||
LLSpinCtrl* mCtrlTexOffsetV;
|
||||
LLSpinCtrl* mCtrlBumpyOffsetU;
|
||||
LLSpinCtrl* mCtrlBumpyOffsetV;
|
||||
LLSpinCtrl* mCtrlShinyOffsetU;
|
||||
LLSpinCtrl* mCtrlShinyOffsetV;
|
||||
|
||||
LLSpinCtrl* mCtrlTexRot;
|
||||
LLSpinCtrl* mCtrlBumpyRot;
|
||||
LLSpinCtrl* mCtrlShinyRot;
|
||||
void onCommitFlip(const LLSD& user_data);
|
||||
// </FS>
|
||||
|
||||
private:
|
||||
bool isAlpha() { return mIsAlpha; }
|
||||
bool isAlpha() { return mIsAlpha; }
|
||||
|
||||
// Convenience funcs to keep the visual flack to a minimum
|
||||
//
|
||||
|
|
@ -331,32 +317,87 @@ private:
|
|||
F32 getCurrentTextureScaleV();
|
||||
F32 getCurrentTextureOffsetU();
|
||||
F32 getCurrentTextureOffsetV();
|
||||
|
||||
// Build tool controls
|
||||
LLSpinCtrl* mCtrlRpt;
|
||||
// </FS:CR>
|
||||
|
||||
LLTextureCtrl* mPBRTextureCtrl = nullptr;
|
||||
LLTextureCtrl* mTextureCtrl = nullptr;
|
||||
LLTextureCtrl* mShinyTextureCtrl = nullptr;
|
||||
LLTextureCtrl* mBumpyTextureCtrl = nullptr;
|
||||
LLColorSwatchCtrl* mColorSwatch = nullptr;
|
||||
LLColorSwatchCtrl* mShinyColorSwatch = nullptr;
|
||||
LLTextureCtrl* mPBRTextureCtrl { nullptr };
|
||||
LLTextureCtrl* mTextureCtrl { nullptr };
|
||||
LLTextureCtrl* mShinyTextureCtrl { nullptr };
|
||||
LLTextureCtrl* mBumpyTextureCtrl { nullptr };
|
||||
LLTextBox* mLabelColor { nullptr };
|
||||
LLColorSwatchCtrl* mColorSwatch { nullptr };
|
||||
LLTextBox* mLabelShiniColor { nullptr };
|
||||
LLColorSwatchCtrl* mShinyColorSwatch { nullptr };
|
||||
|
||||
LLComboBox* mComboTexGen = nullptr;
|
||||
LLTextBox* mLabelTexGen { nullptr };
|
||||
LLComboBox* mComboTexGen { nullptr };
|
||||
|
||||
LLRadioGroup* mRadioMaterialType = nullptr;
|
||||
LLRadioGroup* mRadioPbrType = nullptr;
|
||||
LLRadioGroup* mRadioMaterialType { nullptr };
|
||||
LLRadioGroup* mRadioPbrType { nullptr };
|
||||
|
||||
LLCheckBoxCtrl* mCheckFullbright = nullptr;
|
||||
LLCheckBoxCtrl* mCheckFullbright { nullptr };
|
||||
|
||||
LLTextBox* mLabelColorTransp = nullptr;
|
||||
LLSpinCtrl* mCtrlColorTransp = nullptr; // transparency = 1 - alpha
|
||||
LLTextBox* mLabelColorTransp { nullptr };
|
||||
LLSpinCtrl* mCtrlColorTransp { nullptr }; // transparency = 1 - alpha
|
||||
|
||||
LLSpinCtrl* mCtrlGlow = nullptr;
|
||||
LLComboBox *mComboMatMedia = nullptr;
|
||||
LLMediaCtrl *mTitleMedia = nullptr;
|
||||
LLTextBox *mTitleMediaText = nullptr;
|
||||
LLTextBox* mLabelGlow { nullptr };
|
||||
LLSpinCtrl* mCtrlGlow { nullptr };
|
||||
LLComboBox* mComboMatMedia { nullptr };
|
||||
LLMediaCtrl* mTitleMedia { nullptr };
|
||||
LLTextBox* mTitleMediaText { nullptr };
|
||||
|
||||
LLTextBox* mLabelMatPermLoading { nullptr };
|
||||
LLCheckBoxCtrl* mCheckSyncSettings { nullptr };
|
||||
|
||||
LLTextBox* mLabelBumpiness { nullptr };
|
||||
LLComboBox* mComboBumpiness { nullptr };
|
||||
LLTextBox* mLabelShininess { nullptr };
|
||||
LLComboBox* mComboShininess { nullptr };
|
||||
LLTextBox* mLabelAlphaMode { nullptr };
|
||||
LLComboBox* mComboAlphaMode { nullptr };
|
||||
LLSpinCtrl* mTexScaleU { nullptr };
|
||||
LLSpinCtrl* mTexScaleV { nullptr };
|
||||
LLSpinCtrl* mTexRotate { nullptr };
|
||||
LLSpinCtrl* mTexRepeat { nullptr };
|
||||
LLSpinCtrl* mTexOffsetU { nullptr };
|
||||
LLSpinCtrl* mTexOffsetV { nullptr };
|
||||
LLCheckBoxCtrl* mPlanarAlign{ nullptr };
|
||||
LLSpinCtrl* mBumpyScaleU { nullptr };
|
||||
LLSpinCtrl* mBumpyScaleV { nullptr };
|
||||
LLSpinCtrl* mBumpyRotate { nullptr };
|
||||
LLSpinCtrl* mBumpyOffsetU { nullptr };
|
||||
LLSpinCtrl* mBumpyOffsetV { nullptr };
|
||||
LLSpinCtrl* mShinyScaleU { nullptr };
|
||||
LLSpinCtrl* mShinyScaleV { nullptr };
|
||||
LLSpinCtrl* mShinyRotate { nullptr };
|
||||
LLSpinCtrl* mShinyOffsetU { nullptr };
|
||||
LLSpinCtrl* mShinyOffsetV { nullptr };
|
||||
LLTextBox* mLabelGlossiness { nullptr };
|
||||
LLSpinCtrl* mGlossiness { nullptr };
|
||||
LLTextBox* mLabelEnvironment { nullptr };
|
||||
LLSpinCtrl* mEnvironment { nullptr };
|
||||
LLTextBox* mLabelMaskCutoff { nullptr };
|
||||
LLSpinCtrl* mMaskCutoff { nullptr };
|
||||
LLButton* mAddMedia { nullptr };
|
||||
LLButton* mDelMedia { nullptr };
|
||||
LLSpinCtrl* mPBRScaleU { nullptr };
|
||||
LLSpinCtrl* mPBRScaleV { nullptr };
|
||||
LLSpinCtrl* mPBRRotate { nullptr };
|
||||
LLSpinCtrl* mPBROffsetU { nullptr };
|
||||
LLSpinCtrl* mPBROffsetV { nullptr };
|
||||
|
||||
LLButton* mBtnAlign { nullptr };
|
||||
LLButton* mBtnAlignTex { nullptr };
|
||||
LLButton* mBtnPbrFromInv { nullptr };
|
||||
LLButton* mBtnEditBbr { nullptr };
|
||||
LLButton* mBtnSaveBbr { nullptr };
|
||||
|
||||
// <FS> Build tool enhancements
|
||||
LLButton* mBtnTexFlipScaleU{ nullptr };
|
||||
LLButton* mBtnTexFlipScaleV{ nullptr };
|
||||
LLButton* mBtnSelectSameDiff{ nullptr };
|
||||
LLButton* mBtnSelectSameSpec{ nullptr };
|
||||
LLButton* mBtnSelectSameNorm{ nullptr };
|
||||
// </FS>
|
||||
|
||||
// Update visibility of controls to match current UI mode
|
||||
// (e.g. materials vs media editing)
|
||||
|
|
@ -368,6 +409,20 @@ private:
|
|||
// Hey look everyone, a type-safe alternative to copy and paste! :)
|
||||
//
|
||||
|
||||
template<class T>
|
||||
void getChildSetCommitCallback(T*& ctrl, std::string_view name, std::function<void(LLUICtrl*, const LLSD&)> cb)
|
||||
{
|
||||
ctrl = this->getChild<T>(name);
|
||||
ctrl->setCommitCallback(cb);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void getChildSetClickedCallback(T*& ctrl, std::string_view name, std::function<void(LLUICtrl*, const LLSD&)> cb)
|
||||
{
|
||||
ctrl = this->getChild<T>(name);
|
||||
ctrl->setClickedCallback(cb);
|
||||
}
|
||||
|
||||
// Update material parameters by applying 'edit_func' to selected TEs
|
||||
//
|
||||
template<
|
||||
|
|
@ -527,7 +582,7 @@ private:
|
|||
void updateVisibilityGLTF(LLViewerObject* objectp = nullptr);
|
||||
|
||||
void updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*)> func);
|
||||
void updateGLTFTextureTransform(float value, U32 pbr_type, std::function<void(LLGLTFMaterial::TextureTransform*)> edit);
|
||||
void updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::TextureTransform*)> edit);
|
||||
|
||||
void setMaterialOverridesFromSelection();
|
||||
|
||||
|
|
@ -626,41 +681,41 @@ public:
|
|||
static void getMaxNormalRepeats(F32& repeats, bool& identical);
|
||||
static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha);
|
||||
|
||||
DEF_GET_MAT_STATE(LLUUID,const LLUUID&,getNormalID,LLUUID::null, false, LLUUID::null)
|
||||
DEF_GET_MAT_STATE(LLUUID,const LLUUID&,getSpecularID,LLUUID::null, false, LLUUID::null)
|
||||
DEF_GET_MAT_STATE(F32,F32,getSpecularRepeatX,1.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32,F32,getSpecularRepeatY,1.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32,F32,getSpecularOffsetX,0.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32,F32,getSpecularOffsetY,0.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32,F32,getSpecularRotation,0.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(LLUUID, const LLUUID&, getNormalID, LLUUID::null, false, LLUUID::null);
|
||||
DEF_GET_MAT_STATE(LLUUID, const LLUUID&, getSpecularID, LLUUID::null, false, LLUUID::null);
|
||||
DEF_GET_MAT_STATE(F32, F32, getSpecularRepeatX, 1.0f, true, 0.001f);
|
||||
DEF_GET_MAT_STATE(F32, F32, getSpecularRepeatY, 1.0f, true, 0.001f);
|
||||
DEF_GET_MAT_STATE(F32, F32, getSpecularOffsetX, 0.0f, true, 0.001f);
|
||||
DEF_GET_MAT_STATE(F32, F32, getSpecularOffsetY, 0.0f, true, 0.001f);
|
||||
DEF_GET_MAT_STATE(F32, F32, getSpecularRotation, 0.0f, true, 0.001f);
|
||||
|
||||
DEF_GET_MAT_STATE(F32,F32,getNormalRepeatX,1.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32,F32,getNormalRepeatY,1.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32,F32,getNormalOffsetX,0.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32,F32,getNormalOffsetY,0.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32,F32,getNormalRotation,0.0f, true, 0.001f)
|
||||
DEF_GET_MAT_STATE(F32, F32, getNormalRepeatX, 1.0f, true, 0.001f);
|
||||
DEF_GET_MAT_STATE(F32, F32, getNormalRepeatY, 1.0f, true, 0.001f);
|
||||
DEF_GET_MAT_STATE(F32, F32, getNormalOffsetX, 0.0f, true, 0.001f);
|
||||
DEF_GET_MAT_STATE(F32, F32, getNormalOffsetY, 0.0f, true, 0.001f);
|
||||
DEF_GET_MAT_STATE(F32, F32, getNormalRotation, 0.0f, true, 0.001f);
|
||||
|
||||
DEF_EDIT_MAT_STATE(U8,U8,setDiffuseAlphaMode);
|
||||
DEF_EDIT_MAT_STATE(U8,U8,setAlphaMaskCutoff);
|
||||
DEF_EDIT_MAT_STATE(U8, U8, setDiffuseAlphaMode);
|
||||
DEF_EDIT_MAT_STATE(U8, U8, setAlphaMaskCutoff);
|
||||
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setNormalOffsetX);
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setNormalOffsetY);
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setNormalRepeatX);
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setNormalRepeatY);
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setNormalRotation);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setNormalOffsetX);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setNormalOffsetY);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setNormalRepeatX);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setNormalRepeatY);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setNormalRotation);
|
||||
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setSpecularOffsetX);
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setSpecularOffsetY);
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setSpecularRepeatX);
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setSpecularRepeatY);
|
||||
DEF_EDIT_MAT_STATE(F32,F32,setSpecularRotation);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setSpecularOffsetX);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setSpecularOffsetY);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setSpecularRepeatX);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setSpecularRepeatY);
|
||||
DEF_EDIT_MAT_STATE(F32, F32, setSpecularRotation);
|
||||
|
||||
DEF_EDIT_MAT_STATE(U8,U8,setEnvironmentIntensity);
|
||||
DEF_EDIT_MAT_STATE(U8,U8,setSpecularLightExponent);
|
||||
DEF_EDIT_MAT_STATE(U8, U8, setEnvironmentIntensity);
|
||||
DEF_EDIT_MAT_STATE(U8, U8, setSpecularLightExponent);
|
||||
|
||||
DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setNormalID);
|
||||
DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setSpecularID);
|
||||
DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&,setSpecularLightColor);
|
||||
DEF_EDIT_MAT_STATE(LLUUID, const LLUUID&,setNormalID);
|
||||
DEF_EDIT_MAT_STATE(LLUUID, const LLUUID&,setSpecularID);
|
||||
DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&, setSpecularLightColor);
|
||||
};
|
||||
|
||||
class LLSelectedTE
|
||||
|
|
@ -686,6 +741,8 @@ public:
|
|||
DEF_GET_TE_STATE(LLTextureEntry::e_texgen,LLTextureEntry::e_texgen,getTexGen,LLTextureEntry::TEX_GEN_DEFAULT, false, LLTextureEntry::TEX_GEN_DEFAULT)
|
||||
DEF_GET_TE_STATE(LLColor4,const LLColor4&,getColor,LLColor4::white, false, LLColor4::black);
|
||||
};
|
||||
|
||||
friend struct LLPanelFaceSetTEFunctor;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -562,9 +562,11 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
|
|||
if (asset_type == LLAssetType::AT_TEXTURE && allow_2k)
|
||||
{
|
||||
LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
|
||||
if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
|
||||
if (gDirUtilp->fileExists(filename) && image_frmted && image_frmted->load(filename))
|
||||
{
|
||||
expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
|
||||
S32 biased_width = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getWidth(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
|
||||
S32 biased_height = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getHeight(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
|
||||
expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(biased_width, biased_height);
|
||||
resource_upload = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -658,16 +660,15 @@ bool get_bulk_upload_expected_cost(
|
|||
if (asset_type == LLAssetType::AT_TEXTURE && allow_2k)
|
||||
{
|
||||
LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
|
||||
if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
|
||||
if (gDirUtilp->fileExists(filename) && image_frmted && image_frmted->load(filename))
|
||||
{
|
||||
total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
|
||||
if (image_frmted)
|
||||
S32 biased_width = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getWidth(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
|
||||
S32 biased_height = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getHeight(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
|
||||
total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(biased_width, biased_height);
|
||||
S32 area = biased_width * biased_height;
|
||||
if (area >= LLAgentBenefits::MIN_2K_TEXTURE_AREA)
|
||||
{
|
||||
S32 area = image_frmted->getHeight() * image_frmted->getWidth();
|
||||
if (area >= LLAgentBenefits::MIN_2K_TEXTURE_AREA)
|
||||
{
|
||||
textures_2k_count++;
|
||||
}
|
||||
textures_2k_count++;
|
||||
}
|
||||
file_count++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -998,9 +998,8 @@ void LLViewerObjectList::update(LLAgent &agent)
|
|||
static std::vector<LLViewerObject*> idle_list;
|
||||
|
||||
U32 idle_count = 0;
|
||||
//<FS:Beq> need avatar count for dynamic BB load balancing
|
||||
mNumAvatars = 0;
|
||||
//</FS:Beq>
|
||||
|
||||
{
|
||||
for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
|
||||
active_iter != mActiveObjects.end(); active_iter++)
|
||||
|
|
@ -1017,10 +1016,10 @@ void LLViewerObjectList::update(LLAgent &agent)
|
|||
idle_list[idle_count] = objectp;
|
||||
}
|
||||
++idle_count;
|
||||
//<FS:Beq> need avatar count for dynamic BB load balancing
|
||||
if (objectp->isAvatar())
|
||||
{
|
||||
mNumAvatars++;
|
||||
//</FS:Beq>
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // There shouldn't be any NULL pointers in the list, but they have caused
|
||||
|
|
|
|||
|
|
@ -157,10 +157,7 @@ public:
|
|||
|
||||
S32 getOrphanParentCount() const { return (S32) mOrphanParents.size(); }
|
||||
S32 getOrphanCount() const { return mNumOrphans; }
|
||||
//<FS:Beq> need avatar count for dynamic BB load balancing
|
||||
S32 getAvatarCount() const { return mNumAvatars; }
|
||||
//</FS:Beq>
|
||||
|
||||
void orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port);
|
||||
void findOrphans(LLViewerObject* objectp, U32 ip, U32 port);
|
||||
|
||||
|
|
@ -207,9 +204,7 @@ protected:
|
|||
std::vector<U64> mOrphanParents; // LocalID/ip,port of orphaned objects
|
||||
std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects
|
||||
S32 mNumOrphans;
|
||||
//<FS:Beq> need avatar count for dynamic BB load balancing
|
||||
S32 mNumAvatars;
|
||||
//</FS:Beq>
|
||||
|
||||
typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -2787,7 +2787,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
|
|||
}
|
||||
|
||||
// Update should be happening max once per frame.
|
||||
// <FS:Beq> enable dynamic spreading of the BB calculations
|
||||
static LLCachedControl<S32> refreshPeriod(gSavedSettings, "AvatarExtentRefreshPeriodBatch");
|
||||
static LLCachedControl<S32> refreshMaxPerPeriod(gSavedSettings, "AvatarExtentRefreshMaxPerBatch");
|
||||
static S32 upd_freq = refreshPeriod; // initialise to a reasonable default of 1 batch
|
||||
|
|
@ -2797,10 +2796,20 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
|
|||
if (thisFrame - lastRecalibrationFrame >= upd_freq)
|
||||
{
|
||||
// Only update at the start of a cycle. .
|
||||
// update frequency = ((Num_Avatars -1 / NumberPerPeriod) + 1 ) * Periodicity
|
||||
// Given NumberPerPeriod = 5 and Periodicity = 4
|
||||
// | NumAvatars | frequency |
|
||||
// +-------------+-----------+
|
||||
// | 1 | 4 |
|
||||
// | 2 | 4 |
|
||||
// | 5 | 4 |
|
||||
// | 10 | 8 |
|
||||
// | 25 | 20 |
|
||||
|
||||
upd_freq = (((gObjectList.getAvatarCount() - 1) / refreshMaxPerPeriod) + 1)*refreshPeriod;
|
||||
lastRecalibrationFrame = thisFrame;
|
||||
}
|
||||
//</FS:Beq>
|
||||
|
||||
if ((mLastAnimExtents[0]==LLVector3())||
|
||||
(mLastAnimExtents[1])==LLVector3())
|
||||
{
|
||||
|
|
@ -2808,11 +2817,9 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
|
|||
}
|
||||
else
|
||||
{
|
||||
//<FS:Beq> enable dynamic spreading of the BB calculations
|
||||
//const S32 upd_freq = 4; // force update every upd_freq frames.
|
||||
//mNeedsExtentUpdate = ((LLDrawable::getCurrentFrame()+mID.mData[0]) % upd_freq == 0);
|
||||
// Update extent if necessary.
|
||||
// if the frame counnter + the first byte of the UUID % upd_freq = 0 then update the extent.
|
||||
mNeedsExtentUpdate = ((thisFrame + mID.mData[0]) % upd_freq == 0);
|
||||
//</FS:Beq>
|
||||
}
|
||||
|
||||
// LLScopedContextString str("avatar_idle_update " + getFullname()); // <FS:Beq> remove unused scoped string
|
||||
|
|
@ -11806,12 +11813,11 @@ void LLVOAvatar::updateRiggingInfo()
|
|||
}
|
||||
|
||||
//LL_INFOS() << "done update rig count is " << countRigInfoTab(mJointRiggingInfoTab) << LL_ENDL;
|
||||
//LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL; // <FS:Ansariel> Performance tweak
|
||||
//<FS:Beq> remove debug only stuff on hot path
|
||||
//S32 joint_count, box_count;
|
||||
//showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count);
|
||||
//</FS:Beq>
|
||||
//LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL; // <FS:Ansariel> Performance tweak
|
||||
// Remove debug only stuff on hot path
|
||||
// LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL;
|
||||
// S32 joint_count, box_count;
|
||||
// showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count);
|
||||
// LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL;
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -3741,11 +3741,15 @@ void LLPipeline::postSort(LLCamera &camera)
|
|||
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("Render face highlights");
|
||||
mSelectedFaces.clear();
|
||||
|
||||
bool tex_index_changed = false;
|
||||
if (!gNonInteractive)
|
||||
{
|
||||
LLRender::eTexIndex tex_index = sRenderHighlightTextureChannel;
|
||||
// <FS:Zi> switchable edit texture/materials panel
|
||||
// LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
|
||||
LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getTextureChannelToEdit());
|
||||
//setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
|
||||
setRenderHighlightTextureChannel(gFloaterTools->getTextureChannelToEdit());
|
||||
// </FS:Zi>
|
||||
tex_index_changed = sRenderHighlightTextureChannel != tex_index;
|
||||
}
|
||||
|
||||
// Draw face highlights for selected faces.
|
||||
|
|
@ -3767,6 +3771,24 @@ void LLPipeline::postSort(LLCamera &camera)
|
|||
}
|
||||
} func;
|
||||
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
|
||||
|
||||
if (tex_index_changed)
|
||||
{
|
||||
// Rebuild geometry for all selected faces with PBR textures
|
||||
for (const LLFace* face : gPipeline.mSelectedFaces)
|
||||
{
|
||||
if (const LLViewerObject* vobj = face->getViewerObject())
|
||||
{
|
||||
if (const LLTextureEntry* tep = vobj->getTE(face->getTEOffset()))
|
||||
{
|
||||
if (tep->getGLTFRenderMaterial())
|
||||
{
|
||||
gPipeline.markRebuild(face->getDrawable(), LLDrawable::REBUILD_VOLUME);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3819,28 +3841,31 @@ void render_hud_elements()
|
|||
gUIProgram.unbind();
|
||||
}
|
||||
|
||||
void LLPipeline::renderHighlights()
|
||||
static inline void bindHighlightProgram(LLGLSLShader& program)
|
||||
{
|
||||
assertInitialized();
|
||||
|
||||
// Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
|
||||
// Render highlighted faces.
|
||||
LLGLSPipelineAlpha gls_pipeline_alpha;
|
||||
LLColor4 color(1.f, 1.f, 1.f, 0.5f);
|
||||
disableLights();
|
||||
|
||||
if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
|
||||
{
|
||||
gHighlightProgram.bind();
|
||||
gGL.diffuseColor4f(1,1,1,0.5f);
|
||||
program.bind();
|
||||
gGL.diffuseColor4f(1, 1, 1, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void unbindHighlightProgram(LLGLSLShader& program)
|
||||
{
|
||||
if (LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0)
|
||||
{
|
||||
program.unbind();
|
||||
}
|
||||
}
|
||||
|
||||
void LLPipeline::renderSelectedFaces(const LLColor4& color)
|
||||
{
|
||||
if (!mFaceSelectImagep)
|
||||
{
|
||||
mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
|
||||
}
|
||||
|
||||
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && !mFaceSelectImagep)
|
||||
{
|
||||
mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
|
||||
}
|
||||
|
||||
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::DIFFUSE_MAP))
|
||||
if (mFaceSelectImagep)
|
||||
{
|
||||
// Make sure the selection image gets downloaded and decoded
|
||||
mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
|
||||
|
|
@ -3856,81 +3881,61 @@ void LLPipeline::renderHighlights()
|
|||
facep->renderSelected(mFaceSelectImagep, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLPipeline::renderHighlights()
|
||||
{
|
||||
assertInitialized();
|
||||
|
||||
// Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
|
||||
// Render highlighted faces.
|
||||
LLGLSPipelineAlpha gls_pipeline_alpha;
|
||||
disableLights();
|
||||
|
||||
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
|
||||
{
|
||||
// Paint 'em red!
|
||||
color.setVec(1.f, 0.f, 0.f, 0.5f);
|
||||
bindHighlightProgram(gHighlightProgram);
|
||||
|
||||
if (sRenderHighlightTextureChannel == LLRender::DIFFUSE_MAP ||
|
||||
sRenderHighlightTextureChannel == LLRender::BASECOLOR_MAP ||
|
||||
sRenderHighlightTextureChannel == LLRender::METALLIC_ROUGHNESS_MAP ||
|
||||
sRenderHighlightTextureChannel == LLRender::GLTF_NORMAL_MAP ||
|
||||
sRenderHighlightTextureChannel == LLRender::EMISSIVE_MAP ||
|
||||
sRenderHighlightTextureChannel == LLRender::NUM_TEXTURE_CHANNELS)
|
||||
{
|
||||
static const LLColor4 highlight_selected_color(1.f, 1.f, 1.f, 0.5f);
|
||||
renderSelectedFaces(highlight_selected_color);
|
||||
}
|
||||
|
||||
// Paint 'em red!
|
||||
static const LLColor4 highlight_face_color(1.f, 0.f, 0.f, 0.5f);
|
||||
for (auto facep : mHighlightFaces)
|
||||
{
|
||||
facep->renderSelected(LLViewerTexture::sNullImagep, color);
|
||||
facep->renderSelected(LLViewerTexture::sNullImagep, highlight_face_color);
|
||||
}
|
||||
|
||||
unbindHighlightProgram(gHighlightProgram);
|
||||
}
|
||||
|
||||
// Contains a list of the faces of objects that are physical or
|
||||
// have touch-handlers.
|
||||
mHighlightFaces.clear();
|
||||
|
||||
if (LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0)
|
||||
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
|
||||
{
|
||||
gHighlightProgram.unbind();
|
||||
}
|
||||
|
||||
|
||||
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::NORMAL_MAP))
|
||||
{
|
||||
color.setVec(1.0f, 0.5f, 0.5f, 0.5f);
|
||||
if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
|
||||
if (sRenderHighlightTextureChannel == LLRender::NORMAL_MAP)
|
||||
{
|
||||
gHighlightNormalProgram.bind();
|
||||
gGL.diffuseColor4f(1,1,1,0.5f);
|
||||
static const LLColor4 highlight_normal_color(1.0f, 0.5f, 0.5f, 0.5f);
|
||||
bindHighlightProgram(gHighlightNormalProgram);
|
||||
renderSelectedFaces(highlight_normal_color);
|
||||
unbindHighlightProgram(gHighlightNormalProgram);
|
||||
}
|
||||
|
||||
mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
|
||||
|
||||
for (auto facep : mSelectedFaces)
|
||||
else if (sRenderHighlightTextureChannel == LLRender::SPECULAR_MAP)
|
||||
{
|
||||
if (!facep || facep->getDrawable()->isDead())
|
||||
{
|
||||
LL_ERRS() << "Bad face on selection" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
facep->renderSelected(mFaceSelectImagep, color);
|
||||
}
|
||||
|
||||
if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
|
||||
{
|
||||
gHighlightNormalProgram.unbind();
|
||||
}
|
||||
}
|
||||
|
||||
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::SPECULAR_MAP))
|
||||
{
|
||||
color.setVec(0.0f, 0.3f, 1.0f, 0.8f);
|
||||
if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
|
||||
{
|
||||
gHighlightSpecularProgram.bind();
|
||||
gGL.diffuseColor4f(1,1,1,0.5f);
|
||||
}
|
||||
|
||||
mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
|
||||
|
||||
for (auto facep : mSelectedFaces)
|
||||
{
|
||||
if (!facep || facep->getDrawable()->isDead())
|
||||
{
|
||||
LL_ERRS() << "Bad face on selection" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
facep->renderSelected(mFaceSelectImagep, color);
|
||||
}
|
||||
|
||||
if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
|
||||
{
|
||||
gHighlightSpecularProgram.unbind();
|
||||
static const LLColor4 highlight_specular_color(0.0f, 0.3f, 1.0f, 0.8f);
|
||||
bindHighlightProgram(gHighlightSpecularProgram);
|
||||
renderSelectedFaces(highlight_specular_color);
|
||||
unbindHighlightProgram(gHighlightSpecularProgram);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6419,7 +6424,10 @@ bool LLPipeline::getRenderHighlights()
|
|||
// static
|
||||
void LLPipeline::setRenderHighlightTextureChannel(LLRender::eTexIndex channel)
|
||||
{
|
||||
sRenderHighlightTextureChannel = channel;
|
||||
if (channel != sRenderHighlightTextureChannel)
|
||||
{
|
||||
sRenderHighlightTextureChannel = channel;
|
||||
}
|
||||
}
|
||||
|
||||
LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection,
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ public:
|
|||
void renderHighlight(const LLViewerObject* obj, F32 fade);
|
||||
|
||||
void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, bool depth_clamp);
|
||||
void renderSelectedFaces(const LLColor4& color);
|
||||
void renderHighlights();
|
||||
void renderVignette(LLRenderTarget* src, LLRenderTarget* dst);
|
||||
void renderDebug();
|
||||
|
|
|
|||
|
|
@ -1549,9 +1549,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
|
|||
libfile = "libllcommon.dylib"
|
||||
dylibs = []
|
||||
for libfile in (
|
||||
"libapr-1.0.dylib",
|
||||
"libaprutil-1.0.dylib",
|
||||
"libexpat.1.dylib",
|
||||
"libGLOD.dylib",
|
||||
# libnghttp2.dylib is a symlink to
|
||||
# libnghttp2.major.dylib, which is a symlink
|
||||
|
|
@ -2263,14 +2260,7 @@ class Linux_i686_Manifest(LinuxManifest):
|
|||
debpkgdir = os.path.join(pkgdir, "lib", "debug")
|
||||
|
||||
with self.prefix(src=relpkgdir, dst="lib"):
|
||||
self.path("libapr-1.so")
|
||||
self.path("libapr-1.so.0")
|
||||
self.path("libapr-1.so.0.4.5")
|
||||
self.path("libaprutil-1.so")
|
||||
self.path("libaprutil-1.so.0")
|
||||
self.path("libaprutil-1.so.0.4.1")
|
||||
self.path("libdb*.so")
|
||||
self.path("libexpat.so.*")
|
||||
self.path("libGLOD.so")
|
||||
self.path("libuuid.so*")
|
||||
self.path("libSDL-1.2.so.*")
|
||||
|
|
|
|||
Loading…
Reference in New Issue