diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl | 21 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl | 21 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/transportF.glsl | 25 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl | 32 | ||||
-rw-r--r-- | indra/newview/lldrawpoolground.cpp | 8 | ||||
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 298 | ||||
-rw-r--r-- | indra/newview/lldrawpoolwlsky.h | 15 | ||||
-rw-r--r-- | indra/newview/llenvironment.cpp | 65 | ||||
-rw-r--r-- | indra/newview/llenvironment.h | 2 | ||||
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 50 | ||||
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 29 | ||||
-rw-r--r-- | indra/newview/llxmlrpclistener.cpp | 43 |
13 files changed, 353 insertions, 258 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl index 584bd568c5..bf0a9048f0 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl @@ -23,16 +23,29 @@ * $/LicenseInfo$ */ +vec3 atmosFragAmbient(vec3 light, vec3 sunlit) +{ + return light; +} - -vec3 atmosLighting(vec3 light) +vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten) { /* stub function for fallback compatibility on class1 hardware */ - return light; + return light; } +vec3 atmosFragAffectDirectionalLight(float light, vec3 sunlit) +{ + return light * sunlit; +} -void calcFragAtmospherics(vec3 inPositionEye, float ambFactor) { +vec3 atmosLighting(vec3 light) +{ + return atmosFragLighting(light, vec3(0), vec3(1.0)); +} + +void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive) +{ /* stub function for fallback compatibility on class1 hardware */ } diff --git a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl index 62f4e51449..b7f117fc5f 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl @@ -23,17 +23,28 @@ * $/LicenseInfo$ */ - - +uniform int no_atmo; uniform vec4 gamma; -/// Soft clips the light with a gamma correction -vec3 scaleSoftClip(vec3 light) { +vec3 scaleFragSoftClip(vec3 light) +{ // For compatibility with lower cards. Do nothing. return light; } +/// Soft clips the light with a gamma correction +vec3 scaleSoftClip(vec3 light) +{ + // For compatibility with lower cards. Do nothing. + return scaleFragSoftClip(light); +} + +vec3 fullbrightScaleSoftClipFrag(vec3 light, vec3 atten) +{ + return (no_atmo == 1) ? light : mix(scaleFragSoftClip(light.rgb), light.rgb, atten); +} + vec3 fullbrightScaleSoftClip(vec3 light) { - return scaleSoftClip(light); + return fullbrightScaleSoftClipFrag(light, vec3(1)); } diff --git a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl index 7c95ecdb14..c3c8329017 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl @@ -22,25 +22,40 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - +uniform int no_atmo; -vec3 atmosTransport(vec3 light) +vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive) { /* stub function for fallback compatibility on class1 hardware */ return light; } -vec3 fullbrightAtmosTransport(vec3 light) +vec3 fullbrightFragAtmosTransport(vec3 light, vec3 atten, vec3 additive) { /* stub function for fallback compatibility on class1 hardware */ return light; } +vec3 fullbrightFragShinyAtmosTransport(vec3 light, vec3 atten, vec3 additive) +{ + /* stub function for fallback compatibility on class1 hardware */ + return light; +} -vec3 fullbrightShinyAtmosTransport(vec3 light) +vec3 atmosTransport(vec3 light) { /* stub function for fallback compatibility on class1 hardware */ - return light; + return atmosFragTransport(light, vec3(1), vec3(0)); +} + +vec3 fullbrightAtmosTransport(vec3 light) +{ + return fullbrightFragAtmosTransport(light, vec3(1), vec3(0)); +} + +vec3 fullbrightShinyAtmosTransport(vec3 light) +{ + return fullbrightFragShinyAtmosTransport(light, vec3(1), vec3(0)); } diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl index cdd84faba9..e3fa431ddf 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl @@ -22,11 +22,13 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - + +/*[EXTRA_CODE_HERE]*/ + #ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; +out vec4 frag_data[3]; #else -#define frag_color gl_FragColor +#define frag_data gl_FragData #endif ///////////////////////////////////////////////////////////////////////// @@ -74,28 +76,37 @@ void main() vec2 uv3 = vary_texcoord2.xy; vec2 uv4 = vary_texcoord3.xy; - vec2 disturbance = vec2(cloudNoise(uv1 / 16.0f).x, cloudNoise((uv3 + uv1) / 16.0f).x) * cloud_variance * (1.0f - cloud_scale * 0.25f); + vec2 disturbance = vec2(cloudNoise(uv1 / 8.0f).x, cloudNoise((uv3 + uv1) / 16.0f).x) * cloud_variance * (1.0f - cloud_scale * 0.25f); + vec2 disturbance2 = vec2(cloudNoise((uv1 + uv3) / 4.0f).x, cloudNoise((uv4 + uv2) / 8.0f).x) * cloud_variance * (1.0f - cloud_scale * 0.25f); // Offset texture coords - uv1 += cloud_pos_density1.xy + disturbance; //large texture, visible density + uv1 += cloud_pos_density1.xy + (disturbance * 0.02); //large texture, visible density uv2 += cloud_pos_density1.xy; //large texture, self shadow - uv3 += cloud_pos_density2.xy + disturbance; //small texture, visible density + uv3 += cloud_pos_density2.xy; //small texture, visible density uv4 += cloud_pos_density2.xy; //small texture, self shadow + float density_variance = min(1.0, (disturbance.x* 2.0 + disturbance.y* 2.0 + disturbance2.x + disturbance2.y)); + + cloudDensity *= 1.0 - (density_variance * density_variance); // Compute alpha1, the main cloud opacity float alpha1 = (cloudNoise(uv1).x - 0.5) + (cloudNoise(uv3).x - 0.5) * cloud_pos_density2.z; - alpha1 = min(max(alpha1 + cloudDensity, 0.) * (10. + disturbance.y) * cloud_pos_density1.z, 1.); + alpha1 = min(max(alpha1 + cloudDensity, 0.) * 10 * cloud_pos_density1.z, 1.); // And smooth alpha1 = 1. - alpha1 * alpha1; alpha1 = 1. - alpha1 * alpha1; + if (alpha1 < 0.001f) + { + discard; + } + // Compute alpha2, for self shadowing effect // (1 - alpha2) will later be used as percentage of incoming sunlight float alpha2 = (cloudNoise(uv2).x - 0.5); - alpha2 = min(max(alpha2 + cloudDensity, 0.) * (2.5 + disturbance.x) * cloud_pos_density1.z, 1.); + alpha2 = min(max(alpha2 + cloudDensity, 0.) * 2.5 * cloud_pos_density1.z, 1.); // And smooth alpha2 = 1. - alpha2; @@ -107,7 +118,8 @@ void main() color *= 2.; /// Gamma correct for WL (soft clip effect). - frag_color.rgb = scaleSoftClip(color.rgb); - frag_color.a = alpha1; + frag_data[0] = vec4(scaleSoftClip(color.rgb), alpha1); + frag_data[1] = vec4(0.0,0.0,0.0,0.0); + frag_data[2] = vec4(0,0,1,0); } diff --git a/indra/newview/lldrawpoolground.cpp b/indra/newview/lldrawpoolground.cpp index e5ce0413b1..bae07a171b 100644 --- a/indra/newview/lldrawpoolground.cpp +++ b/indra/newview/lldrawpoolground.cpp @@ -63,13 +63,9 @@ void LLDrawPoolGround::render(S32 pass) return; } - LLGLSPipelineSkyBox gls_skybox; + LLGLSPipelineDepthTestSkyBox gls_skybox(true, false); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - - LLGLSquashToFarClip far_clip(get_current_projection()); - F32 water_height = gAgent.getRegion()->getWaterHeight(); gGL.pushMatrix(); LLVector3 origin = LLViewerCamera::getInstance()->getOrigin(); @@ -77,8 +73,6 @@ void LLDrawPoolGround::render(S32 pass) LLFace *facep = mDrawFace[0]; - gPipeline.disableLights(); - LLOverrideFaceColor col(this, gSky.mVOSkyp->getGLFogColor()); facep->renderIndexed(); diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index c4560e89f4..9f3cf8f78e 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -29,20 +29,20 @@ #include "lldrawpoolwlsky.h" #include "llerror.h" -#include "llgl.h" -#include "pipeline.h" -#include "llviewercamera.h" +#include "llface.h" #include "llimage.h" -#include "llviewershadermgr.h" +#include "llrender.h" +#include "llatmosphere.h" +#include "llenvironment.h" #include "llglslshader.h" +#include "llgl.h" + +#include "llviewerregion.h" +#include "llviewershadermgr.h" +#include "llviewercamera.h" +#include "pipeline.h" #include "llsky.h" #include "llvowlsky.h" -#include "llviewerregion.h" -#include "llface.h" -#include "llrender.h" - -#include "llenvironment.h" -#include "llatmosphere.h" static LLStaticHashedString sCamPosLocal("camPosLocal"); static LLStaticHashedString sCustomAlpha("custom_alpha"); @@ -163,10 +163,12 @@ void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLoca gGL.popMatrix(); } -void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 camHeightLocal) const +void LLDrawPoolWLSky::renderSkyHazeAdvanced(const LLVector3& camPosLocal, F32 camHeightLocal) const { if (gPipeline.useAdvancedAtmospherics() && gPipeline.canUseWindLightShaders() && gAtmosphere) { + LLGLSPipelineDepthTestSkyBox sky(true, false); + sky_shader->bind(); // bind precomputed textures necessary for calculating sun and sky luminance @@ -208,20 +210,20 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca sky_shader->uniform3f(sCamPosLocal, camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]); - LLGLDisable cull(GL_CULL_FACE); renderFsSky(camPosLocal, camHeightLocal, sky_shader); sky_shader->unbind(); } } -void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightLocal) const +void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 camHeightLocal) const { LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)) { - LLGLDisable blend(GL_BLEND); + LLGLSPipelineDepthTestSkyBox sky(true, false); + sky_shader->bind(); LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); @@ -247,19 +249,28 @@ void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightL } } +void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightLocal) const +{ + LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); + + if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)) + { + LLGLSPipelineDepthTestSkyBox sky(true, false); + sky_shader->bind(); + renderDome(origin, camHeightLocal, sky_shader); + sky_shader->unbind(); + } +} + void LLDrawPoolWLSky::renderStars(void) const { - LLGLSPipelineSkyBox gls_sky; - LLGLEnable blend(GL_BLEND); - gGL.setSceneBlendType(LLRender::BT_ALPHA); + LLGLSPipelineBlendSkyBox gls_skybox(true, false); // *NOTE: have to have bound the cloud noise texture already since register // combiners blending below requires something to be bound // and we might as well only bind once. gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); - gPipeline.disableLights(); - // *NOTE: we divide by two here and GL_ALPHA_SCALE by two below to avoid // clamping and allow the star_alpha param to brighten the stars. LLColor4 star_alpha(LLColor4::black); @@ -323,9 +334,7 @@ void LLDrawPoolWLSky::renderStars(void) const void LLDrawPoolWLSky::renderStarsDeferred(void) const { - LLGLSPipelineSkyBox gls_sky; - LLGLEnable blend(GL_BLEND); - LLGLDepthTest depth_test(GL_TRUE, GL_FALSE, GL_LESS); + LLGLSPipelineBlendSkyBox gls_sky(true, false); gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); @@ -384,39 +393,183 @@ void LLDrawPoolWLSky::renderStarsDeferred(void) const gDeferredStarProgram.unbind(); } -void LLDrawPoolWLSky::renderSkyClouds(const LLVector3& camPosLocal, F32 camHeightLocal) const +void LLDrawPoolWLSky::renderSkyCloudsAdvanced(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const +{ + if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp->getCloudNoiseTex()) + { + LLGLSPipelineBlendSkyBox pipeline(true, true); + + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + + cloudshader->bind(); + + LLPointer<LLViewerTexture> cloud_noise = gSky.mVOSkyp->getCloudNoiseTex(); + LLPointer<LLViewerTexture> cloud_noise_next = gSky.mVOSkyp->getCloudNoiseTexNext(); + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); + + F32 cloud_variance = psky ? psky->getCloudVariance() : 0.0f; + F32 blend_factor = psky ? psky->getBlendFactor() : 0.0f; + + // if we even have sun disc textures to work with... + if (cloud_noise || cloud_noise_next) + { + if (cloud_noise && (!cloud_noise_next || (cloud_noise == cloud_noise_next))) + { + // Bind current and next sun textures + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise, LLTexUnit::TT_TEXTURE); + blend_factor = 0; + } + else if (cloud_noise_next && !cloud_noise) + { + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise_next, LLTexUnit::TT_TEXTURE); + blend_factor = 0; + } + else if (cloud_noise_next != cloud_noise) + { + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise, LLTexUnit::TT_TEXTURE); + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP_NEXT, cloud_noise_next, LLTexUnit::TT_TEXTURE); + } + } + + cloudshader->bindTexture(LLShaderMgr::TRANSMITTANCE_TEX, gAtmosphere->getTransmittance()); + cloudshader->bindTexture(LLShaderMgr::SCATTER_TEX, gAtmosphere->getScattering()); + cloudshader->bindTexture(LLShaderMgr::SINGLE_MIE_SCATTER_TEX, gAtmosphere->getMieScattering()); + cloudshader->bindTexture(LLShaderMgr::ILLUMINANCE_TEX, gAtmosphere->getIlluminance()); + + LLVector3 sun_dir = LLEnvironment::instance().getSunDirection(); + LLVector3 moon_dir = LLEnvironment::instance().getMoonDirection(); + + F32 sunSize = (float)cosf(psky->getSunArcRadians()); + cloudshader->uniform1f(LLShaderMgr::SUN_SIZE, sunSize); + cloudshader->uniform3fv(LLShaderMgr::DEFERRED_SUN_DIR, 1, sun_dir.mV); + cloudshader->uniform3fv(LLShaderMgr::DEFERRED_MOON_DIR, 1, moon_dir.mV); + + cloudshader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); + cloudshader->uniform1f(LLShaderMgr::CLOUD_VARIANCE, cloud_variance); + + cloudshader->uniform3f(sCamPosLocal, camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]); + + /// Render the skydome + renderDome(camPosLocal, camHeightLocal, cloudshader); + + cloudshader->unbind(); + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); + } +} + +void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const { if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp->getCloudNoiseTex()) { - LLGLDepthTest depth(GL_TRUE, GL_TRUE); - LLGLEnable blend(GL_BLEND); - gGL.setSceneBlendType(LLRender::BT_ALPHA); + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + + LLGLSPipelineBlendSkyBox pipeline(true, true); - cloud_shader->bind(); + cloudshader->bind(); + + LLPointer<LLViewerTexture> cloud_noise = gSky.mVOSkyp->getCloudNoiseTex(); + LLPointer<LLViewerTexture> cloud_noise_next = gSky.mVOSkyp->getCloudNoiseTexNext(); + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); + + F32 cloud_variance = psky ? psky->getCloudVariance() : 0.0f; + F32 blend_factor = psky ? psky->getBlendFactor() : 0.0f; - cloud_shader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, gSky.mVOSkyp->getCloudNoiseTex()); - cloud_shader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP_NEXT, gSky.mVOSkyp->getCloudNoiseTexNext()); + // if we even have sun disc textures to work with... + if (cloud_noise || cloud_noise_next) + { + if (cloud_noise && (!cloud_noise_next || (cloud_noise == cloud_noise_next))) + { + // Bind current and next sun textures + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise, LLTexUnit::TT_TEXTURE); + blend_factor = 0; + } + else if (cloud_noise_next && !cloud_noise) + { + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise_next, LLTexUnit::TT_TEXTURE); + blend_factor = 0; + } + else if (cloud_noise_next != cloud_noise) + { + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise, LLTexUnit::TT_TEXTURE); + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP_NEXT, cloud_noise_next, LLTexUnit::TT_TEXTURE); + } + } + cloudshader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); + cloudshader->uniform1f(LLShaderMgr::CLOUD_VARIANCE, cloud_variance); + + /// Render the skydome + renderDome(camPosLocal, camHeightLocal, cloudshader); + + cloudshader->unbind(); + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); + } +} + +void LLDrawPoolWLSky::renderSkyClouds(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const +{ + if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp->getCloudNoiseTex()) + { LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - F32 blend_factor = psky ? psky->getBlendFactor() : 0.0f; + LLGLSPipelineBlendSkyBox pipeline(true, true); + + cloudshader->bind(); + + LLPointer<LLViewerTexture> cloud_noise = gSky.mVOSkyp->getCloudNoiseTex(); + LLPointer<LLViewerTexture> cloud_noise_next = gSky.mVOSkyp->getCloudNoiseTexNext(); + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); + F32 cloud_variance = psky ? psky->getCloudVariance() : 0.0f; + F32 blend_factor = psky ? psky->getBlendFactor() : 0.0f; + + // if we even have sun disc textures to work with... + if (cloud_noise || cloud_noise_next) + { + if (cloud_noise && (!cloud_noise_next || (cloud_noise == cloud_noise_next))) + { + // Bind current and next sun textures + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise, LLTexUnit::TT_TEXTURE); + blend_factor = 0; + } + else if (cloud_noise_next && !cloud_noise) + { + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise_next, LLTexUnit::TT_TEXTURE); + blend_factor = 0; + } + else if (cloud_noise_next != cloud_noise) + { + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise, LLTexUnit::TT_TEXTURE); + cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP_NEXT, cloud_noise_next, LLTexUnit::TT_TEXTURE); + } + } - cloud_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); - cloud_shader->uniform1f(LLShaderMgr::CLOUD_VARIANCE, cloud_variance); + cloudshader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); + cloudshader->uniform1f(LLShaderMgr::CLOUD_VARIANCE, cloud_variance); /// Render the skydome - renderDome(camPosLocal, camHeightLocal, cloud_shader); + renderDome(camPosLocal, camHeightLocal, cloudshader); + + cloudshader->unbind(); - cloud_shader->unbind(); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); } } void LLDrawPoolWLSky::renderHeavenlyBodies() { - LLGLSPipelineSkyBox gls_skybox; - LLGLEnable blend_on(GL_BLEND); - gPipeline.disableLights(); + LLGLSPipelineBlendSkyBox gls_skybox(true, false); LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); gGL.pushMatrix(); @@ -540,35 +693,26 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) const F32 camHeightLocal = LLEnvironment::instance().getCamHeight(); - LLGLSNoFog disableFog; - LLGLDisable clip(GL_CLIP_PLANE0); - gGL.setColorMask(true, false); - LLGLSquashToFarClip far_clip(get_current_projection()); - LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); if (gPipeline.canUseWindLightShaders()) { + if (gPipeline.useAdvancedAtmospherics()) { - // Disable depth-writes for sky, but re-enable depth writes for the cloud - // rendering below so the cloud shader can write out depth for the stars to test against - LLGLDepthTest depth(GL_TRUE, GL_FALSE); - - if (gPipeline.useAdvancedAtmospherics()) - { - renderSkyHazeDeferred(origin, camHeightLocal); - } - else - { - renderSkyHaze(origin, camHeightLocal); - } + renderSkyHazeAdvanced(origin, camHeightLocal); + renderHeavenlyBodies(); + renderSkyCloudsAdvanced(origin, camHeightLocal, cloud_shader); + } + else + { + renderSkyHazeDeferred(origin, camHeightLocal); renderHeavenlyBodies(); + renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader); } + } - renderSkyClouds(origin, camHeightLocal); - } gGL.setColorMask(true, true); } @@ -576,21 +720,12 @@ void LLDrawPoolWLSky::renderPostDeferred(S32 pass) { LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); - LLGLSNoFog disableFog; - LLGLDisable clip(GL_CLIP_PLANE0); - LLGLSquashToFarClip far_clip(get_current_projection()); + LLGLSPipelineBlendSkyBox sky(true, false); gGL.pushMatrix(); gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]); - gGL.setColorMask(true, false); - - // would be nice to do this here, but would need said bodies - // to render at a realistic distance for depth-testing against the clouds... - //renderHeavenlyBodies(); renderStarsDeferred(); - gGL.popMatrix(); - gGL.setColorMask(true, true); } void LLDrawPoolWLSky::render(S32 pass) @@ -602,35 +737,14 @@ void LLDrawPoolWLSky::render(S32 pass) LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY); const F32 camHeightLocal = LLEnvironment::instance().getCamHeight(); - - LLGLSNoFog disableFog; - LLGLDepthTest depth(GL_TRUE, GL_FALSE); - LLGLDisable clip(GL_CLIP_PLANE0); - - LLGLSquashToFarClip far_clip(get_current_projection()); - LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); - renderSkyHaze(origin, camHeightLocal); - - gGL.pushMatrix(); - - // MAINT-9006 keep sun position consistent between ALM and non-ALM rendering - //gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]); - - // *NOTE: have to bind a texture here since register combiners blending in - // renderStars() requires something to be bound and we might as well only - // bind the moon's texture once. - gGL.getTexUnit(0)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture()); - gGL.getTexUnit(1)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture(LLRender::ALTERNATE_DIFFUSE_MAP)); - - renderHeavenlyBodies(); - - renderStars(); - - gGL.popMatrix(); + LLGLSPipelineBlendSkyBox sky(true, false); - renderSkyClouds(origin, camHeightLocal); + renderSkyHaze(origin, camHeightLocal); + renderStars(); + renderHeavenlyBodies(); + renderSkyClouds(origin, camHeightLocal, cloud_shader); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h index 309efdbc5b..4338de32dc 100644 --- a/indra/newview/lldrawpoolwlsky.h +++ b/indra/newview/lldrawpoolwlsky.h @@ -81,14 +81,19 @@ public: private: void renderFsSky(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const; void renderDome(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const; - void renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightLocal) const; - void renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 camHeightLocal) const; - void renderStarsDeferred(void) const; + void renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightLocal) const; + void renderSkyClouds(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const; + + void renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 camHeightLocal) const; + void renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const; + void renderSkyHazeAdvanced(const LLVector3& camPosLocal, F32 camHeightLocal) const; + void renderSkyCloudsAdvanced(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const; + + void renderStarsDeferred(void) const; void renderStars(void) const; - void renderSkyClouds(const LLVector3& camPosLocal, F32 camHeightLocal) const; - void renderHeavenlyBodies(); + void renderHeavenlyBodies(); }; #endif // LL_DRAWPOOLWLSKY_H diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index ae625630eb..da558a0ba3 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -885,6 +885,7 @@ void LLEnvironment::updateCloudScroll() } +// static void LLEnvironment::updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting) { LL_RECORD_BLOCK_TIME(FTM_SHADER_PARAM_UPDATE); @@ -894,62 +895,19 @@ void LLEnvironment::updateGLVariablesForSettings(LLGLSLShader *shader, const LLS for (auto &it: params) { LLSD value; - - bool found_in_settings = psetting->mSettings.has(it.first); - bool found_in_legacy_settings = !found_in_settings && psetting->mSettings.has(LLSettingsSky::SETTING_LEGACY_HAZE) && psetting->mSettings[LLSettingsSky::SETTING_LEGACY_HAZE].has(it.first); - - if (found_in_settings) - { - value = psetting->mSettings[it.first]; - } - else if (found_in_legacy_settings) + // legacy first since it contains ambient color and we prioritize value from legacy, see getAmbientColor() + if (psetting->mSettings.has(LLSettingsSky::SETTING_LEGACY_HAZE) && psetting->mSettings[LLSettingsSky::SETTING_LEGACY_HAZE].has(it.first)) { value = psetting->mSettings[LLSettingsSky::SETTING_LEGACY_HAZE][it.first]; } - else if (psetting->getSettingsType() == "sky") + else if (psetting->mSettings.has(it.first)) { - // Legacy atmospherics is a special case, - // these values either have non zero defaults when they are not present - // in LLSD or need to be acounted for (reset) even if they are not present - // Todo: consider better options, for example make LLSettingsSky init these options - // Todo: we should reset shaders for all missing fields, not just these ones - LLSettingsSky::ptr_t skyp = std::static_pointer_cast<LLSettingsSky>(psetting); - if (it.first == LLSettingsSky::SETTING_BLUE_DENSITY) - { - value = skyp->getBlueDensity().getValue(); - } - else if (it.first == LLSettingsSky::SETTING_BLUE_HORIZON) - { - value = skyp->getBlueHorizon().getValue(); - } - else if (it.first == LLSettingsSky::SETTING_DENSITY_MULTIPLIER) - { - value = skyp->getDensityMultiplier(); - } - else if (it.first == LLSettingsSky::SETTING_DISTANCE_MULTIPLIER) - { - value = skyp->getDistanceMultiplier(); - } - else if (it.first == LLSettingsSky::SETTING_HAZE_DENSITY) - { - value = skyp->getHazeDensity(); - } - else if (it.first == LLSettingsSky::SETTING_HAZE_HORIZON) - { - value = skyp->getHazeHorizon(); - } - else if (it.first == LLSettingsSky::SETTING_AMBIENT) - { - value = skyp->getAmbientColor().getValue(); - } - else - { - continue; - } + value = psetting->mSettings[it.first]; } else { - continue; + // We need to reset shaders, use defaults + value = it.second.getDefaultValue(); } LLSD::Type setting_type = value.type(); @@ -957,16 +915,16 @@ void LLEnvironment::updateGLVariablesForSettings(LLGLSLShader *shader, const LLS switch (setting_type) { case LLSD::TypeInteger: - shader->uniform1i(it.second, value.asInteger()); + shader->uniform1i(it.second.getShaderKey(), value.asInteger()); //_WARNS("RIDER") << "pushing '" << (*it).first << "' as " << value << LL_ENDL; break; case LLSD::TypeReal: - shader->uniform1f(it.second, value.asReal()); + shader->uniform1f(it.second.getShaderKey(), value.asReal()); //_WARNS("RIDER") << "pushing '" << (*it).first << "' as " << value << LL_ENDL; break; case LLSD::TypeBoolean: - shader->uniform1i(it.second, value.asBoolean() ? 1 : 0); + shader->uniform1i(it.second.getShaderKey(), value.asBoolean() ? 1 : 0); //_WARNS("RIDER") << "pushing '" << (*it).first << "' as " << value << LL_ENDL; break; @@ -974,8 +932,7 @@ void LLEnvironment::updateGLVariablesForSettings(LLGLSLShader *shader, const LLS { LLVector4 vect4(value); //_WARNS("RIDER") << "pushing '" << (*it).first << "' as " << vect4 << LL_ENDL; - shader->uniform4fv(it.second, 1, vect4.mV); - + shader->uniform4fv(it.second.getShaderKey(), 1, vect4.mV); break; } diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 31c9d290be..63020ab5d7 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -124,7 +124,7 @@ public: void update(const LLViewerCamera * cam); - void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); + static void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); void updateShaderUniforms(LLGLSLShader *shader); void setSelectedEnvironment(EnvSelection_t env, LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false); diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index dad7fc9448..2696ad4df5 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -683,26 +683,31 @@ LLSettingsSky::parammapping_t LLSettingsVOSky::getParameterMap() const if (param_map.empty()) { // LEGACY_ATMOSPHERICS - param_map[SETTING_AMBIENT] = LLShaderMgr::AMBIENT; - param_map[SETTING_BLUE_DENSITY] = LLShaderMgr::BLUE_DENSITY; - param_map[SETTING_BLUE_HORIZON] = LLShaderMgr::BLUE_HORIZON; - param_map[SETTING_HAZE_DENSITY] = LLShaderMgr::HAZE_DENSITY; - param_map[SETTING_HAZE_HORIZON] = LLShaderMgr::HAZE_HORIZON; - param_map[SETTING_DENSITY_MULTIPLIER] = LLShaderMgr::DENSITY_MULTIPLIER; - param_map[SETTING_DISTANCE_MULTIPLIER] = LLShaderMgr::DISTANCE_MULTIPLIER; - - param_map[SETTING_CLOUD_COLOR] = LLShaderMgr::CLOUD_COLOR; - param_map[SETTING_CLOUD_POS_DENSITY2] = LLShaderMgr::CLOUD_POS_DENSITY2; - param_map[SETTING_CLOUD_SCALE] = LLShaderMgr::CLOUD_SCALE; - param_map[SETTING_CLOUD_SHADOW] = LLShaderMgr::CLOUD_SHADOW; - param_map[SETTING_CLOUD_VARIANCE] = LLShaderMgr::CLOUD_VARIANCE; - param_map[SETTING_GLOW] = LLShaderMgr::GLOW; - param_map[SETTING_MAX_Y] = LLShaderMgr::MAX_Y; - param_map[SETTING_SUNLIGHT_COLOR] = LLShaderMgr::SUNLIGHT_COLOR; - param_map[SETTING_MOON_BRIGHTNESS] = LLShaderMgr::MOON_BRIGHTNESS; - param_map[SETTING_SKY_MOISTURE_LEVEL] = LLShaderMgr::MOISTURE_LEVEL; - param_map[SETTING_SKY_DROPLET_RADIUS] = LLShaderMgr::DROPLET_RADIUS; - param_map[SETTING_SKY_ICE_LEVEL] = LLShaderMgr::ICE_LEVEL; + + // Todo: default 'legacy' values duplicate the ones from functions like getBlueDensity() find a better home for them + // There is LLSettingsSky::defaults(), but it doesn't contain everything since it is geared towards creating new settings. + param_map[SETTING_AMBIENT] = DefaultParam(LLShaderMgr::AMBIENT, LLColor3(0.25f, 0.25f, 0.25f).getValue()); + param_map[SETTING_BLUE_DENSITY] = DefaultParam(LLShaderMgr::BLUE_DENSITY, LLColor3(0.2447f, 0.4487f, 0.7599f).getValue()); + param_map[SETTING_BLUE_HORIZON] = DefaultParam(LLShaderMgr::BLUE_HORIZON, LLColor3(0.4954f, 0.4954f, 0.6399f).getValue()); + param_map[SETTING_HAZE_DENSITY] = DefaultParam(LLShaderMgr::HAZE_DENSITY, LLSD(0.7f)); + param_map[SETTING_HAZE_HORIZON] = DefaultParam(LLShaderMgr::HAZE_HORIZON, LLSD(0.19f)); + param_map[SETTING_DENSITY_MULTIPLIER] = DefaultParam(LLShaderMgr::DENSITY_MULTIPLIER, LLSD(0.0001f)); + param_map[SETTING_DISTANCE_MULTIPLIER] = DefaultParam(LLShaderMgr::DISTANCE_MULTIPLIER, LLSD(0.8f)); + + // Following values are always present, so we can just zero these ones, but used values from defaults() + LLSD& sky_defaults = LLSettingsSky::defaults(); + param_map[SETTING_CLOUD_COLOR] = DefaultParam(LLShaderMgr::CLOUD_COLOR, sky_defaults[SETTING_CLOUD_COLOR]); + param_map[SETTING_CLOUD_POS_DENSITY2] = DefaultParam(LLShaderMgr::CLOUD_POS_DENSITY2, sky_defaults[SETTING_CLOUD_POS_DENSITY2]); + param_map[SETTING_CLOUD_SCALE] = DefaultParam(LLShaderMgr::CLOUD_SCALE, sky_defaults[SETTING_CLOUD_SCALE]); + param_map[SETTING_CLOUD_SHADOW] = DefaultParam(LLShaderMgr::CLOUD_SHADOW, sky_defaults[SETTING_CLOUD_SHADOW]); + param_map[SETTING_CLOUD_VARIANCE] = DefaultParam(LLShaderMgr::CLOUD_VARIANCE, sky_defaults[SETTING_CLOUD_VARIANCE]); + param_map[SETTING_GLOW] = DefaultParam(LLShaderMgr::GLOW, sky_defaults[SETTING_GLOW]); + param_map[SETTING_MAX_Y] = DefaultParam(LLShaderMgr::MAX_Y, sky_defaults[SETTING_MAX_Y]); + param_map[SETTING_SUNLIGHT_COLOR] = DefaultParam(LLShaderMgr::SUNLIGHT_COLOR, sky_defaults[SETTING_SUNLIGHT_COLOR]); + param_map[SETTING_MOON_BRIGHTNESS] = DefaultParam(LLShaderMgr::MOON_BRIGHTNESS, sky_defaults[SETTING_MOON_BRIGHTNESS]); + param_map[SETTING_SKY_MOISTURE_LEVEL] = DefaultParam(LLShaderMgr::MOISTURE_LEVEL, sky_defaults[SETTING_SKY_MOISTURE_LEVEL]); + param_map[SETTING_SKY_DROPLET_RADIUS] = DefaultParam(LLShaderMgr::DROPLET_RADIUS, sky_defaults[SETTING_SKY_DROPLET_RADIUS]); + param_map[SETTING_SKY_ICE_LEVEL] = DefaultParam(LLShaderMgr::ICE_LEVEL, sky_defaults[SETTING_SKY_ICE_LEVEL]); // AdvancedAtmospherics TODO // Provide mappings for new shader params here @@ -911,8 +916,9 @@ LLSettingsWater::parammapping_t LLSettingsVOWater::getParameterMap() const if (param_map.empty()) { - param_map[SETTING_FOG_COLOR] = LLShaderMgr::WATER_FOGCOLOR; - param_map[SETTING_FOG_DENSITY] = LLShaderMgr::WATER_FOGDENSITY; + LLSD &water_defaults = LLSettingsWater::defaults(); + param_map[SETTING_FOG_COLOR] = DefaultParam(LLShaderMgr::WATER_FOGCOLOR, water_defaults[SETTING_FOG_COLOR]); + param_map[SETTING_FOG_DENSITY] = DefaultParam(LLShaderMgr::WATER_FOGDENSITY, water_defaults[SETTING_FOG_DENSITY]); } return param_map; } diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 7d4d737db4..9371711ca1 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -1272,7 +1272,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh { LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_DRAW_WATER); - LLGLSquashToFarClip squash(get_current_projection(), 1); + LLGLSquashToFarClip squash; if (camera->getOrigin().isExactlyZero()) { //origin is invalid, draw entire box gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index d98fd34714..8a949c6b4e 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -31,25 +31,26 @@ #include "llfeaturemanager.h" #include "llviewershadermgr.h" - -#include "llfile.h" -#include "llviewerwindow.h" -#include "llwindow.h" #include "llviewercontrol.h" -#include "pipeline.h" + +#include "llrender.h" +#include "llenvironment.h" +#include "llatmosphere.h" #include "llworld.h" #include "llsky.h" #include "llvosky.h" -#include "llrender.h" + +#include "pipeline.h" + +#include "llfile.h" +#include "llviewerwindow.h" +#include "llwindow.h" + #include "lljoint.h" #include "llskinningutil.h" -#include "llenvironment.h" -#include "llatmosphere.h" -#ifdef LL_RELEASE_FOR_DOWNLOAD -#define UNIFORM_ERRS LL_WARNS_ONCE("Shader") -#else -#define UNIFORM_ERRS LL_ERRS("Shader") +#if LL_WINDOWS +#pragma optimize("", off) #endif static LLStaticHashedString sTexture0("texture0"); @@ -486,7 +487,7 @@ void LLViewerShaderMgr::setShaders() S32 effect_class = 2; S32 wl_class = 3; S32 water_class = 2; - S32 deferred_class = 0; + S32 deferred_class = 2; S32 transform_class = gGLManager.mHasTransformFeedback ? 1 : 0; static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback", false); @@ -935,6 +936,7 @@ BOOL LLViewerShaderMgr::loadBasicShaders() // Note usage of GL_VERTEX_SHADER_ARB if (loadShaderFile(shaders[i].first, shaders[i].second, GL_VERTEX_SHADER_ARB, &attribs) == 0) { + LL_SHADER_LOADING_WARNS() << "Failed to load vertex shader " << shaders[i].first << LL_ENDL; return FALSE; } } @@ -991,6 +993,7 @@ BOOL LLViewerShaderMgr::loadBasicShaders() // Note usage of GL_FRAGMENT_SHADER_ARB if (loadShaderFile(shaders[i].first, shaders[i].second, GL_FRAGMENT_SHADER_ARB, &attribs, index_channels[i]) == 0) { + LL_SHADER_LOADING_WARNS() << "Failed to load fragment shader " << shaders[i].first << LL_ENDL; return FALSE; } } diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index 7bc8af4a0b..0693d08dfb 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -105,29 +105,12 @@ public: def(CURLE_UNSUPPORTED_PROTOCOL); /* 1 */ def(CURLE_FAILED_INIT); /* 2 */ def(CURLE_URL_MALFORMAT); /* 3 */ - def(CURLE_URL_MALFORMAT_USER); /* 4 - NOT USED */ def(CURLE_COULDNT_RESOLVE_PROXY); /* 5 */ def(CURLE_COULDNT_RESOLVE_HOST); /* 6 */ def(CURLE_COULDNT_CONNECT); /* 7 */ - def(CURLE_FTP_WEIRD_SERVER_REPLY); /* 8 */ - def(CURLE_FTP_ACCESS_DENIED); /* 9 a service was denied by the FTP server - due to lack of access - when login fails - this is not returned. */ - def(CURLE_FTP_USER_PASSWORD_INCORRECT); /* 10 - NOT USED */ - def(CURLE_FTP_WEIRD_PASS_REPLY); /* 11 */ - def(CURLE_FTP_WEIRD_USER_REPLY); /* 12 */ - def(CURLE_FTP_WEIRD_PASV_REPLY); /* 13 */ - def(CURLE_FTP_WEIRD_227_FORMAT); /* 14 */ - def(CURLE_FTP_CANT_GET_HOST); /* 15 */ - def(CURLE_FTP_CANT_RECONNECT); /* 16 */ - def(CURLE_FTP_COULDNT_SET_BINARY); /* 17 */ def(CURLE_PARTIAL_FILE); /* 18 */ - def(CURLE_FTP_COULDNT_RETR_FILE); /* 19 */ - def(CURLE_FTP_WRITE_ERROR); /* 20 */ - def(CURLE_FTP_QUOTE_ERROR); /* 21 */ def(CURLE_HTTP_RETURNED_ERROR); /* 22 */ def(CURLE_WRITE_ERROR); /* 23 */ - def(CURLE_MALFORMAT_USER); /* 24 - NOT USED */ def(CURLE_UPLOAD_FAILED); /* 25 - failed upload "command" */ def(CURLE_READ_ERROR); /* 26 - could open/read from file */ def(CURLE_OUT_OF_MEMORY); /* 27 */ @@ -135,29 +118,18 @@ public: instead of a memory allocation error if CURL_DOES_CONVERSIONS is defined */ - def(CURLE_OPERATION_TIMEOUTED); /* 28 - the timeout time was reached */ - def(CURLE_FTP_COULDNT_SET_ASCII); /* 29 - TYPE A failed */ - def(CURLE_FTP_PORT_FAILED); /* 30 - FTP PORT operation failed */ - def(CURLE_FTP_COULDNT_USE_REST); /* 31 - the REST command failed */ - def(CURLE_FTP_COULDNT_GET_SIZE); /* 32 - the SIZE command failed */ + def(CURLE_OPERATION_TIMEDOUT); /* 28 - the timeout time was reached */ def(CURLE_HTTP_RANGE_ERROR); /* 33 - RANGE "command" didn't work */ def(CURLE_HTTP_POST_ERROR); /* 34 */ def(CURLE_SSL_CONNECT_ERROR); /* 35 - wrong when connecting with SSL */ def(CURLE_BAD_DOWNLOAD_RESUME); /* 36 - couldn't resume download */ def(CURLE_FILE_COULDNT_READ_FILE); /* 37 */ - def(CURLE_LDAP_CANNOT_BIND); /* 38 */ - def(CURLE_LDAP_SEARCH_FAILED); /* 39 */ def(CURLE_LIBRARY_NOT_FOUND); /* 40 */ def(CURLE_FUNCTION_NOT_FOUND); /* 41 */ def(CURLE_ABORTED_BY_CALLBACK); /* 42 */ def(CURLE_BAD_FUNCTION_ARGUMENT); /* 43 */ - def(CURLE_BAD_CALLING_ORDER); /* 44 - NOT USED */ def(CURLE_INTERFACE_FAILED); /* 45 - CURLOPT_INTERFACE failed */ - def(CURLE_BAD_PASSWORD_ENTERED); /* 46 - NOT USED */ def(CURLE_TOO_MANY_REDIRECTS ); /* 47 - catch endless re-direct loops */ - def(CURLE_UNKNOWN_TELNET_OPTION); /* 48 - User specified an unknown option */ - def(CURLE_TELNET_OPTION_SYNTAX ); /* 49 - Malformed telnet option */ - def(CURLE_OBSOLETE); /* 50 - NOT USED */ def(CURLE_SSL_PEER_CERTIFICATE); /* 51 - peer's certificate wasn't ok */ def(CURLE_GOT_NOTHING); /* 52 - when this is a specific error */ def(CURLE_SSL_ENGINE_NOTFOUND); /* 53 - SSL crypto engine not found */ @@ -165,26 +137,19 @@ public: default */ def(CURLE_SEND_ERROR); /* 55 - failed sending network data */ def(CURLE_RECV_ERROR); /* 56 - failure in receiving network data */ - def(CURLE_SHARE_IN_USE); /* 57 - share is in use */ + def(CURLE_SSL_CERTPROBLEM); /* 58 - problem with the local certificate */ def(CURLE_SSL_CIPHER); /* 59 - couldn't use specified cipher */ def(CURLE_SSL_CACERT); /* 60 - problem with the CA cert (path?) */ def(CURLE_BAD_CONTENT_ENCODING); /* 61 - Unrecognized transfer encoding */ - def(CURLE_LDAP_INVALID_URL); /* 62 - Invalid LDAP URL */ + def(CURLE_FILESIZE_EXCEEDED); /* 63 - Maximum file size exceeded */ - def(CURLE_FTP_SSL_FAILED); /* 64 - Requested FTP SSL level failed */ + def(CURLE_SEND_FAIL_REWIND); /* 65 - Sending the data requires a rewind that failed */ def(CURLE_SSL_ENGINE_INITFAILED); /* 66 - failed to initialise ENGINE */ def(CURLE_LOGIN_DENIED); /* 67 - user); password or similar was not accepted and we failed to login */ - def(CURLE_TFTP_NOTFOUND); /* 68 - file not found on server */ - def(CURLE_TFTP_PERM); /* 69 - permission problem on server */ - def(CURLE_TFTP_DISKFULL); /* 70 - out of disk space on server */ - def(CURLE_TFTP_ILLEGAL); /* 71 - Illegal TFTP operation */ - def(CURLE_TFTP_UNKNOWNID); /* 72 - Unknown transfer ID */ - def(CURLE_TFTP_EXISTS); /* 73 - File already exists */ - def(CURLE_TFTP_NOSUCHUSER); /* 74 - No such user */ def(CURLE_CONV_FAILED); /* 75 - conversion failed */ def(CURLE_CONV_REQD); /* 76 - caller must register conversion callbacks using curl_easy_setopt options |