summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/featuretable_solaris.txt173
-rw-r--r--indra/newview/licenses-solaris.txt516
-rw-r--r--indra/newview/lldrawpoolsky.h2
-rw-r--r--indra/newview/lldrawpoolwater.cpp2
-rw-r--r--indra/newview/llfeaturemanager.cpp7
-rw-r--r--indra/newview/llfolderview.cpp22
-rw-r--r--indra/newview/llhudmanager.cpp101
-rw-r--r--indra/newview/llhudmanager.h10
-rw-r--r--indra/newview/llimview.cpp10
-rw-r--r--indra/newview/llpolymesh.cpp5
-rw-r--r--indra/newview/llpreviewscript.cpp20
-rw-r--r--indra/newview/llselectmgr.cpp7
-rw-r--r--indra/newview/llstartup.cpp10
-rw-r--r--indra/newview/llviewerinventory.cpp6
-rw-r--r--indra/newview/llviewerjointmesh.cpp3
-rw-r--r--indra/newview/llviewermenu.cpp89
-rw-r--r--indra/newview/llviewermenufile.cpp10
-rw-r--r--indra/newview/llviewermessage.cpp26
-rw-r--r--indra/newview/llviewerregion.cpp65
-rw-r--r--indra/newview/llviewerwindow.cpp83
-rw-r--r--indra/newview/llvoavatar.cpp1
-rw-r--r--indra/newview/llvocache.cpp45
-rw-r--r--indra/newview/llvograss.cpp3
-rw-r--r--indra/newview/llvosky.cpp8
-rw-r--r--indra/newview/llweb.cpp2
-rw-r--r--indra/newview/llxmlrpctransaction.cpp2
-rw-r--r--indra/newview/pipeline.cpp265
-rw-r--r--indra/newview/pipeline.h27
28 files changed, 1246 insertions, 274 deletions
diff --git a/indra/newview/featuretable_solaris.txt b/indra/newview/featuretable_solaris.txt
new file mode 100644
index 0000000000..6c7acfa187
--- /dev/null
+++ b/indra/newview/featuretable_solaris.txt
@@ -0,0 +1,173 @@
+version 10
+
+// NOTE: This is mostly identical to featuretable.txt with a few differences
+// Should be combined into one table
+
+//
+// Generates lists of feature mask that can be applied on top of each other.
+//
+// // Begin comments
+// list <name>
+// Starts a feature list named <name>
+// <name> <available> <recommended>
+// <name> is the name of a feature
+// <available> is 0 or 1, whether the feature is available
+// <recommended> is an S32 which is the recommended value
+//
+// For now, the first list read sets up all of the default values
+//
+
+
+//
+// All contains everything at their default settings for high end machines
+// NOTE: All settings are set to the MIN of applied values, including 'all'!
+//
+list all
+RenderVBO 1 1
+RenderAniso 1 0
+RenderAvatarMode 1 2
+RenderAvatarVP 1 1
+RenderDistance 1 128
+RenderLighting 1 1
+RenderObjectBump 1 1
+RenderParticleCount 1 4096
+RenderRippleWater 1 1
+RenderTerrainDetail 1 2
+VertexShaderEnable 1 1
+
+//
+// Class 0 Hardware (Unknown or just old)
+//
+list Class0
+VertexShaderEnable 1 0
+RenderVBO 1 0
+RenderDistance 1 64
+RenderAvatarVP 1 0
+RenderAvatarMode 1 0
+RenderLighting 1 0
+RenderObjectBump 1 0
+RenderRippleWater 1 0
+
+//
+// Class 1 Hardware
+//
+list Class1
+VertexShaderEnable 1 0
+RenderVBO 1 1
+RenderDistance 1 96
+RenderAvatarVP 1 1
+RenderAvatarMode 1 0
+RenderLighting 1 0
+RenderObjectBump 1 0
+RenderRippleWater 1 0
+
+//
+// Class 2 Hardware (make it purty)
+//
+list Class2
+VertexShaderEnable 1 1
+RenderAvatarVP 1 1
+RenderAvatarMode 1 1
+RenderLighting 1 1
+RenderObjectBump 1 1
+RenderRippleWater 1 1
+
+//
+// Class 3 Hardware (make it purty)
+//
+list Class3
+VertexShaderEnable 1 1
+RenderAvatarVP 1 1
+RenderAvatarMode 1 1
+RenderLighting 1 1
+RenderObjectBump 1 1
+RenderRippleWater 1 1
+
+//
+// No Pixel Shaders available
+//
+list NoPixelShaders
+VertexShaderEnable 0 0
+RenderAvatarVP 0 0
+
+//
+// No Vertex Shaders available
+//
+list NoVertexShaders
+VertexShaderEnable 0 0
+RenderAvatarVP 0 0
+
+//
+// "Default" setups for safe, low, medium, high
+//
+list safe
+RenderVBO 1 0
+RenderAniso 1 0
+RenderAvatarVP 0 0
+RenderLighting 1 0
+RenderParticleCount 1 1024
+RenderTerrainDetail 1 0
+
+
+list low
+RenderVBO 1 0
+RenderAniso 1 0
+RenderLighting 1 0
+
+list medium
+RenderLighting 1 0
+
+
+//
+// CPU based feature masks
+//
+
+// 1Ghz or less (equiv)
+list CPUSlow
+RenderParticleCount 1 1024
+
+
+//
+// RAM based feature masks
+//
+list RAM256MB
+RenderObjectBump 0 0
+
+
+//
+// Graphics card based feature masks
+//
+list OpenGLPre15
+RenderVBO 1 0
+
+list Intel
+RenderVBO 1 0
+RenderAniso 1 0
+RenderLighting 1 0
+RenderTerrainDetail 1 0
+
+list GeForce2
+RenderVBO 1 1
+RenderAniso 1 0
+RenderLighting 1 0
+RenderParticleCount 1 2048
+RenderTerrainDetail 1 0
+
+list GeForce3
+
+list ATI
+
+list Radeon8500
+RenderLighting 1 0
+RenderParticleCount 1 4096
+
+// Hacked to be paranoid "safe"
+list Radeon9700
+RenderParticleCount 1 4096
+
+// Hacked to be paranoid "safe"
+list MobilityRadeon9000
+RenderLighting 1 0
+RenderParticleCount 1 4096
+
+list GeForceFX
diff --git a/indra/newview/licenses-solaris.txt b/indra/newview/licenses-solaris.txt
new file mode 100644
index 0000000000..a0dc048825
--- /dev/null
+++ b/indra/newview/licenses-solaris.txt
@@ -0,0 +1,516 @@
+===========
+APR License
+===========
+
+Copyright 2000-2004 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+==============
+Base32 License
+==============
+
+ * Copyright (c) 2006 Christian Biere <christianbiere@gmx.de>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the authors nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+
+==========
+Cg License
+==========
+
+Copyright (c) 2002, NVIDIA Corporation.
+
+
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
+of your agreement to the following terms, and your use, installation,
+modification or redistribution of this NVIDIA software constitutes
+acceptance of these terms. If you do not agree with these terms, please do
+not use, install, modify or redistribute this NVIDIA software.
+
+
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive license,
+under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
+Software"), to use, reproduce, modify and redistribute the NVIDIA
+Software, with or without modifications, in source and/or binary forms;
+provided that if you redistribute the NVIDIA Software, you must retain the
+copyright notice of NVIDIA, this notice and the following text and
+disclaimers in all such redistributions of the NVIDIA Software. Neither the
+name, trademarks, service marks nor logos of NVIDIA Corporation may be used
+to endorse or promote products derived from the NVIDIA Software without
+specific prior written permission from NVIDIA. Except as expressly stated
+in this notice, no other rights or licenses express or implied, are granted
+by NVIDIA herein, including but not limited to any patent rights that may be
+infringed by your derivative works or by other works in which the NVIDIA
+Software may be incorporated. No hardware is licensed hereunder.
+
+
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
+WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
+EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
+
+
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
+EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
+PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
+REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
+HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
+NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+============
+cURL License
+============
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2002, Daniel Stenberg, <daniel@haxx.se>.
+
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright
+notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+
+
+=============
+expat License
+=============
+
+Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+================
+FreeType License
+================
+
+Portions of this software are copyright (c) 2003 The FreeType
+Project (www.freetype.org). All rights reserved.
+
+==========================
+FSI FontShop International
+==========================
+
+Certain of the fonts in the Meta family of copyrighted typefaces are
+used in Second Life under license from FSI FontShop
+International. Copies of such Meta fonts that are included in the
+Viewer are not themselves open source and are not available under the
+GPL license, and they may not be copied. Developers may use those
+fonts solely to the extent necessary to use or customize the Linden
+Software in Second Life and to develop and distribute content solely
+for use in the Second Life environment, and for no other purposes.
+Second Life developers who wish to make other uses of Meta fonts must
+obtain a license from FSI FontShop International at www.fontfont.com.
+
+==========
+GL License
+==========
+
+Mesa 3-D graphics library
+Version: 6.2
+
+Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=======================
+JPEG Library 6b License
+=======================
+
+This software is based in part on the work of the Independent JPEG Group
+
+================
+JPEG2000 License
+================
+
+Copyright 2001, David Taubman, The University of New South Wales (UNSW)
+The copyright owner is Unisearch Ltd, Australia (commercial arm of UNSW)
+Neither this copyright statement, nor the licensing details below
+may be removed from this file or dissociated from its contents.
+
+Licensee: Linden Research, Inc.
+License number: 00024
+The licensee has been granted a COMMERCIAL license to the contents of
+this source file. A brief summary of this license appears below. This
+summary is not to be relied upon in preference to the full text of the
+license agreement, accepted at purchase of the license.
+1. The Licensee has the right to Commercial Use of the Kakadu software,
+ including distribution of one or more Applications built using the
+ software.
+2. The Licensee has the right to Internal Use of the Kakadu software,
+ including use by employees of the Licensee or an Affiliate for the
+ purpose of performing services on behalf of the Licensee or Affiliate,
+ or in the performance of services for Third Parties who engage Licensee
+ or an Affiliate for such services.
+3. The Licensee has the right to distribute Reusable Code (including
+ source code and dynamically or statically linked libraries) to a Third
+ Party, provided the Third Party possesses a license to use the Kakadu
+ software.
+
+==================
+ogg/vorbis License
+==================
+
+Copyright (c) 2001, Xiphophorus
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiphophorus nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+===========
+SDL License
+===========
+
+SDL - Simple DirectMedia Layer
+Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this library; if not, write to the Free
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Sam Lantinga
+slouken@libsdl.org
+
+The GNU Library GPL is available at http://www.gnu.org/copyleft/lesser.html
+
+=============
+ELFIO License
+=============
+
+ELFIO.h - ELF reader and producer.
+Copyright (C) 2001 Serge Lamikhov-Center <to_serge@users.sourceforge.net>
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+The GNU Library GPL is available at http://www.gnu.org/copyleft/lesser.html
+
+===============
+OpenSSL License
+===============
+
+Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. All advertising materials mentioning features or use of this
+ software must display the following acknowledgment:
+ "This product includes software developed by the OpenSSL Project
+ for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+
+4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ openssl-core@openssl.org.
+
+5. Products derived from this software may not be called "OpenSSL"
+ nor may "OpenSSL" appear in their names without prior written
+ permission of the OpenSSL Project.
+
+6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes software developed by the OpenSSL Project
+ for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+
+THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+====================================================================
+
+This product includes cryptographic software written by Eric Young
+(eay@cryptsoft.com). This product includes software written by Tim
+Hudson (tjh@cryptsoft.com).
+
+
+
+=======================
+Original SSLeay License
+=======================
+
+Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+All rights reserved.
+
+This package is an SSL implementation written
+by Eric Young (eay@cryptsoft.com).
+The implementation was written so as to conform with Netscapes SSL.
+
+This library is free for commercial and non-commercial use as long as
+the following conditions are aheared to. The following conditions
+apply to all code found in this distribution, be it the RC4, RSA,
+lhash, DES, etc., code; not just the SSL code. The SSL documentation
+included with this distribution is covered by the same copyright terms
+except that the holder is Tim Hudson (tjh@cryptsoft.com).
+
+Copyright remains Eric Young's, and as such any Copyright notices in
+the code are not to be removed.
+If this package is used in a product, Eric Young should be given attribution
+as the author of the parts of the library used.
+This can be in the form of a textual message at program startup or
+in documentation (online or textual) provided with the package.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ "This product includes cryptographic software written by
+ Eric Young (eay@cryptsoft.com)"
+ The word 'cryptographic' can be left out if the rouines from the library
+ being used are not cryptographic related :-).
+4. If you include any Windows specific code (or a derivative thereof) from
+ the apps directory (application code) you must include an acknowledgement:
+ "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+
+THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+The licence and distribution terms for any publically available version or
+derivative of this code cannot be changed. i.e. this code cannot simply be
+copied and put under another distribution licence
+[including the GNU Public Licence.]
+
+
+==================
+xmlrpc-epi License
+==================
+
+Copyright 2000 Epinions, Inc.
+
+Subject to the following 3 conditions, Epinions, Inc. permits you, free of charge, to (a) use, copy, distribute, modify, perform and display this software and associated documentation files (the "Software"), and (b) permit others to whom the Software is furnished to do so as well.
+
+1) The above copyright notice and this permission notice shall be included without modification in all copies or substantial portions of the Software.
+
+2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+
+3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH DAMAGES.
+
+
+===============
+libuuid License
+===============
+
+Copyright (C) 1999, 2000, 2003, 2004 by Theodore Ts'o
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, and the entire permission notice in its entirety,
+ including the disclaimer of warranties.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+
+============
+zlib License
+============
+
+'zlib' general purpose compression library version 1.1.4, March 11th, 2002
+
+Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the
+use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+The origin of this software must not be misrepresented; you must not claim
+that you wrote the original software. If you use this software in a product,
+an acknowledgment in the product documentation would be appreciated but is
+not required.
+
+Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+
+This notice may not be removed or altered from any source distribution.
+
+Jean-loup Gailly
+jloup@gzip.org
+
+Mark Adler
+madler@alumni.caltech.edu
diff --git a/indra/newview/lldrawpoolsky.h b/indra/newview/lldrawpoolsky.h
index 88d1ce03d0..b08075b3bf 100644
--- a/indra/newview/lldrawpoolsky.h
+++ b/indra/newview/lldrawpoolsky.h
@@ -37,7 +37,7 @@ public:
/*virtual*/ void render(S32 pass = 0);
/*virtual*/ void renderForSelect();
void setSkyTex(LLSkyTex* const st) { mSkyTex = st; }
- void setSun(LLHeavenBody* sun) { mHB[0] = sun; }
+ void setSun(LLHeavenBody* sun_flag) { mHB[0] = sun_flag; }
void setMoon(LLHeavenBody* moon) { mHB[1] = moon; }
void renderSkyCubeFace(U8 side);
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index fd66d58851..bc35c167ea 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -575,7 +575,7 @@ void LLDrawPoolWater::shade()
glUniform1fARB(gWaterProgram.mUniform[LLShaderMgr::WATER_TIME], sTime);
glUniform3fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_SPECULAR], 1, light_diffuse.mV);
glUniform1fARB(gWaterProgram.mUniform[LLShaderMgr::WATER_SPECULAR_EXP], light_exp);
- glUniform3fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_EYEVEC], 1, gCamera->getOrigin().mV);
+ glUniform3fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_EYEVEC], 1, (GLfloat *)(gCamera->getOrigin().mV));
glUniform2fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_WAVE_DIR1], 1, d1.mV);
glUniform2fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_WAVE_DIR2], 1, d2.mV);
glUniform3fvARB(gWaterProgram.mUniform[LLShaderMgr::WATER_LIGHT_DIR], 1, light_dir.mV);
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 2b58e2b4c3..35849552b3 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -42,6 +42,8 @@ extern void write_debug(const std::string& str);
const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt";
#elif LL_LINUX
const char FEATURE_TABLE_FILENAME[] = "featuretable_linux.txt";
+#elif LL_SOLARIS
+const char FEATURE_TABLE_FILENAME[] = "featuretable_solaris.txt";
#else
const char FEATURE_TABLE_FILENAME[] = "featuretable.txt";
#endif
@@ -385,7 +387,12 @@ void LLFeatureManager::initCPUFeatureMasks()
maskFeatures("RAM256MB");
}
+#if LL_SOLARIS && defined(__sparc) // even low MHz SPARCs are fast
+#error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here?
+ if (gSysCPU.getMhz() < 800)
+#else
if (gSysCPU.getMhz() < 1100)
+#endif
{
maskFeatures("CPUSlow");
}
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index d50c54b938..79e3315115 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -4645,7 +4645,7 @@ void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
BOOL LLInventoryFilter::isSinceLogoff()
{
- return mFilterOps.mMinDate == mLastLogoff && mFilterOps.mMaxDate == U32_MAX;
+ return (mFilterOps.mMinDate == mLastLogoff) && (mFilterOps.mMaxDate == U32_MAX);
}
void LLInventoryFilter::setHoursAgo(U32 hours)
@@ -4946,28 +4946,48 @@ void LLInventoryFilter::toLLSD(LLSD& data)
data["permissions"] = (LLSD::Integer)getFilterPermissions();
data["substring"] = (LLSD::String)getFilterSubString();
data["sort_order"] = (LLSD::Integer)getSortOrder();
+ data["since_logoff"] = (LLSD::Boolean)isSinceLogoff();
}
void LLInventoryFilter::fromLLSD(LLSD& data)
{
if(data.has("filter_types"))
+ {
setFilterTypes((U32)data["filter_types"].asInteger());
+ }
if(data.has("min_date") && data.has("max_date"))
+ {
setDateRange((U32)data["min_date"].asInteger(), (U32)data["max_date"].asInteger());
+ }
if(data.has("hours_ago"))
+ {
setHoursAgo((U32)data["hours_ago"].asInteger());
+ }
if(data.has("show_folder_state"))
+ {
setShowFolderState((EFolderShow)data["show_folder_state"].asInteger());
+ }
if(data.has("permissions"))
+ {
setFilterPermissions((PermissionMask)data["permissions"].asInteger());
+ }
if(data.has("substring"))
+ {
setFilterSubString(LLString(data["substring"].asString()));
+ }
if(data.has("sort_order"))
+ {
setSortOrder((U32)data["sort_order"].asInteger());
+ }
+
+ if(data.has("since_logoff"))
+ {
+ setDateRangeLastLogoff((bool)data["since_logoff"].asBoolean());
+ }
}
diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp
index 31e6318d25..b3e51de317 100644
--- a/indra/newview/llhudmanager.cpp
+++ b/indra/newview/llhudmanager.cpp
@@ -30,7 +30,6 @@ LLColor4 LLHUDManager::sChildColor;
LLHUDManager::LLHUDManager()
{
- mShowPhysical = FALSE;
LLHUDManager::sParentColor = gColors.getColor("FocusColor");
// rdw commented out since it's not used. Also removed from colors_base.xml
@@ -39,110 +38,10 @@ LLHUDManager::LLHUDManager()
LLHUDManager::~LLHUDManager()
{
- mHUDJoints.reset();
- mHUDSelectedJoints.reset();
mHUDEffects.reset();
}
-void LLHUDManager::toggleShowPhysical(const BOOL show_physical)
-{
- if (show_physical == mShowPhysical)
- {
- return;
- }
-
- mShowPhysical = show_physical;
- if (show_physical)
- {
- S32 i;
- for (i = 0; i < gObjectList.getNumObjects(); i++)
- {
- LLViewerObject *vobjp = gObjectList.getObject(i);
-
- if (vobjp && vobjp->isJointChild() && vobjp->getParent())
- {
- LLHUDConnector *connectorp = (LLHUDConnector *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_CONNECTOR);
- connectorp->setTargets(vobjp, (LLViewerObject *)vobjp->getParent());
- connectorp->setColors(LLColor4(1.f, 1.f, 1.f, 1.f), sChildColor, sParentColor);
- EHavokJointType joint_type = vobjp->getJointType();
- if (HJT_HINGE == joint_type)
- {
- connectorp->setLabel("Hinge");
- }
- else if (HJT_POINT == joint_type)
- {
- connectorp->setLabel("P2P");
- }
-#if 0
- else if (HJT_LPOINT == joint_type)
- {
- connectorp->setLabel("LP2P");
- }
-#endif
-#if 0
- else if (HJT_WHEEL == joint_type)
- {
- connectorp->setLabel("Wheel");
- }
-#endif
- mHUDJoints.put(connectorp);
- }
- }
- }
- else
- {
- mHUDJoints.reset();
- }
-}
-
-void LLHUDManager::showJoints(LLDynamicArray < LLViewerObject* > *object_list)
-{
- for (S32 i=0; i<object_list->count(); i++)
- {
- LLViewerObject *vobjp = object_list->get(i);
- if (vobjp && vobjp->isJointChild() && vobjp->getParent())
- {
- LLHUDConnector *connectorp = (LLHUDConnector *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_CONNECTOR);
- connectorp->setTargets(vobjp, (LLViewerObject *)vobjp->getParent());
- connectorp->setColors(LLColor4(1.f, 1.f, 1.f, 1.f), sChildColor, sParentColor);
-
- EHavokJointType joint_type = vobjp->getJointType();
- if (HJT_HINGE == joint_type)
- {
- connectorp->setLabel("Hinge");
- }
- else if (HJT_POINT == joint_type)
- {
- connectorp->setLabel("P2P");
- }
-#if 0
- else if (HJT_LPOINT == joint_type)
- {
- connectorp->setLabel("LP2P");
- }
-#endif
-#if 0
- else if (HJT_WHEEL == joint_type)
- {
- connectorp->setLabel("Wheel");
- }
-#endif
- mHUDSelectedJoints.put(connectorp);
- }
- }
-}
-
-void LLHUDManager::clearJoints()
-{
- mHUDSelectedJoints.reset();
-}
-
-BOOL LLHUDManager::getShowPhysical() const
-{
- return mShowPhysical;
-}
-
void LLHUDManager::updateEffects()
{
LLFastTimer ftm(LLFastTimer::FTM_HUD_EFFECTS);
diff --git a/indra/newview/llhudmanager.h b/indra/newview/llhudmanager.h
index 4cb22a2477..dd519554f9 100644
--- a/indra/newview/llhudmanager.h
+++ b/indra/newview/llhudmanager.h
@@ -30,11 +30,6 @@ public:
LLHUDManager();
~LLHUDManager();
- void toggleShowPhysical(const BOOL show_physical);
- void showJoints(LLDynamicArray < LLViewerObject* > *object_list);
- void clearJoints();
- BOOL getShowPhysical() const;
-
LLHUDEffect *createViewerEffect(const U8 type, BOOL send_to_sim = TRUE, BOOL originated_here = TRUE);
void updateEffects();
@@ -47,12 +42,7 @@ public:
static LLColor4 sChildColor;
protected:
- LLDynamicArrayPtr<LLPointer<LLHUDObject> > mHUDJoints;
- LLDynamicArrayPtr<LLPointer<LLHUDObject> > mHUDSelectedJoints;
LLDynamicArrayPtr<LLPointer<LLHUDEffect> > mHUDEffects;
-
- // ALT held down this frame?
- BOOL mShowPhysical;
};
extern LLHUDManager *gHUDManager;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 336da9ac79..5a6cbb045d 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -536,11 +536,11 @@ void LLIMView::removeSession(const LLUUID& session_id)
mFloaters.erase(floater->getHandle());
mTalkFloater->removeFloater(floater);
//mTabContainer->removeTabPanel(floater);
- }
-
- if ( session_id.notNull() && floater->getDialogType() != IM_NOTHING_SPECIAL )
- {
- mSessionsDropRequested[session_id.asString()] = LLSD();
+ if(session_id.notNull()
+ && (floater->getDialogType() != IM_NOTHING_SPECIAL))
+ {
+ mSessionsDropRequested[session_id.asString()] = LLSD();
+ }
}
}
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 125e1d211f..1e3be7c23f 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -258,7 +258,10 @@ BOOL LLPolyMeshSharedData::loadMesh( const char *fileName )
// Read a chunk
//-------------------------------------------------------------------------
char header[128]; /*Flawfinder: ignore*/
- fread(header, sizeof(char), 128, fp);
+ if (fread(header, sizeof(char), 128, fp) != 128)
+ {
+ llwarns << "Short read" << llendl;
+ }
//-------------------------------------------------------------------------
// Check for proper binary header
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 9c9c5a9582..2d4a6d11d9 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1322,7 +1322,10 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename,
LLString line;
while(!feof(fp))
{
- fgets(buffer, MAX_STRING, fp);
+ if (fgets(buffer, MAX_STRING, fp) == NULL)
+ {
+ buffer[0] = '\0';
+ }
if(feof(fp))
{
break;
@@ -1829,12 +1832,16 @@ void LLLiveLSLEditor::loadScriptText(const char* filename)
{
// read in the whole file
fseek(file, 0L, SEEK_END);
- S32 file_length = ftell(file);
+ long file_length = ftell(file);
fseek(file, 0L, SEEK_SET);
char* buffer = new char[file_length+1];
- fread(buffer, file_length, 1, file);
+ size_t nread = fread(buffer, 1, file_length, file);
+ if (nread < (size_t) file_length)
+ {
+ llwarns << "Short read" << llendl;
+ }
+ buffer[nread] = '\0';
fclose(file);
- buffer[file_length] = 0;
mScriptEd->mEditor->setText(buffer);
mScriptEd->mEditor->makePristine();
delete[] buffer;
@@ -2105,7 +2112,10 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename,
while(!feof(fp))
{
- fgets(buffer, MAX_STRING, fp);
+ if (fgets(buffer, MAX_STRING, fp) == NULL)
+ {
+ buffer[0] = '\0';
+ }
if(feof(fp))
{
break;
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 54ac03a3c5..341dec4115 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3460,7 +3460,6 @@ void LLSelectMgr::deselectAll()
mLastSentSelectionCenterGlobal.clearVec();
updatePointAt();
- gHUDManager->clearJoints();
updateSelectionCenter();
}
@@ -5497,7 +5496,7 @@ void LLSelectMgr::updateSelectionCenter()
// have stuff selected
LLVector3d select_center;
// keep a list of jointed objects for showing the joint HUDEffects
- gHUDManager->clearJoints();
+
LLDynamicArray < LLViewerObject *> jointed_objects;
for (object = mSelectedObjects->getFirstObject(); object; object = mSelectedObjects->getNextObject() )
@@ -5523,10 +5522,6 @@ void LLSelectMgr::updateSelectionCenter()
mSelectionCenterGlobal = gAgent.getPosGlobalFromAgent(bbox_center_agent);
mSelectionBBox = bbox;
- if (jointed_objects.count())
- {
- gHUDManager->showJoints(&jointed_objects);
- }
}
if ( !(gAgentID == LLUUID::null) && gToolMgr)
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 6d939ad3e9..ab735c97ad 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1139,12 +1139,13 @@ BOOL idle_startup()
emsg << "Unable to connect to " << gSecondLife << ".\n";
emsg << gUserAuthp->errorMessage();
} else {
+ auth_uri_num++;
std::ostringstream s;
- s << "Logging in (attempt " << (auth_uri_num + 1) << "). ";
+ s << "Previous login attempt failed. Logging in, attempt "
+ << (auth_uri_num + 1) << ". ";
auth_desc = s.str();
gStartupState = STATE_LOGIN_AUTHENTICATE;
auth_uri_num++;
- auth_uri_num++;
return do_normal_idle;
}
break;
@@ -2482,7 +2483,10 @@ void save_password_to_disk(const char* hashed_password)
LLXORCipher cipher(gMACAddress, 6);
cipher.encrypt(buffer, HASHED_LENGTH);
- fwrite(buffer, HASHED_LENGTH, 1, fp);
+ if (fwrite(buffer, HASHED_LENGTH, 1, fp) != 1)
+ {
+ llwarns << "Short write" << llendl;
+ }
fclose(fp);
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 959af911b7..ad977a4c46 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -440,7 +440,11 @@ bool LLViewerInventoryCategory::importFileLocal(FILE* fp)
valuestr[0] = '\0';
while(!feof(fp))
{
- fgets(buffer, MAX_STRING, fp);
+ if (fgets(buffer, MAX_STRING, fp) == NULL)
+ {
+ buffer[0] = '\0';
+ }
+
sscanf( /* Flawfinder: ignore */
buffer, " %254s %254s", keyword, valuestr);
if(0 == strcmp("{",keyword))
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 923d574499..7ba2208958 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -38,8 +38,7 @@
#include "m3math.h"
#include "m4math.h"
-
-#if !LL_DARWIN && !LL_LINUX
+#if !LL_DARWIN && !LL_LINUX && !LL_SOLARIS
extern PFNGLWEIGHTPOINTERARBPROC glWeightPointerARB;
extern PFNGLWEIGHTFVARBPROC glWeightfvARB;
extern PFNGLVERTEXBLENDARBPROC glVertexBlendARB;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 12ebca3b82..3e097d5600 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2538,7 +2538,7 @@ void load_url_local_file(const char* file_name)
gAgent.changeCameraToDefault();
}
-#if LL_DARWIN || LL_LINUX
+#if LL_DARWIN || LL_LINUX || LL_SOLARIS
// MBW -- If the Mac client is in fullscreen mode, it needs to go windowed so the browser will be visible.
if(gViewerWindow->mWindow->getFullscreen())
{
@@ -7300,22 +7300,66 @@ class LLViewToggleBeacon : public view_listener_t
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLString beacon = userdata.asString();
- if (beacon == "scripts")
+ if (beacon == "scriptsbeacon")
{
LLPipeline::toggleRenderScriptedBeacons(NULL);
+ gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) );
+ // toggle the other one off if it's on
+ if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL))
+ {
+ LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
+ gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) );
+ }
}
- else if (beacon == "physical")
+ else if (beacon == "physicalbeacon")
{
LLPipeline::toggleRenderPhysicalBeacons(NULL);
+ gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) );
}
- else if (beacon == "sounds")
+ else if (beacon == "soundsbeacon")
{
LLPipeline::toggleRenderSoundBeacons(NULL);
+ gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons(NULL) );
}
- else if (beacon == "particles")
+ else if (beacon == "particlesbeacon")
{
LLPipeline::toggleRenderParticleBeacons(NULL);
+ gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons(NULL) );
+ }
+ else if (beacon == "scripttouchbeacon")
+ {
+ LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
+ gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) );
+ // toggle the other one off if it's on
+ if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL))
+ {
+ LLPipeline::toggleRenderScriptedBeacons(NULL);
+ gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) );
+ }
}
+ else if (beacon == "renderbeacons")
+ {
+ LLPipeline::toggleRenderBeacons(NULL);
+ gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) );
+ // toggle the other one on if it's not
+ if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL))
+ {
+ LLPipeline::toggleRenderHighlights(NULL);
+ gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) );
+ }
+ }
+ else if (beacon == "renderhighlights")
+ {
+ LLPipeline::toggleRenderHighlights(NULL);
+ gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) );
+ // toggle the other one on if it's not
+ if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL))
+ {
+ LLPipeline::toggleRenderBeacons(NULL);
+ gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) );
+ }
+ }
+
return true;
}
};
@@ -7326,21 +7370,40 @@ class LLViewCheckBeaconEnabled : public view_listener_t
{
LLString beacon = userdata["data"].asString();
bool new_value = false;
- if (beacon == "scripts")
+ if (beacon == "scriptsbeacon")
+ {
+ new_value = gSavedSettings.getBOOL( "scriptsbeacon");
+ LLPipeline::setRenderScriptedBeacons(new_value);
+ }
+ else if (beacon == "physicalbeacon")
+ {
+ new_value = gSavedSettings.getBOOL( "physicalbeacon");
+ LLPipeline::setRenderPhysicalBeacons(new_value);
+ }
+ else if (beacon == "soundsbeacon")
+ {
+ new_value = gSavedSettings.getBOOL( "soundsbeacon");
+ LLPipeline::setRenderSoundBeacons(new_value);
+ }
+ else if (beacon == "particlesbeacon")
{
- new_value = LLPipeline::getRenderScriptedBeacons(NULL);
+ new_value = gSavedSettings.getBOOL( "particlesbeacon");
+ LLPipeline::setRenderParticleBeacons(new_value);
}
- else if (beacon == "physical")
+ else if (beacon == "scripttouchbeacon")
{
- new_value = LLPipeline::getRenderPhysicalBeacons(NULL);
+ new_value = gSavedSettings.getBOOL( "scripttouchbeacon");
+ LLPipeline::setRenderScriptedTouchBeacons(new_value);
}
- else if (beacon == "sounds")
+ else if (beacon == "renderbeacons")
{
- new_value = LLPipeline::getRenderSoundBeacons(NULL);
+ new_value = gSavedSettings.getBOOL( "renderbeacons");
+ LLPipeline::setRenderBeacons(new_value);
}
- else if (beacon == "particles")
+ else if (beacon == "renderhighlights")
{
- new_value = LLPipeline::getRenderParticleBeacons(NULL);
+ new_value = gSavedSettings.getBOOL( "renderhighlights");
+ LLPipeline::setRenderHighlights(new_value);
}
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
return true;
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 44f5cbb9db..0038c0cf1c 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -671,7 +671,10 @@ void upload_new_resource(const LLString& src_filename, std::string name,
S16 type_num;
// read in and throw out most of the header except for the type
- fread(buf, header_size, 1, in);
+ if (fread(buf, header_size, 1, in) != 1)
+ {
+ llwarns << "Short read" << llendl;
+ }
memcpy(&type_num, buf + 16, sizeof(S16)); /* Flawfinder: ignore */
asset_type = (LLAssetType::EType)type_num;
}
@@ -682,7 +685,10 @@ void upload_new_resource(const LLString& src_filename, std::string name,
{
while((read = fread(buf, 1, 16384, in))) /* Flawfinder: ignore */
{
- fwrite(buf, 1, read, out); /* Flawfinder: ignore */
+ if (fwrite(buf, 1, read, out) != read)
+ {
+ llwarns << "Short write" << llendl;
+ }
}
fclose(out);
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3ee72b3d17..6a9b5a8031 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -322,10 +322,15 @@ void export_complete()
FILE* fXML = LLFile::fopen(gExportedFile.c_str(), "rb"); /* Flawfinder: ignore */
fseek(fXML, 0, SEEK_END);
- U32 length = ftell(fXML);
+ long length = ftell(fXML);
fseek(fXML, 0, SEEK_SET);
- U8 *buffer = new U8[length];
- fread(buffer, 1, length, fXML);
+ U8 *buffer = new U8[length + 1];
+ size_t nread = fread(buffer, 1, length, fXML);
+ if (nread < (size_t) length)
+ {
+ llwarns << "Short read" << llendl;
+ }
+ buffer[nread] = '\0';
fclose(fXML);
char *pos = (char *)buffer;
@@ -361,7 +366,10 @@ void export_complete()
}
FILE* fXMLOut = LLFile::fopen(gExportedFile.c_str(), "wb"); /* Flawfinder: ignore */
- fwrite(buffer, 1, length, fXMLOut);
+ if (fwrite(buffer, 1, length, fXMLOut) != length)
+ {
+ llwarns << "Short write" << llendl;
+ }
fclose(fXMLOut);
delete [] buffer;
@@ -423,7 +431,10 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
S32 length = ftell(fIn);
fseek(fIn, 0, SEEK_SET);
U8 *buffer = ImageUtility->allocateData(length);
- fread(buffer, 1, length, fIn);
+ if (fread(buffer, 1, length, fIn) != length)
+ {
+ llwarns << "Short read" << llendl;
+ }
fclose(fIn);
LLFile::remove(filename.c_str());
@@ -450,7 +461,10 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
strcpy(md5_hash_string, "00000000000000000000000000000000"); /* Flawfinder: ignore */
if (fOut)
{
- fwrite(data, 1, data_size, fOut);
+ if (fwrite(data, 1, data_size, fOut) != data_size)
+ {
+ llwarns << "Short write" << llendl;
+ }
fseek(fOut, 0, SEEK_SET);
fclose(fOut);
fOut = LLFile::fopen(output_file.c_str(), "rb"); /* Flawfinder: ignore */
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 223286b1c9..4040a6d21b 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -182,8 +182,9 @@ void LLViewerRegion::loadCache()
}
U32 zero;
- fread(&zero, 1, sizeof(U32), fp);
- if (zero)
+ size_t nread;
+ nread = fread(&zero, sizeof(U32), 1, fp);
+ if (nread != 1 || zero)
{
// a non-zero value here means bad things!
// skip reading the cached values
@@ -193,8 +194,8 @@ void LLViewerRegion::loadCache()
}
U32 version;
- fread(&version, 1, sizeof(U32), fp);
- if (version != INDRA_OBJECT_CACHE_VERSION)
+ nread = fread(&version, sizeof(U32), 1, fp);
+ if (nread != 1 || version != INDRA_OBJECT_CACHE_VERSION)
{
// a version mismatch here means we've changed the binary format!
// skip reading the cached values
@@ -204,8 +205,8 @@ void LLViewerRegion::loadCache()
}
LLUUID cache_id;
- fread(&cache_id.mData, UUID_BYTES, sizeof(U8), fp);
- if (mCacheID != cache_id)
+ nread = fread(&cache_id.mData, 1, UUID_BYTES, fp);
+ if (nread != UUID_BYTES || mCacheID != cache_id)
{
llinfos << "Cache ID doesn't match for this region, discarding"
<< llendl;
@@ -214,7 +215,14 @@ void LLViewerRegion::loadCache()
}
S32 num_entries;
- fread(&num_entries, 1, sizeof(S32), fp);
+ nread = fread(&num_entries, sizeof(S32), 1, fp);
+ if (nread != 1)
+ {
+ llinfos << "Short read, discarding" << llendl;
+ fclose(fp);
+ return;
+ }
+
S32 i;
for (i = 0; i < num_entries; i++)
{
@@ -264,16 +272,28 @@ void LLViewerRegion::saveCache()
// write out zero to indicate a version cache file
U32 zero = 0;
- fwrite(&zero, 1, sizeof(U32), fp);
+ if (fwrite(&zero, sizeof(U32), 1, fp) != 1)
+ {
+ llwarns << "Short write" << llendl;
+ }
// write out version number
U32 version = INDRA_OBJECT_CACHE_VERSION;
- fwrite(&version, 1, sizeof(U32), fp);
+ if (fwrite(&version, sizeof(U32), 1, fp) != 1)
+ {
+ llwarns << "Short write" << llendl;
+ }
// write the cache id for this sim
- fwrite(&mCacheID.mData, UUID_BYTES, sizeof(U8), fp);
+ if (fwrite(&mCacheID.mData, 1, UUID_BYTES, fp) != UUID_BYTES)
+ {
+ llwarns << "Short write" << llendl;
+ }
- fwrite(&num_entries, 1, sizeof(S32), fp);
+ if (fwrite(&num_entries, sizeof(S32), 1, fp) != 1)
+ {
+ llwarns << "Short write" << llendl;
+ }
LLVOCacheEntry *entry;
@@ -643,14 +663,7 @@ void LLViewerRegion::calculateCenterGlobal()
mCenterGlobal = mOriginGlobal;
mCenterGlobal.mdV[VX] += 0.5 * mWidth;
mCenterGlobal.mdV[VY] += 0.5 * mWidth;
- if (mLandp)
- {
- mCenterGlobal.mdV[VZ] = 0.5*mLandp->getMinZ() + mLandp->getMaxZ();
- }
- else
- {
- mCenterGlobal.mdV[VZ] = F64( getWaterHeight() );
- }
+ mCenterGlobal.mdV[VZ] = 0.5*mLandp->getMinZ() + mLandp->getMaxZ();
}
void LLViewerRegion::calculateCameraDistance()
@@ -773,13 +786,23 @@ F32 LLViewerRegion::getLandHeightRegion(const LLVector3& region_pos)
BOOL LLViewerRegion::isOwnedSelf(const LLVector3& pos)
{
- return mParcelOverlay->isOwnedSelf(pos);
+ if (mParcelOverlay)
+ {
+ return mParcelOverlay->isOwnedSelf(pos);
+ } else {
+ return FALSE;
+ }
}
// Owned by a group you belong to? (officer or member)
BOOL LLViewerRegion::isOwnedGroup(const LLVector3& pos)
{
- return mParcelOverlay->isOwnedGroup(pos);
+ if (mParcelOverlay)
+ {
+ return mParcelOverlay->isOwnedGroup(pos);
+ } else {
+ return FALSE;
+ }
}
void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index d04dda9109..d6b5534153 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -207,7 +207,9 @@ BOOL gPickTransparent = TRUE;
BOOL gDebugFastUIRender = FALSE;
BOOL gbCapturing = FALSE;
+#if !LL_SOLARIS
MovieMaker gMovieMaker;
+#endif
S32 CHAT_BAR_HEIGHT = 28;
S32 OVERLAY_BAR_HEIGHT = 20;
@@ -495,30 +497,40 @@ public:
ypos += y_inc;
}
- if (LLPipeline::getRenderParticleBeacons(NULL))
- {
- addText(xpos, ypos, "Viewing particle beacons (blue)");
- ypos += y_inc;
- }
- if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES))
+ // only display these messages if we are actually rendering beacons at this moment
+ if (LLPipeline::getRenderBeacons(NULL) && LLPipeline::getProcessBeacons(NULL))
{
- addText(xpos, ypos, "Hiding particles");
- ypos += y_inc;
- }
- if (LLPipeline::getRenderPhysicalBeacons(NULL))
- {
- addText(xpos, ypos, "Viewing physical object beacons (green)");
- ypos += y_inc;
- }
- if (LLPipeline::getRenderScriptedBeacons(NULL))
- {
- addText(xpos, ypos, "Viewing scripted object beacons (red)");
- ypos += y_inc;
- }
- if (LLPipeline::getRenderSoundBeacons(NULL))
- {
- addText(xpos, ypos, "Viewing sound beacons (yellow)");
- ypos += y_inc;
+ if (LLPipeline::getRenderParticleBeacons(NULL))
+ {
+ addText(xpos, ypos, "Viewing particle beacons (blue)");
+ ypos += y_inc;
+ }
+ if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES))
+ {
+ addText(xpos, ypos, "Hiding particles");
+ ypos += y_inc;
+ }
+ if (LLPipeline::getRenderPhysicalBeacons(NULL))
+ {
+ addText(xpos, ypos, "Viewing physical object beacons (green)");
+ ypos += y_inc;
+ }
+ if (LLPipeline::getRenderScriptedBeacons(NULL))
+ {
+ addText(xpos, ypos, "Viewing scripted object beacons (red)");
+ ypos += y_inc;
+ }
+ else
+ if (LLPipeline::getRenderScriptedTouchBeacons(NULL))
+ {
+ addText(xpos, ypos, "Viewing scripted object with touch function beacons (red)");
+ ypos += y_inc;
+ }
+ if (LLPipeline::getRenderSoundBeacons(NULL))
+ {
+ addText(xpos, ypos, "Viewing sound beacons (yellow)");
+ ypos += y_inc;
+ }
}
}
@@ -1445,8 +1457,8 @@ LLViewerWindow::LLViewerWindow(
if (NULL == mWindow)
{
LLSplashScreen::update("Shutting down...");
-#if LL_LINUX
- llwarns << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt for further information."
+#if LL_LINUX || LL_SOLARIS
+ llwarns << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt or README-solaris.txt for further information."
<< llendl;
#else
llwarns << "Unable to create window, be sure screen is set at 32-bit color in Control Panels->Display->Settings"
@@ -2685,16 +2697,29 @@ BOOL LLViewerWindow::handlePerFrameHover()
}
}
+ gPipeline.sRenderProcessBeacons = FALSE;
+ KEY key = gKeyboard->currentKey();
+ if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || (gFloaterTools && gFloaterTools->getVisible()) || gSavedSettings.getBOOL("BeaconAlwaysOn"))
+ {
+ gPipeline.sRenderProcessBeacons = TRUE;
+ }
+
+/*
// Show joints while in edit mode and hold down alt key.
if (gHUDManager)
{
- if (gSavedSettings.getBOOL("AltShowsPhysical")
+ BOOL menuOption = gSavedSettings.getBOOL("AltShowsPhysical");
+ if (menuOption
|| (gFloaterTools && gFloaterTools->getVisible()))
{
gHUDManager->toggleShowPhysical( mask & MASK_ALT );
}
+ else
+ {
+ gHUDManager->toggleShowPhysical( FALSE );
+ }
}
-
+*/
BOOL handled = FALSE;
BOOL handled_by_top_ctrl = FALSE;
@@ -4125,11 +4150,15 @@ void LLViewerWindow::saveMovieNumbered(void*)
S32 y = gViewerWindow->getWindowHeight();
gbCapturing = TRUE;
+#if !LL_SOLARIS
gMovieMaker.StartCapture((char *)filepath.c_str(), x, y);
+#endif
}
else
{
+#if !LL_SOLARIS
gMovieMaker.EndCapture();
+#endif
gbCapturing = FALSE;
}
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 12149ecf77..1af8efaf79 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4798,7 +4798,6 @@ LLJoint *LLVOAvatar::getCharacterJoint( U32 num )
return (LLJoint*)&mSkeleton[num];
}
-
//-----------------------------------------------------------------------------
// requestStopMotion()
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 611f5ddab0..2b70933eea 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -40,16 +40,25 @@ LLVOCacheEntry::LLVOCacheEntry()
}
+static inline void checkedRead(FILE *fp, void *data, size_t nbytes)
+{
+ if (fread(data, 1, nbytes, fp) != nbytes)
+ {
+ llwarns << "Short read" << llendl;
+ memset(data, 0, nbytes);
+ }
+}
+
LLVOCacheEntry::LLVOCacheEntry(FILE *fp)
{
S32 size;
- fread(&mLocalID, 1, sizeof(U32), fp);
- fread(&mCRC, 1, sizeof(U32), fp);
- fread(&mHitCount, 1, sizeof(S32), fp);
- fread(&mDupeCount, 1, sizeof(S32), fp);
- fread(&mCRCChangeCount, 1, sizeof(S32), fp);
+ checkedRead(fp, &mLocalID, sizeof(U32));
+ checkedRead(fp, &mCRC, sizeof(U32));
+ checkedRead(fp, &mHitCount, sizeof(S32));
+ checkedRead(fp, &mDupeCount, sizeof(S32));
+ checkedRead(fp, &mCRCChangeCount, sizeof(S32));
- fread(&size, 1, sizeof(S32), fp);
+ checkedRead(fp, &size, sizeof(S32));
// Corruption in the cache entries
if ((size > 10000) || (size < 1))
@@ -65,7 +74,7 @@ LLVOCacheEntry::LLVOCacheEntry(FILE *fp)
}
mBuffer = new U8[size];
- fread(mBuffer, 1, size, fp);
+ checkedRead(fp, mBuffer, size);
mDP.assignBuffer(mBuffer, size);
}
@@ -121,14 +130,22 @@ void LLVOCacheEntry::dump() const
<< llendl;
}
+static inline void checkedWrite(FILE *fp, const void *data, size_t nbytes)
+{
+ if (fwrite(data, 1, nbytes, fp) != nbytes)
+ {
+ llwarns << "Short write" << llendl;
+ }
+}
+
void LLVOCacheEntry::writeToFile(FILE *fp) const
{
- fwrite(&mLocalID, 1, sizeof(U32), fp);
- fwrite(&mCRC, 1, sizeof(U32), fp);
- fwrite(&mHitCount, 1, sizeof(S32), fp);
- fwrite(&mDupeCount, 1, sizeof(S32), fp);
- fwrite(&mCRCChangeCount, 1, sizeof(S32), fp);
+ checkedWrite(fp, &mLocalID, sizeof(U32));
+ checkedWrite(fp, &mCRC, sizeof(U32));
+ checkedWrite(fp, &mHitCount, sizeof(S32));
+ checkedWrite(fp, &mDupeCount, sizeof(S32));
+ checkedWrite(fp, &mCRCChangeCount, sizeof(S32));
S32 size = mDP.getBufferSize();
- fwrite(&size, 1, sizeof(S32), fp);
- fwrite(mBuffer, 1, size, fp);
+ checkedWrite(fp, &size, sizeof(S32));
+ checkedWrite(fp, mBuffer, size);
}
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index fc1d8f1711..8e8ae815d5 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -419,7 +419,8 @@ void LLVOGrass::getGeometry(S32 idx,
LLStrider<U32>& indicesp)
{
mPatch = mRegionp->getLand().resolvePatchRegion(getPositionRegion());
- mLastPatchUpdateTime = mPatch->getLastUpdateTime();
+ if (mPatch)
+ mLastPatchUpdateTime = mPatch->getLastUpdateTime();
LLVector3 position;
// Create random blades of grass with gaussian distribution
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index aa4c6f0086..b8a06f4816 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -1386,17 +1386,17 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
const F32 camera_height = mCameraPosAgent.mV[2];
const F32 height_above_water = camera_height - water_height;
- BOOL sun = FALSE;
+ BOOL sun_flag = FALSE;
if (mSun.isVisible())
{
if (mMoon.isVisible())
{
- sun = look_at * mSun.getDirection() > 0;
+ sun_flag = look_at * mSun.getDirection() > 0;
}
else
{
- sun = TRUE;
+ sun_flag = TRUE;
}
}
@@ -1407,7 +1407,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
#else
BOOL render_ref = !(gPipeline.getVertexShaderLevel(LLPipeline::SHADER_ENVIRONMENT) >= LLDrawPoolWater::SHADER_LEVEL_RIPPLE);
#endif
- if (sun)
+ if (sun_flag)
{
setDrawRefl(0);
if (render_ref)
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 1f87cf225d..6ea9dfbbec 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -27,7 +27,9 @@ void LLWeb::loadURL(std::string url)
void LLWeb::loadURLExternal(std::string url)
{
std::string escaped_url = escapeURL(url);
+#if LL_LIBXUL_ENABLED
spawn_web_browser(escaped_url.c_str());
+#endif
}
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 294df75f2a..67e48e0f6b 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -220,6 +220,8 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
curl_easy_setopt(mCurl, CURLOPT_CAINFO, gDirUtilp->getCAFile().c_str());
curl_easy_setopt(mCurl, CURLOPT_SSL_VERIFYPEER, (long) gVerifySSLCert);
curl_easy_setopt(mCurl, CURLOPT_SSL_VERIFYHOST, gVerifySSLCert? 2L : 0L);
+ // Be a little impatient about establishing connections.
+ curl_easy_setopt(mCurl, CURLOPT_CONNECTTIMEOUT, 40L);
/* Setting the DNS cache timeout to -1 disables it completely.
This might help with bug #503 */
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d4d5cfc624..2858854a9a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -143,10 +143,14 @@ U32 nhpo2(U32 v)
S32 LLPipeline::sCompiles = 0;
BOOL LLPipeline::sShowHUDAttachments = TRUE;
-BOOL LLPipeline::sRenderPhysicalBeacons = FALSE;
+BOOL LLPipeline::sRenderPhysicalBeacons = TRUE;
BOOL LLPipeline::sRenderScriptedBeacons = FALSE;
+BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE;
BOOL LLPipeline::sRenderParticleBeacons = FALSE;
BOOL LLPipeline::sRenderSoundBeacons = FALSE;
+BOOL LLPipeline::sRenderBeacons = FALSE;
+BOOL LLPipeline::sRenderHighlight = TRUE;
+BOOL LLPipeline::sRenderProcessBeacons = FALSE;
BOOL LLPipeline::sUseOcclusion = FALSE;
BOOL LLPipeline::sSkipUpdate = FALSE;
BOOL LLPipeline::sDynamicReflections = FALSE;
@@ -356,14 +360,22 @@ void LLPipeline::releaseGLBuffers()
if (mCubeFrameBuffer)
{
+#if !defined(__sparc)
glDeleteFramebuffersEXT(1, &mCubeFrameBuffer);
glDeleteRenderbuffersEXT(1, &mCubeDepth);
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
mCubeDepth = mCubeFrameBuffer = 0;
}
if (mFramebuffer[0])
{
+#if !defined(__sparc)
glDeleteFramebuffersEXT(2, mFramebuffer);
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
mFramebuffer[0] = mFramebuffer[1] = 0;
}
}
@@ -1469,7 +1481,44 @@ void renderScriptedBeacons(LLDrawable* drawablep)
&& !vobj->getParent()
&& vobj->flagScripted())
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ if (gPipeline.sRenderBeacons)
+ {
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ }
+
+ if (gPipeline.sRenderHighlight)
+ {
+ S32 face_id;
+ for (face_id = 0; face_id < drawablep->getNumFaces(); face_id++)
+ {
+ gPipeline.mHighlightFaces.push_back(drawablep->getFace(face_id) );
+ }
+ }
+ }
+}
+
+void renderScriptedTouchBeacons(LLDrawable* drawablep)
+{
+ LLViewerObject *vobj = drawablep->getVObj();
+ if (vobj
+ && !vobj->isAvatar()
+ && !vobj->getParent()
+ && vobj->flagScripted()
+ && vobj->flagHandleTouch())
+ {
+ if (gPipeline.sRenderBeacons)
+ {
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ }
+
+ if (gPipeline.sRenderHighlight)
+ {
+ S32 face_id;
+ for (face_id = 0; face_id < drawablep->getNumFaces(); face_id++)
+ {
+ gPipeline.mHighlightFaces.push_back(drawablep->getFace(face_id) );
+ }
+ }
}
}
@@ -1481,7 +1530,19 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
&& !vobj->getParent()
&& vobj->usePhysics())
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ if (gPipeline.sRenderBeacons)
+ {
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ }
+
+ if (gPipeline.sRenderHighlight)
+ {
+ S32 face_id;
+ for (face_id = 0; face_id < drawablep->getNumFaces(); face_id++)
+ {
+ gPipeline.mHighlightFaces.push_back(drawablep->getFace(face_id) );
+ }
+ }
}
}
@@ -1492,20 +1553,13 @@ void renderParticleBeacons(LLDrawable* drawablep)
if (vobj
&& vobj->isParticleSource())
{
- LLColor4 light_blue(0.5f, 0.5f, 1.f, 0.5f);
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
- }
-}
+ if (gPipeline.sRenderBeacons)
+ {
+ LLColor4 light_blue(0.5f, 0.5f, 1.f, 0.5f);
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ }
-void LLPipeline::highlightPhysical(LLDrawable* drawablep)
-{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
- LLViewerObject *vobj;
- vobj = drawablep->getVObj();
- if (vobj && !vobj->isAvatar())
- {
- if (!vobj->isAvatar() &&
- (vobj->usePhysics() || vobj->flagHandleTouch()))
+ if (gPipeline.sRenderHighlight)
{
S32 face_id;
for (face_id = 0; face_id < drawablep->getNumFaces(); face_id++)
@@ -1679,42 +1733,49 @@ void LLPipeline::postSort(LLCamera& camera)
std::sort(mAlphaGroups.begin(), mAlphaGroups.end(), LLSpatialGroup::CompareDepthGreater());
std::sort(mAlphaGroupsPostWater.begin(), mAlphaGroupsPostWater.end(), LLSpatialGroup::CompareDepthGreater());
- if (sRenderScriptedBeacons)
+ // only render if the flag is set. The flag is only set if the right key is pressed, we are in edit mode or the toggle is set in the menus
+ if (sRenderProcessBeacons)
{
- // Only show the beacon on the root object.
- forAllVisibleDrawables(renderScriptedBeacons);
- }
-
- if (sRenderPhysicalBeacons)
- {
- // Only show the beacon on the root object.
- forAllVisibleDrawables(renderPhysicalBeacons);
- }
+ if (sRenderScriptedTouchBeacons)
+ {
+ // Only show the beacon on the root object.
+ forAllVisibleDrawables(renderScriptedTouchBeacons);
+ }
+ else
+ if (sRenderScriptedBeacons)
+ {
+ // Only show the beacon on the root object.
+ forAllVisibleDrawables(renderScriptedBeacons);
+ }
- if (sRenderParticleBeacons)
- {
- forAllVisibleDrawables(renderParticleBeacons);
- }
+ if (sRenderPhysicalBeacons)
+ {
+ // Only show the beacon on the root object.
+ forAllVisibleDrawables(renderPhysicalBeacons);
+ }
- // Draw physical objects in red.
- if (gHUDManager->getShowPhysical())
- {
- forAllVisibleDrawables(highlightPhysical);
- }
+ if (sRenderParticleBeacons)
+ {
+ forAllVisibleDrawables(renderParticleBeacons);
+ }
- // If god mode, also show audio cues
- if (sRenderSoundBeacons && gAudiop)
- {
- // Update all of our audio sources, clean up dead ones.
- LLAudioEngine::source_map::iterator iter;
- for (iter = gAudiop->mAllSources.begin(); iter != gAudiop->mAllSources.end(); ++iter)
+ // If god mode, also show audio cues
+ if (sRenderSoundBeacons && gAudiop)
{
- LLAudioSource *sourcep = iter->second;
+ // Update all of our audio sources, clean up dead ones.
+ LLAudioEngine::source_map::iterator iter;
+ for (iter = gAudiop->mAllSources.begin(); iter != gAudiop->mAllSources.end(); ++iter)
+ {
+ LLAudioSource *sourcep = iter->second;
- LLVector3d pos_global = sourcep->getPositionGlobal();
- LLVector3 pos = gAgent.getPosAgentFromGlobal(pos_global);
- //pos += LLVector3(0.f, 0.f, 0.2f);
- gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ LLVector3d pos_global = sourcep->getPositionGlobal();
+ LLVector3 pos = gAgent.getPosAgentFromGlobal(pos_global);
+ if (gPipeline.sRenderBeacons)
+ {
+ //pos += LLVector3(0.f, 0.f, 0.2f);
+ gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ }
+ }
}
}
@@ -3428,6 +3489,12 @@ BOOL LLPipeline::toggleRenderDebugFeatureControl(void* data)
}
// static
+void LLPipeline::setRenderScriptedBeacons(BOOL val)
+{
+ sRenderScriptedBeacons = val;
+}
+
+// static
void LLPipeline::toggleRenderScriptedBeacons(void*)
{
sRenderScriptedBeacons = !sRenderScriptedBeacons;
@@ -3440,6 +3507,30 @@ BOOL LLPipeline::getRenderScriptedBeacons(void*)
}
// static
+void LLPipeline::setRenderScriptedTouchBeacons(BOOL val)
+{
+ sRenderScriptedTouchBeacons = val;
+}
+
+// static
+void LLPipeline::toggleRenderScriptedTouchBeacons(void*)
+{
+ sRenderScriptedTouchBeacons = !sRenderScriptedTouchBeacons;
+}
+
+// static
+BOOL LLPipeline::getRenderScriptedTouchBeacons(void*)
+{
+ return sRenderScriptedTouchBeacons;
+}
+
+// static
+void LLPipeline::setRenderPhysicalBeacons(BOOL val)
+{
+ sRenderPhysicalBeacons = val;
+}
+
+// static
void LLPipeline::toggleRenderPhysicalBeacons(void*)
{
sRenderPhysicalBeacons = !sRenderPhysicalBeacons;
@@ -3452,6 +3543,12 @@ BOOL LLPipeline::getRenderPhysicalBeacons(void*)
}
// static
+void LLPipeline::setRenderParticleBeacons(BOOL val)
+{
+ sRenderParticleBeacons = val;
+}
+
+// static
void LLPipeline::toggleRenderParticleBeacons(void*)
{
sRenderParticleBeacons = !sRenderParticleBeacons;
@@ -3464,6 +3561,12 @@ BOOL LLPipeline::getRenderParticleBeacons(void*)
}
// static
+void LLPipeline::setRenderSoundBeacons(BOOL val)
+{
+ sRenderSoundBeacons = val;
+}
+
+// static
void LLPipeline::toggleRenderSoundBeacons(void*)
{
sRenderSoundBeacons = !sRenderSoundBeacons;
@@ -3475,6 +3578,48 @@ BOOL LLPipeline::getRenderSoundBeacons(void*)
return sRenderSoundBeacons;
}
+// static
+void LLPipeline::setRenderBeacons(BOOL val)
+{
+ sRenderBeacons = val;
+}
+
+// static
+void LLPipeline::toggleRenderBeacons(void*)
+{
+ sRenderBeacons = !sRenderBeacons;
+}
+
+// static
+BOOL LLPipeline::getRenderBeacons(void*)
+{
+ return sRenderBeacons;
+}
+
+// static
+void LLPipeline::setRenderHighlights(BOOL val)
+{
+ sRenderHighlight = val;
+}
+
+// static
+void LLPipeline::toggleRenderHighlights(void*)
+{
+ sRenderHighlight = !sRenderHighlight;
+}
+
+// static
+BOOL LLPipeline::getRenderHighlights(void*)
+{
+ return sRenderHighlight;
+}
+
+// static
+BOOL LLPipeline::getProcessBeacons(void* data)
+{
+ return sRenderProcessBeacons;
+}
+
LLViewerObject* LLPipeline::pickObject(const LLVector3 &start, const LLVector3 &end, LLVector3 &collision)
{
LLDrawable* drawable = mObjectPartition[PARTITION_VOLUME]->pickDrawable(start, end, collision);
@@ -3613,8 +3758,12 @@ void LLPipeline::generateReflectionMap(LLCubeMap* cube_map, LLCamera& cube_cam,
BOOL reattach = FALSE;
if (mCubeFrameBuffer == 0)
{
+#if !defined(__sparc)
glGenFramebuffersEXT(1, &mCubeFrameBuffer);
glGenRenderbuffersEXT(1, &mCubeDepth);
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
reattach = TRUE;
}
@@ -3685,6 +3834,7 @@ void LLPipeline::generateReflectionMap(LLCubeMap* cube_map, LLCamera& cube_cam,
if (reattach)
{
+#if !defined(__sparc)
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mCubeDepth);
GLint res_x, res_y;
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_WIDTH_EXT, &res_x);
@@ -3696,15 +3846,22 @@ void LLPipeline::generateReflectionMap(LLCubeMap* cube_map, LLCamera& cube_cam,
}
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
}
for (S32 i = 0; i < 6; i++)
{
+#if !defined(__sparc)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mCubeFrameBuffer);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
cube_face[i], cube_map->getGLName(), 0);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
GL_RENDERBUFFER_EXT, mCubeDepth);
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(90.f, 1.f, 0.1f, 1024.f);
@@ -3724,7 +3881,11 @@ void LLPipeline::generateReflectionMap(LLCubeMap* cube_map, LLCamera& cube_cam,
gPipeline.renderGeom(cube_cam);
}
+#if !defined(__sparc)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
cube_cam.setOrigin(origin);
gPipeline.resetDrawOrders();
@@ -3933,10 +4094,14 @@ void LLPipeline::renderBloom(GLuint source, GLuint dest, GLuint buffer, U32 res,
LLGLDisable blend(GL_BLEND);
LLGLDisable cull(GL_CULL_FACE);
+#if !defined(__sparc)
if (mFramebuffer[0] == 0)
{
glGenFramebuffersEXT(2, mFramebuffer);
}
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
@@ -3959,11 +4124,15 @@ void LLPipeline::renderBloom(GLuint source, GLuint dest, GLuint buffer, U32 res,
for (S32 i = 0; i < kernel; i++)
{
+#if !defined(__sparc)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFramebuffer[i%2]);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_2D,
i%2 == 0 ? buffer : dest, 0);
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
glBindTexture(GL_TEXTURE_2D, i == 0 ? source :
i%2==0 ? dest :
@@ -3990,7 +4159,11 @@ void LLPipeline::renderBloom(GLuint source, GLuint dest, GLuint buffer, U32 res,
}
+#if !defined(__sparc)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+#else
+#error Can we generalize this without a CPU architecture test?
+#endif
gGlowProgram.unbind();
glViewport(viewport[0], viewport[1], viewport[2], viewport[3]);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 390e139503..9a7336186c 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -134,7 +134,6 @@ public:
void postSort(LLCamera& camera);
void forAllDrawables(LLSpatialGroup::sg_vector_t& groups, void (*func)(LLDrawable*));
void forAllVisibleDrawables(void (*func)(LLDrawable*));
- static void highlightPhysical(LLDrawable* drawablep);
void renderObjects(U32 type, U32 mask, BOOL texture = TRUE);
@@ -187,18 +186,36 @@ public:
static BOOL toggleRenderDebugControl(void* data);
static BOOL toggleRenderDebugFeatureControl(void* data);
+ static void setRenderParticleBeacons(BOOL val);
static void toggleRenderParticleBeacons(void* data);
static BOOL getRenderParticleBeacons(void* data);
+ static void setRenderSoundBeacons(BOOL val);
static void toggleRenderSoundBeacons(void* data);
static BOOL getRenderSoundBeacons(void* data);
+ static void setRenderPhysicalBeacons(BOOL val);
static void toggleRenderPhysicalBeacons(void* data);
static BOOL getRenderPhysicalBeacons(void* data);
+ static void setRenderScriptedBeacons(BOOL val);
static void toggleRenderScriptedBeacons(void* data);
static BOOL getRenderScriptedBeacons(void* data);
+ static void setRenderScriptedTouchBeacons(BOOL val);
+ static void toggleRenderScriptedTouchBeacons(void* data);
+ static BOOL getRenderScriptedTouchBeacons(void* data);
+
+ static void setRenderBeacons(BOOL val);
+ static void toggleRenderBeacons(void* data);
+ static BOOL getRenderBeacons(void* data);
+
+ static void setRenderHighlights(BOOL val);
+ static void toggleRenderHighlights(void* data);
+ static BOOL getRenderHighlights(void* data);
+
+ static BOOL getProcessBeacons(void* data);
+
private:
void initShaders(BOOL force);
void unloadShaders();
@@ -474,8 +491,9 @@ protected:
LLDrawPool* mBumpPool;
// Note: no need to keep an quick-lookup to avatar pools, since there's only one per avatar
-
+public:
std::vector<LLFace*> mHighlightFaces; // highlight faces on physical objects
+protected:
std::vector<LLFace*> mSelectedFaces;
LLPointer<LLViewerImage> mFaceSelectImagep;
@@ -488,9 +506,14 @@ protected:
F32 mSunShadowFactor;
static BOOL sRenderPhysicalBeacons;
+ static BOOL sRenderScriptedTouchBeacons;
static BOOL sRenderScriptedBeacons;
static BOOL sRenderParticleBeacons;
static BOOL sRenderSoundBeacons;
+public:
+ static BOOL sRenderBeacons;
+ static BOOL sRenderHighlight;
+ static BOOL sRenderProcessBeacons;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);