From f4f7b9d35bb47580faaa7cb68e0186ec80980e09 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 27 Oct 2020 23:10:44 +0100 Subject: [PATCH] More stabbing at the mesh uploader and upstream sync --- .../shaders/class1/objects/previewV.glsl | 6 +++--- indra/newview/llmodelpreview.cpp | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl index 8fb78142bf..4bb588335a 100644 --- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl @@ -89,9 +89,9 @@ void main() vec4 col = vec4(0,0,0,1); - // Collect normal lights + // Collect normal lights (need to be divided by two, as we later multiply by 2) col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz); - col.rgb += light_diffuse[2].rgb * calcLocalLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z); - col.rgb += light_diffuse[3].rgb * calcLocalLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z); + col.rgb += light_diffuse[2].rgb*calcLocalLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z); + col.rgb += light_diffuse[3].rgb*calcLocalLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z); vertex_color = col*color; } diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index fc2da93e81..ddd2f76b6e 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -225,7 +225,6 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) } mViewOption["show_textures"] = false; - fmp->childSetValue("verbose_logging", LLSD(mImporterDebug)); mFMP = fmp; mHasPivot = false; @@ -2109,7 +2108,7 @@ void LLModelPreview::updateStatusMessages() // Better error handling if (num_hulls > 256) // decomp cannot have more than 256 hulls (http://wiki.secondlife.com/wiki/Mesh/Mesh_physics) { - // improve uplaoder error reporting + // improve uploader error reporting // LL_INFOS() << "Physical model " << mdl->mLabel << " exceeds 256 hull limitation." << LL_ENDL; std::ostringstream out; out << "Physical model " << mdl->mLabel << " exceeds 256 hull limitation."; @@ -2193,7 +2192,7 @@ void LLModelPreview::updateStatusMessages() if (getLoadState() >= LLModelLoader::ERROR_PARSING) { mModelNoErrors = false; - // improve uplaoder error reporting + // improve uploader error reporting // LL_INFOS() << "Loader returned errors, model can't be uploaded" << LL_ENDL; std::ostringstream out; out << "Loader returned errors, model can't be uploaded"; @@ -2211,7 +2210,7 @@ void LLModelPreview::updateStatusMessages() if (uploadingJointPositions && !isRigValidForJointPositionUpload()) { mModelNoErrors = false; - // improve uplaoder error reporting + // improve uploader error reporting // LL_INFOS() << "Invalid rig, there might be issues with uploading Joint positions" << LL_ENDL; std::ostringstream out; out << "Invalid rig, there might be issues with uploading Joint positions"; @@ -2331,7 +2330,7 @@ void LLModelPreview::updateStatusMessages() // fmp->childSetValue("show_physics", false); //} - // mViewOption["show_physics"] = true; // merge LL uplaoder changes + // mViewOption["show_physics"] = true; // merge LL uploader changes if (phys_hulls > 0) { fmp->enableViewOption("physics_explode"); @@ -2787,7 +2786,7 @@ void LLModelPreview::createPreviewAvatar(void) } else { - // improve uplaoder error reporting + // improve uploader error reporting // LL_INFOS() << "Failed to create preview avatar for upload model window" << LL_ENDL; std::ostringstream out; out << "Failed to create preview avatar for upload model window"; @@ -3441,7 +3440,7 @@ BOOL LLModelPreview::render() // gGL.diffuseColor4fv(PREVIEW_PSYH_EDGE_COL.mV); // gGL.setLineWidth(PREVIEW_PSYH_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt gGL.diffuseColor4fv(phys_edge_col().mV); - glLineWidth(phys_edge_width()); + gGL.setLineWidth(phys_edge_width()); // glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0);