diff options
| -rw-r--r-- | indra/llrender/llrender.cpp | 51 | ||||
| -rw-r--r-- | indra/llrender/llrender.h | 4 | ||||
| -rw-r--r-- | indra/newview/llfloatersearch.cpp | 36 | ||||
| -rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 2 |
5 files changed, 73 insertions, 30 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 8ba8ab21f4..658947d531 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -218,8 +218,8 @@ void LLTexUnit::bindFast(LLTexture* texture) if (gl_tex->mTexOptionsDirty) { gl_tex->mTexOptionsDirty = false; - setTextureAddressModeFast(gl_tex->mAddressMode); - setTextureFilteringOptionFast(gl_tex->mFilterOption); + setTextureAddressModeFast(gl_tex->mAddressMode, gl_tex->getTarget()); + setTextureFilteringOptionFast(gl_tex->mFilterOption, gl_tex->getTarget()); } */ } @@ -477,17 +477,23 @@ void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode) activate(); /* - setTextureAddressModeFast(mode); + setTextureAddressModeFast(mode, mCurrTexType); } -void LLTexUnit::setTextureAddressModeFast(eTextureAddressMode mode) +void LLTexUnit::setTextureAddressModeFast(eTextureAddressMode mode, eTextureType tex_type) { + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_WRAP_S, sGLAddressMode[mode]); + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_WRAP_T, sGLAddressMode[mode]); + if (tex_type == TT_CUBE_MAP || tex_type == TT_CUBE_MAP_ARRAY || tex_type == TT_TEXTURE_3D) + { + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_WRAP_R, sGLAddressMode[mode]); + } */ glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_WRAP_S, sGLAddressMode[mode]); glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_WRAP_T, sGLAddressMode[mode]); if (mCurrTexType == TT_CUBE_MAP) { - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, sGLAddressMode[mode]); + glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_WRAP_R, sGLAddressMode[mode]); } } @@ -506,14 +512,21 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio gGL.flush(); /* - setTextureFilteringOptionFast(option); + setTextureFilteringOptionFast(option, mCurrTexType); } -void LLTexUnit::setTextureFilteringOptionFast(LLTexUnit::eTextureFilterOptions option) +void LLTexUnit::setTextureFilteringOptionFast(LLTexUnit::eTextureFilterOptions option, eTextureType tex_type) { */ if (option == TFO_POINT) { +/* + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_MAG_FILTER, GL_NEAREST); + } + else + { + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_MAG_FILTER, GL_LINEAR); +*/ glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); } else @@ -523,12 +536,22 @@ void LLTexUnit::setTextureFilteringOptionFast(LLTexUnit::eTextureFilterOptions o if (option >= TFO_TRILINEAR && mHasMipMaps) { +/* + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); +*/ glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); } else if (option >= TFO_BILINEAR) { if (mHasMipMaps) { +/* + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); + } + else + { + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_MIN_FILTER, GL_LINEAR); +*/ glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); } else @@ -540,6 +563,13 @@ void LLTexUnit::setTextureFilteringOptionFast(LLTexUnit::eTextureFilterOptions o { if (mHasMipMaps) { +/* + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); + } + else + { + glTexParameteri(sGLTextureType[tex_type], GL_TEXTURE_MIN_FILTER, GL_NEAREST); +*/ glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); } else @@ -552,6 +582,13 @@ void LLTexUnit::setTextureFilteringOptionFast(LLTexUnit::eTextureFilterOptions o { if (LLImageGL::sGlobalUseAnisotropic && option == TFO_ANISOTROPIC) { +/* + glTexParameterf(sGLTextureType[tex_type], GL_TEXTURE_MAX_ANISOTROPY, gGLManager.mMaxAnisotropy); + } + else + { + glTexParameterf(sGLTextureType[tex_type], GL_TEXTURE_MAX_ANISOTROPY, 1.f); +*/ //glTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, gGLManager.mMaxAnisotropy); //We plan to add a setting. For now we stick to a low value. glTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, 4.0); diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index 15a6249c5a..e6ae3baac6 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -217,7 +217,7 @@ public: void setTextureAddressMode(eTextureAddressMode mode); /* // MUST already be active and bound - void setTextureAddressModeFast(eTextureAddressMode mode); + void setTextureAddressModeFast(eTextureAddressMode mode, eTextureType tex_type); */ // Sets the filtering options used to sample the texture @@ -226,7 +226,7 @@ public: void setTextureFilteringOption(LLTexUnit::eTextureFilterOptions option); /* // MUST already be active and bound - void setTextureFilteringOptionFast(LLTexUnit::eTextureFilterOptions option); + void setTextureFilteringOptionFast(LLTexUnit::eTextureFilterOptions option, eTextureType tex_type); */ static U32 getInternalType(eTextureType type); diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 9762154a26..8e6a47dce5 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -44,8 +44,22 @@ class LLSearchHandler : public LLCommandHandler { bool handle(const LLSD& tokens, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) { const size_t parts = tokens.size(); + // get the (optional) category for the search + std::string collection; + if (parts > 0) + { + collection = tokens[0].asString(); + } + + // get the (optional) search string + std::string search_text; + if (parts > 1) + { + search_text = tokens[1].asString(); + } + // open the search floater and perform the requested search - LLFloaterReg::showInstance("search", tokens); + LLFloaterReg::showInstance("search", llsd::map("collection", collection,"query", search_text)); return true; } }; @@ -84,25 +98,11 @@ void LLFloaterSearch::initiateSearch(const LLSD& tokens) // substituted into the final URL using the logic from the original search. subs["TYPE"] = "standard"; - const size_t parts = tokens.size(); + std::string collection = tokens.has("collection") ? tokens["collection"].asString() : ""; - // get the (optional) category for the search - std::string collection; - if (parts > 0) - { - collection = tokens[0].asString(); - } - - // get the (optional) search string - std::string search_text; - if (parts > 1) - { - search_text = tokens[1].asString(); - } + std::string search_text = tokens.has("query") ? tokens["query"].asString() : ""; - // TODO: where does category get set? I cannot find a reference to - // it in internal docs - might be conflated with values in mSearchType - std::string category; + std::string category = tokens.has("category") ? tokens["category"].asString() : ""; if (mSearchType.find(category) != mSearchType.end()) { subs["TYPE"] = category; diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index a56305599d..39a0671bb2 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -691,7 +691,10 @@ LLVoiceDeviceList& LLWebRTCVoiceClient::getCaptureDevices() void LLWebRTCVoiceClient::setCaptureDevice(const std::string& name) { - mWebRTCDeviceInterface->setCaptureDevice(name); + if (mWebRTCDeviceInterface) + { + mWebRTCDeviceInterface->setCaptureDevice(name); + } } void LLWebRTCVoiceClient::setDevicesListUpdated(bool state) { @@ -778,7 +781,10 @@ LLVoiceDeviceList& LLWebRTCVoiceClient::getRenderDevices() void LLWebRTCVoiceClient::setRenderDevice(const std::string& name) { - mWebRTCDeviceInterface->setRenderDevice(name); + if (mWebRTCDeviceInterface) + { + mWebRTCDeviceInterface->setRenderDevice(name); + } } void LLWebRTCVoiceClient::tuningStart() diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 39ac1aff07..8b0890a367 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -888,7 +888,7 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY, U32 type_) GLuint screenFormat = GL_RGBA16F; if(!hdr && !mHDRDisplay && MPColorPrecision == 1) screenFormat = GL_RGB8; - if (!mRT->screen.allocate(resX, resY, screenFormat)) return false; + if (!mRT->screen.allocate(resX, resY, GL_RGBA16F)) return false; mRT->deferredScreen.shareDepthBuffer(mRT->screen); |
