summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2012-09-24 17:19:16 +0000
committerNyx Linden <nyx@lindenlab.com>2012-09-24 17:19:16 +0000
commit33099f4b7b55c166ba77a3e862573cd68ec4acef (patch)
tree07626f4aa5af7a99c7c34123e25687f09715ef00 /indra
parent93769c43e209b206ed06c1a812900e5e51473a74 (diff)
parentd3924200b6b8817461c0f10f87a643005466d4af (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/DirectX.cmake2
-rw-r--r--indra/llcommon/llfile.cpp6
-rw-r--r--indra/llcommon/llfile.h2
-rw-r--r--indra/llmessage/tests/llhttpclient_test.cpp84
-rw-r--r--indra/llmessage/tests/test_llsdmessage_peer.py326
-rw-r--r--indra/llrender/llgl.cpp63
-rw-r--r--indra/llrender/llgl.h1
-rwxr-xr-xindra/llrender/llimagegl.cpp2
-rw-r--r--indra/llwindow/llwindow.cpp34
-rw-r--r--indra/llwindow/llwindow.h1
-rw-r--r--indra/llwindow/llwindowheadless.cpp2
-rw-r--r--indra/llwindow/llwindowheadless.h2
-rw-r--r--indra/llwindow/llwindowmacosx.cpp3
-rw-r--r--indra/llwindow/llwindowmacosx.h2
-rw-r--r--indra/llwindow/llwindowmesaheadless.cpp29
-rw-r--r--indra/llwindow/llwindowmesaheadless.h2
-rw-r--r--indra/llwindow/llwindowsdl.cpp3
-rw-r--r--indra/llwindow/llwindowsdl.h2
-rw-r--r--indra/llwindow/llwindowwin32.cpp2
-rw-r--r--indra/llwindow/llwindowwin32.h2
-rw-r--r--indra/lscript/lscript_compile/CMakeLists.txt4
-rw-r--r--indra/lscript/lscript_compile/bison.bat9
-rw-r--r--indra/newview/llappviewer.cpp10
-rwxr-xr-xindra/newview/llstartup.cpp11
-rw-r--r--indra/newview/llviewerdisplay.cpp18
-rw-r--r--indra/newview/llviewerobjectlist.cpp1
-rwxr-xr-xindra/newview/llviewerwindow.cpp47
-rw-r--r--indra/newview/pipeline.cpp1
28 files changed, 249 insertions, 422 deletions
diff --git a/indra/cmake/DirectX.cmake b/indra/cmake/DirectX.cmake
index b2a18805d4..8cae606848 100644
--- a/indra/cmake/DirectX.cmake
+++ b/indra/cmake/DirectX.cmake
@@ -3,6 +3,7 @@
if (VIEWER AND WINDOWS)
find_path(DIRECTX_INCLUDE_DIR dxdiag.h
"$ENV{DXSDK_DIR}/Include"
+ "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include"
@@ -25,6 +26,7 @@ if (VIEWER AND WINDOWS)
find_path(DIRECTX_LIBRARY_DIR dxguid.lib
"$ENV{DXSDK_DIR}/Lib/x86"
+ "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86"
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index deab7a87fc..bc615ed39e 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -329,7 +329,7 @@ const char *LLFile::tmpdir()
#if LL_WINDOWS
LLFILE * LLFile::_Fiopen(const std::string& filename,
- std::ios::openmode mode,int) // protection currently unused
+ std::ios::openmode mode)
{ // open a file
static const char *mods[] =
{ // fopen mode strings corresponding to valid[i]
@@ -899,7 +899,7 @@ llifstream::llifstream(_Filet *_File,
}
#endif
-#if LL_WINDOWS
+#if !LL_WINDOWS
// explicit
llifstream::llifstream(int __fd,
ios_base::openmode _Mode, size_t _Size) :
@@ -1014,7 +1014,7 @@ llofstream::llofstream(_Filet *_File,
}
#endif
-#if LL_WINDOWS
+#if !LL_WINDOWS
// explicit
llofstream::llofstream(int __fd,
ios_base::openmode _Mode, size_t _Size) :
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 7049ab1396..9d70db96ea 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -38,7 +38,6 @@
typedef FILE LLFILE;
#include <fstream>
-#include <bits/postypes.h>
#include <sys/stat.h>
#if LL_WINDOWS
@@ -47,6 +46,7 @@ typedef struct _stat llstat;
#else
typedef struct stat llstat;
#include <ext/stdio_filebuf.h>
+#include <bits/postypes.h>
#endif
#ifndef S_ISREG
diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp
index e338d4ec71..4a9db7cd98 100644
--- a/indra/llmessage/tests/llhttpclient_test.cpp
+++ b/indra/llmessage/tests/llhttpclient_test.cpp
@@ -47,37 +47,6 @@
namespace tut
{
- LLSD storage;
-
- class LLSDStorageNode : public LLHTTPNode
- {
- public:
- LLSD simpleGet() const { return storage; }
- LLSD simplePut(const LLSD& value) const { storage = value; return LLSD(); }
- };
-
- class ErrorNode : public LLHTTPNode
- {
- public:
- void get(ResponsePtr r, const LLSD& context) const
- { r->status(599, "Intentional error"); }
- void post(ResponsePtr r, const LLSD& context, const LLSD& input) const
- { r->status(input["status"], input["reason"]); }
- };
-
- class TimeOutNode : public LLHTTPNode
- {
- public:
- void get(ResponsePtr r, const LLSD& context) const
- {
- /* do nothing, the request will eventually time out */
- }
- };
-
- LLHTTPRegistration<LLSDStorageNode> gStorageNode("/test/storage");
- LLHTTPRegistration<ErrorNode> gErrorNode("/test/error");
- LLHTTPRegistration<TimeOutNode> gTimeOutNode("/test/timeout");
-
struct HTTPClientTestData
{
public:
@@ -86,7 +55,6 @@ namespace tut
{
apr_pool_create(&mPool, NULL);
LLCurl::initClass(false);
- mServerPump = new LLPumpIO(mPool);
mClientPump = new LLPumpIO(mPool);
LLHTTPClient::setPump(*mClientPump);
@@ -94,20 +62,11 @@ namespace tut
~HTTPClientTestData()
{
- delete mServerPump;
delete mClientPump;
LLProxy::cleanupClass();
apr_pool_destroy(mPool);
}
- void setupTheServer()
- {
- LLHTTPNode& root = LLIOHTTPServer::create(mPool, *mServerPump, 8888);
-
- LLHTTPStandardServices::useServices();
- LLHTTPRegistrar::buildAllServices(root);
- }
-
void runThePump(float timeout = 100.0f)
{
LLTimer timer;
@@ -115,11 +74,7 @@ namespace tut
while(!mSawCompleted && !mSawCompletedHeader && !timer.hasExpired())
{
- if (mServerPump)
- {
- mServerPump->pump();
- mServerPump->callback();
- }
+ LLFrameTimer::updateFrameTime();
if (mClientPump)
{
mClientPump->pump();
@@ -128,17 +83,10 @@ namespace tut
}
}
- void killServer()
- {
- delete mServerPump;
- mServerPump = NULL;
- }
-
const std::string local_server;
private:
apr_pool_t* mPool;
- LLPumpIO* mServerPump;
LLPumpIO* mClientPump;
protected:
@@ -283,14 +231,12 @@ namespace tut
sd["list"][1]["three"] = 3;
sd["list"][1]["four"] = 4;
- setupTheServer();
-
- LLHTTPClient::post("http://localhost:8888/web/echo", sd, newResult());
+ LLHTTPClient::post(local_server + "web/echo", sd, newResult());
runThePump();
ensureStatusOK();
ensure_equals("echoed result matches", getResult(), sd);
}
-
+
template<> template<>
void HTTPClientTestObject::test<4>()
{
@@ -298,12 +244,11 @@ namespace tut
sd["message"] = "This is my test message.";
- setupTheServer();
- LLHTTPClient::put("http://localhost:8888/test/storage", sd, newResult());
+ LLHTTPClient::put(local_server + "test/storage", sd, newResult());
runThePump();
ensureStatusOK();
- LLHTTPClient::get("http://localhost:8888/test/storage", newResult());
+ LLHTTPClient::get(local_server + "test/storage", newResult());
runThePump();
ensureStatusOK();
ensure_equals("echoed result matches", getResult(), sd);
@@ -317,9 +262,7 @@ namespace tut
sd["status"] = 543;
sd["reason"] = "error for testing";
- setupTheServer();
-
- LLHTTPClient::post("http://localhost:8888/test/error", sd, newResult());
+ LLHTTPClient::post(local_server + "test/error", sd, newResult());
runThePump();
ensureStatusError();
ensure_contains("reason", mReason, sd["reason"]);
@@ -328,23 +271,16 @@ namespace tut
template<> template<>
void HTTPClientTestObject::test<6>()
{
- setupTheServer();
-
- LLHTTPClient::get("http://localhost:8888/test/timeout", newResult());
- runThePump(1.0f);
- killServer();
- runThePump();
+ const F32 timeout = 1.0f;
+ LLHTTPClient::get(local_server + "test/timeout", newResult(), LLSD(), timeout);
+ runThePump(timeout * 5.0f);
ensureStatusError();
- ensure_equals("reason", mReason, "STATUS_ERROR");
+ ensure_equals("reason", mReason, "STATUS_EXPIRED");
}
template<> template<>
void HTTPClientTestObject::test<7>()
{
- // Can not use the little mini server. The blocking request
- // won't ever let it run. Instead get from a known LLSD
- // source and compare results with the non-blocking get which
- // is tested against the mini server earlier.
LLHTTPClient::get(local_server, newResult());
runThePump();
ensureStatusOK();
diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py
index fe4f3a8c01..b59c5a06cd 100644
--- a/indra/llmessage/tests/test_llsdmessage_peer.py
+++ b/indra/llmessage/tests/test_llsdmessage_peer.py
@@ -1,153 +1,173 @@
-#!/usr/bin/env python
-"""\
-@file test_llsdmessage_peer.py
-@author Nat Goodspeed
-@date 2008-10-09
-@brief This script asynchronously runs the executable (with args) specified on
- the command line, returning its result code. While that executable is
- running, we provide dummy local services for use by C++ tests.
-
-$LicenseInfo:firstyear=2008&license=viewerlgpl$
-Second Life Viewer Source Code
-Copyright (C) 2010, Linden Research, Inc.
-
-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;
-version 2.1 of the License only.
-
-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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-$/LicenseInfo$
-"""
-
-import os
-import sys
-from threading import Thread
-from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
-
-mydir = os.path.dirname(__file__) # expected to be .../indra/llmessage/tests/
-sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python"))
-from indra.util.fastest_elementtree import parse as xml_parse
-from indra.base import llsd
-from testrunner import freeport, run, debug, VERBOSE
-
-class TestHTTPRequestHandler(BaseHTTPRequestHandler):
- """This subclass of BaseHTTPRequestHandler is to receive and echo
- LLSD-flavored messages sent by the C++ LLHTTPClient.
- """
- def read(self):
- # The following logic is adapted from the library module
- # SimpleXMLRPCServer.py.
- # Get arguments by reading body of request.
- # We read this in chunks to avoid straining
- # socket.read(); around the 10 or 15Mb mark, some platforms
- # begin to have problems (bug #792570).
- try:
- size_remaining = int(self.headers["content-length"])
- except (KeyError, ValueError):
- return ""
- max_chunk_size = 10*1024*1024
- L = []
- while size_remaining:
- chunk_size = min(size_remaining, max_chunk_size)
- chunk = self.rfile.read(chunk_size)
- L.append(chunk)
- size_remaining -= len(chunk)
- return ''.join(L)
- # end of swiped read() logic
-
- def read_xml(self):
- # This approach reads the entire POST data into memory first
- return llsd.parse(self.read())
-## # This approach attempts to stream in the LLSD XML from self.rfile,
-## # assuming that the underlying XML parser reads its input file
-## # incrementally. Unfortunately I haven't been able to make it work.
-## tree = xml_parse(self.rfile)
-## debug("Finished raw parse")
-## debug("parsed XML tree %s", tree)
-## debug("parsed root node %s", tree.getroot())
-## debug("root node tag %s", tree.getroot().tag)
-## return llsd.to_python(tree.getroot())
-
- def do_HEAD(self):
- self.do_GET(withdata=False)
-
- def do_GET(self, withdata=True):
- # Of course, don't attempt to read data.
- data = dict(reply="success", body="avatar", random=17)
- self.answer(data, withdata=withdata)
-
- def do_POST(self):
- # Read the provided POST data.
- self.answer(self.read_xml())
-
- def answer(self, data, withdata=True):
- debug("%s.answer(%s): self.path = %r", self.__class__.__name__, data, self.path)
- if "fail" not in self.path:
- data = data.copy() # we're going to modify
- # Ensure there's a "reply" key in data, even if there wasn't before
- data["reply"] = data.get("reply", llsd.LLSD("success"))
- response = llsd.format_xml(data)
- debug("success: %s", response)
- self.send_response(200)
- self.send_header("Content-type", "application/llsd+xml")
- self.send_header("Content-Length", str(len(response)))
- self.end_headers()
- if withdata:
- self.wfile.write(response)
- else: # fail requested
- status = data.get("status", 500)
- # self.responses maps an int status to a (short, long) pair of
- # strings. We want the longer string. That's why we pass a string
- # pair to get(): the [1] will select the second string, whether it
- # came from self.responses or from our default pair.
- reason = data.get("reason",
- self.responses.get(status,
- ("fail requested",
- "Your request specified failure status %s "
- "without providing a reason" % status))[1])
- debug("fail requested: %s: %r", status, reason)
- self.send_error(status, reason)
-
- if not VERBOSE:
- # When VERBOSE is set, skip both these overrides because they exist to
- # suppress output.
-
- def log_request(self, code, size=None):
- # For present purposes, we don't want the request splattered onto
- # stderr, as it would upset devs watching the test run
- pass
-
- def log_error(self, format, *args):
- # Suppress error output as well
- pass
-
-class Server(HTTPServer):
- # This pernicious flag is on by default in HTTPServer. But proper
- # operation of freeport() absolutely depends on it being off.
- allow_reuse_address = False
-
-if __name__ == "__main__":
- # Instantiate a Server(TestHTTPRequestHandler) on the first free port
- # in the specified port range. Doing this inline is better than in a
- # daemon thread: if it blows up here, we'll get a traceback. If it blew up
- # in some other thread, the traceback would get eaten and we'd run the
- # subject test program anyway.
- httpd, port = freeport(xrange(8000, 8020),
- lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler))
- # Pass the selected port number to the subject test program via the
- # environment. We don't want to impose requirements on the test program's
- # command-line parsing -- and anyway, for C++ integration tests, that's
- # performed in TUT code rather than our own.
- os.environ["PORT"] = str(port)
- debug("$PORT = %s", port)
- sys.exit(run(server=Thread(name="httpd", target=httpd.serve_forever), *sys.argv[1:]))
+#!/usr/bin/env python
+"""\
+@file test_llsdmessage_peer.py
+@author Nat Goodspeed
+@date 2008-10-09
+@brief This script asynchronously runs the executable (with args) specified on
+ the command line, returning its result code. While that executable is
+ running, we provide dummy local services for use by C++ tests.
+
+$LicenseInfo:firstyear=2008&license=viewerlgpl$
+Second Life Viewer Source Code
+Copyright (C) 2010, Linden Research, Inc.
+
+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;
+version 2.1 of the License only.
+
+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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+$/LicenseInfo$
+"""
+
+import os
+import sys
+from threading import Thread
+from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
+
+mydir = os.path.dirname(__file__) # expected to be .../indra/llmessage/tests/
+sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python"))
+from indra.util.fastest_elementtree import parse as xml_parse
+from indra.base import llsd
+from testrunner import freeport, run, debug, VERBOSE
+import time
+
+_storage=None
+
+class TestHTTPRequestHandler(BaseHTTPRequestHandler):
+ """This subclass of BaseHTTPRequestHandler is to receive and echo
+ LLSD-flavored messages sent by the C++ LLHTTPClient.
+ """
+ def read(self):
+ # The following logic is adapted from the library module
+ # SimpleXMLRPCServer.py.
+ # Get arguments by reading body of request.
+ # We read this in chunks to avoid straining
+ # socket.read(); around the 10 or 15Mb mark, some platforms
+ # begin to have problems (bug #792570).
+ try:
+ size_remaining = int(self.headers["content-length"])
+ except (KeyError, ValueError):
+ return ""
+ max_chunk_size = 10*1024*1024
+ L = []
+ while size_remaining:
+ chunk_size = min(size_remaining, max_chunk_size)
+ chunk = self.rfile.read(chunk_size)
+ L.append(chunk)
+ size_remaining -= len(chunk)
+ return ''.join(L)
+ # end of swiped read() logic
+
+ def read_xml(self):
+ # This approach reads the entire POST data into memory first
+ return llsd.parse(self.read())
+## # This approach attempts to stream in the LLSD XML from self.rfile,
+## # assuming that the underlying XML parser reads its input file
+## # incrementally. Unfortunately I haven't been able to make it work.
+## tree = xml_parse(self.rfile)
+## debug("Finished raw parse")
+## debug("parsed XML tree %s", tree)
+## debug("parsed root node %s", tree.getroot())
+## debug("root node tag %s", tree.getroot().tag)
+## return llsd.to_python(tree.getroot())
+
+ def do_HEAD(self):
+ self.do_GET(withdata=False)
+
+ def do_GET(self, withdata=True):
+ # Of course, don't attempt to read data.
+ data = dict(reply="success", body="avatar", random=17)
+ self.answer(data, withdata=withdata)
+
+ def do_POST(self):
+ # Read the provided POST data.
+ self.answer(self.read_xml())
+
+ def do_PUT(self):
+ # Read the provided PUT data.
+ self.answer(self.read_xml())
+
+ def answer(self, data, withdata=True):
+ global _storage
+ debug("%s.answer(%s): self.path = %r", self.__class__.__name__, data, self.path)
+ if "fail" in self.path or "test/error" in self.path: # fail requested
+ status = data.get("status", 500)
+ # self.responses maps an int status to a (short, long) pair of
+ # strings. We want the longer string. That's why we pass a string
+ # pair to get(): the [1] will select the second string, whether it
+ # came from self.responses or from our default pair.
+ reason = data.get("reason",
+ self.responses.get(status,
+ ("fail requested",
+ "Your request specified failure status %s "
+ "without providing a reason" % status))[1])
+ debug("fail requested: %s: %r", status, reason)
+ self.send_error(status, reason)
+ else:
+ if "web/echo" in self.path:
+ pass
+ elif "test/timeout" in self.path:
+ time.sleep(5.0)
+ return
+ elif "test/storage" in self.path:
+ if "GET" == self.command:
+ data = _storage
+ else:
+ _storage = data
+ data = "ok"
+ else:
+ data = data.copy() # we're going to modify
+ # Ensure there's a "reply" key in data, even if there wasn't before
+ data["reply"] = data.get("reply", llsd.LLSD("success"))
+ response = llsd.format_xml(data)
+ debug("success: %s", response)
+ self.send_response(200)
+ self.send_header("Content-type", "application/llsd+xml")
+ self.send_header("Content-Length", str(len(response)))
+ self.end_headers()
+ if withdata:
+ self.wfile.write(response)
+
+ if not VERBOSE:
+ # When VERBOSE is set, skip both these overrides because they exist to
+ # suppress output.
+
+ def log_request(self, code, size=None):
+ # For present purposes, we don't want the request splattered onto
+ # stderr, as it would upset devs watching the test run
+ pass
+
+ def log_error(self, format, *args):
+ # Suppress error output as well
+ pass
+
+class Server(HTTPServer):
+ # This pernicious flag is on by default in HTTPServer. But proper
+ # operation of freeport() absolutely depends on it being off.
+ allow_reuse_address = False
+
+if __name__ == "__main__":
+ # Instantiate a Server(TestHTTPRequestHandler) on the first free port
+ # in the specified port range. Doing this inline is better than in a
+ # daemon thread: if it blows up here, we'll get a traceback. If it blew up
+ # in some other thread, the traceback would get eaten and we'd run the
+ # subject test program anyway.
+ httpd, port = freeport(xrange(8000, 8020),
+ lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler))
+ # Pass the selected port number to the subject test program via the
+ # environment. We don't want to impose requirements on the test program's
+ # command-line parsing -- and anyway, for C++ integration tests, that's
+ # performed in TUT code rather than our own.
+ os.environ["PORT"] = str(port)
+ debug("$PORT = %s", port)
+ sys.exit(run(server=Thread(name="httpd", target=httpd.serve_forever), *sys.argv[1:]))
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 27d8056ea2..a53c3ca9b7 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -58,13 +58,8 @@
BOOL gDebugSession = FALSE;
BOOL gDebugGL = FALSE;
BOOL gClothRipple = FALSE;
-BOOL gHeadlessClient = FALSE;
BOOL gGLActive = FALSE;
-static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
-static const std::string HEADLESS_RENDERER_STRING("Headless");
-static const std::string HEADLESS_VERSION_STRING("1.0");
-
std::ofstream gFailLog;
#if GL_ARB_debug_output
@@ -188,6 +183,9 @@ PFNGLWAITSYNCPROC glWaitSync = NULL;
PFNGLGETINTEGER64VPROC glGetInteger64v = NULL;
PFNGLGETSYNCIVPROC glGetSynciv = NULL;
+// GL_APPLE_flush_buffer_range
+PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE = NULL;
+PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE = NULL;
// vertex object prototypes
PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI = NULL;
@@ -786,19 +784,9 @@ void LLGLManager::setToDebugGPU()
void LLGLManager::getGLInfo(LLSD& info)
{
- if (gHeadlessClient)
- {
- info["GLInfo"]["GLVendor"] = HEADLESS_VENDOR_STRING;
- info["GLInfo"]["GLRenderer"] = HEADLESS_RENDERER_STRING;
- info["GLInfo"]["GLVersion"] = HEADLESS_VERSION_STRING;
- return;
- }
- else
- {
- info["GLInfo"]["GLVendor"] = std::string((const char *)glGetString(GL_VENDOR));
- info["GLInfo"]["GLRenderer"] = std::string((const char *)glGetString(GL_RENDERER));
- info["GLInfo"]["GLVersion"] = std::string((const char *)glGetString(GL_VERSION));
- }
+ info["GLInfo"]["GLVendor"] = std::string((const char *)glGetString(GL_VENDOR));
+ info["GLInfo"]["GLRenderer"] = std::string((const char *)glGetString(GL_RENDERER));
+ info["GLInfo"]["GLVersion"] = std::string((const char *)glGetString(GL_VERSION));
#if !LL_MESA_HEADLESS
std::string all_exts = ll_safe_string((const char *)gGLHExts.mSysExts);
@@ -815,18 +803,9 @@ std::string LLGLManager::getGLInfoString()
{
std::string info_str;
- if (gHeadlessClient)
- {
- info_str += std::string("GL_VENDOR ") + HEADLESS_VENDOR_STRING + std::string("\n");
- info_str += std::string("GL_RENDERER ") + HEADLESS_RENDERER_STRING + std::string("\n");
- info_str += std::string("GL_VERSION ") + HEADLESS_VERSION_STRING + std::string("\n");
- }
- else
- {
- info_str += std::string("GL_VENDOR ") + ll_safe_string((const char *)glGetString(GL_VENDOR)) + std::string("\n");
- info_str += std::string("GL_RENDERER ") + ll_safe_string((const char *)glGetString(GL_RENDERER)) + std::string("\n");
- info_str += std::string("GL_VERSION ") + ll_safe_string((const char *)glGetString(GL_VERSION)) + std::string("\n");
- }
+ info_str += std::string("GL_VENDOR ") + ll_safe_string((const char *)glGetString(GL_VENDOR)) + std::string("\n");
+ info_str += std::string("GL_RENDERER ") + ll_safe_string((const char *)glGetString(GL_RENDERER)) + std::string("\n");
+ info_str += std::string("GL_VERSION ") + ll_safe_string((const char *)glGetString(GL_VERSION)) + std::string("\n");
#if !LL_MESA_HEADLESS
std::string all_exts= ll_safe_string(((const char *)gGLHExts.mSysExts));
@@ -839,18 +818,9 @@ std::string LLGLManager::getGLInfoString()
void LLGLManager::printGLInfoString()
{
- if (gHeadlessClient)
- {
- LL_INFOS("RenderInit") << "GL_VENDOR: " << HEADLESS_VENDOR_STRING << LL_ENDL;
- LL_INFOS("RenderInit") << "GL_RENDERER: " << HEADLESS_RENDERER_STRING << LL_ENDL;
- LL_INFOS("RenderInit") << "GL_VERSION: " << HEADLESS_VERSION_STRING << LL_ENDL;
- }
- else
- {
- LL_INFOS("RenderInit") << "GL_VENDOR: " << ((const char *)glGetString(GL_VENDOR)) << LL_ENDL;
- LL_INFOS("RenderInit") << "GL_RENDERER: " << ((const char *)glGetString(GL_RENDERER)) << LL_ENDL;
- LL_INFOS("RenderInit") << "GL_VERSION: " << ((const char *)glGetString(GL_VERSION)) << LL_ENDL;
- }
+ LL_INFOS("RenderInit") << "GL_VENDOR: " << ((const char *)glGetString(GL_VENDOR)) << LL_ENDL;
+ LL_INFOS("RenderInit") << "GL_RENDERER: " << ((const char *)glGetString(GL_RENDERER)) << LL_ENDL;
+ LL_INFOS("RenderInit") << "GL_VERSION: " << ((const char *)glGetString(GL_VERSION)) << LL_ENDL;
#if !LL_MESA_HEADLESS
std::string all_exts= ll_safe_string(((const char *)gGLHExts.mSysExts));
@@ -862,14 +832,7 @@ void LLGLManager::printGLInfoString()
std::string LLGLManager::getRawGLString()
{
std::string gl_string;
- if (gHeadlessClient)
- {
- gl_string = HEADLESS_VENDOR_STRING + " " + HEADLESS_RENDERER_STRING;
- }
- else
- {
- gl_string = ll_safe_string((char*)glGetString(GL_VENDOR)) + " " + ll_safe_string((char*)glGetString(GL_RENDERER));
- }
+ gl_string = ll_safe_string((char*)glGetString(GL_VENDOR)) + " " + ll_safe_string((char*)glGetString(GL_RENDERER));
return gl_string;
}
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 964495a3ab..d77c3ede06 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -453,7 +453,6 @@ void init_glstates();
void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor_specific, std::string* version_string );
extern BOOL gClothRipple;
-extern BOOL gHeadlessClient;
extern BOOL gGLActive;
// Deal with changing glext.h definitions for newer SDK versions, specifically
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index a4d7872ec2..d561f63544 100755
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1222,7 +1222,6 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
//the texture is assiciate with some image by calling glTexImage outside LLImageGL
BOOL LLImageGL::createGLTexture()
{
- if (gHeadlessClient) return FALSE;
if (gGLManager.mIsDisabled)
{
llwarns << "Trying to create a texture while GL is disabled!" << llendl;
@@ -1252,7 +1251,6 @@ BOOL LLImageGL::createGLTexture()
BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, BOOL to_create, S32 category)
{
- if (gHeadlessClient) return FALSE;
if (gGLManager.mIsDisabled)
{
llwarns << "Trying to create a texture while GL is disabled!" << llendl;
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index d83278d875..9e4ad310c7 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -388,38 +388,28 @@ LLWindow* LLWindowManager::createWindow(
BOOL fullscreen,
BOOL clearBg,
BOOL disable_vsync,
- BOOL use_gl,
BOOL ignore_pixel_depth,
U32 fsaa_samples)
{
LLWindow* new_window;
- if (use_gl)
- {
#if LL_MESA_HEADLESS
- new_window = new LLWindowMesaHeadless(callbacks,
- title, name, x, y, width, height, flags,
- fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth);
+ new_window = new LLWindowMesaHeadless(callbacks,
+ title, name, x, y, width, height, flags,
+ fullscreen, clearBg, disable_vsync, ignore_pixel_depth);
#elif LL_SDL
- new_window = new LLWindowSDL(callbacks,
- title, x, y, width, height, flags,
- fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
+ new_window = new LLWindowSDL(callbacks,
+ title, x, y, width, height, flags,
+ fullscreen, clearBg, disable_vsync, ignore_pixel_depth, fsaa_samples);
#elif LL_WINDOWS
- new_window = new LLWindowWin32(callbacks,
- title, name, x, y, width, height, flags,
- fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
+ new_window = new LLWindowWin32(callbacks,
+ title, name, x, y, width, height, flags,
+ fullscreen, clearBg, disable_vsync, ignore_pixel_depth, fsaa_samples);
#elif LL_DARWIN
- new_window = new LLWindowMacOSX(callbacks,
- title, name, x, y, width, height, flags,
- fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
+ new_window = new LLWindowMacOSX(callbacks,
+ title, name, x, y, width, height, flags,
+ fullscreen, clearBg, disable_vsync, ignore_pixel_depth, fsaa_samples);
#endif
- }
- else
- {
- new_window = new LLWindowHeadless(callbacks,
- title, name, x, y, width, height, flags,
- fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth);
- }
if (FALSE == new_window->isValid())
{
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 4da87f4e06..e92b0fd387 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -265,7 +265,6 @@ public:
BOOL fullscreen = FALSE,
BOOL clearBg = FALSE,
BOOL disable_vsync = TRUE,
- BOOL use_gl = TRUE,
BOOL ignore_pixel_depth = FALSE,
U32 fsaa_samples = 0);
static BOOL destroyWindow(LLWindow* window);
diff --git a/indra/llwindow/llwindowheadless.cpp b/indra/llwindow/llwindowheadless.cpp
index e6e6bc67ff..dbdb40f5b9 100644
--- a/indra/llwindow/llwindowheadless.cpp
+++ b/indra/llwindow/llwindowheadless.cpp
@@ -35,7 +35,7 @@
//
LLWindowHeadless::LLWindowHeadless(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clear_background,
- BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
+ BOOL disable_vsync, BOOL ignore_pixel_depth)
: LLWindow(callbacks, fullscreen, flags)
{
// Initialize a headless keyboard.
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index 1f767f4c97..72f9684ca3 100644
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -96,7 +96,7 @@ public:
S32 x, S32 y,
S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clear_background,
- BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
+ BOOL disable_vsync, BOOL ignore_pixel_depth);
virtual ~LLWindowHeadless();
private:
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 97637c937f..413a9df616 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -210,7 +210,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
- BOOL disable_vsync, BOOL use_gl,
+ BOOL disable_vsync,
BOOL ignore_pixel_depth,
U32 fsaa_samples)
: LLWindow(NULL, fullscreen, flags)
@@ -228,7 +228,6 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
gKeyboard = new LLKeyboardMacOSX();
gKeyboard->setCallbacks(callbacks);
- // Ignore use_gl for now, only used for drones on PC
mWindow = NULL;
mContext = NULL;
mPixelFormat = NULL;
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 52ba8b3bf3..4484787a4e 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -122,7 +122,7 @@ public:
protected:
LLWindowMacOSX(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
- BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
+ BOOL fullscreen, BOOL clearBg, BOOL disable_vsync,
BOOL ignore_pixel_depth,
U32 fsaa_samples);
~LLWindowMacOSX();
diff --git a/indra/llwindow/llwindowmesaheadless.cpp b/indra/llwindow/llwindowmesaheadless.cpp
index 11c22ac94e..2b668d3fc4 100644
--- a/indra/llwindow/llwindowmesaheadless.cpp
+++ b/indra/llwindow/llwindowmesaheadless.cpp
@@ -41,28 +41,25 @@ U16 *gMesaBuffer = NULL;
LLWindowMesaHeadless::LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clearBg,
- BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
+ BOOL disable_vsync, BOOL ignore_pixel_depth)
: LLWindow(callbacks, fullscreen, flags)
{
- if (use_gl)
- {
- llinfos << "MESA Init" << llendl;
- mMesaContext = OSMesaCreateContextExt( GL_RGBA, 32, 0, 0, NULL );
-
- /* Allocate the image buffer */
- mMesaBuffer = new unsigned char [width * height * 4 * MESA_CHANNEL_SIZE];
- llassert(mMesaBuffer);
+ llinfos << "MESA Init" << llendl;
+ mMesaContext = OSMesaCreateContextExt( GL_RGBA, 32, 0, 0, NULL );
- gMesaBuffer = (U16*)mMesaBuffer;
+ /* Allocate the image buffer */
+ mMesaBuffer = new unsigned char [width * height * 4 * MESA_CHANNEL_SIZE];
+ llassert(mMesaBuffer);
- /* Bind the buffer to the context and make it current */
- if (!OSMesaMakeCurrent( mMesaContext, mMesaBuffer, MESA_CHANNEL_TYPE, width, height ))
- {
- llerrs << "MESA: OSMesaMakeCurrent failed!" << llendl;
- }
+ gMesaBuffer = (U16*)mMesaBuffer;
- llverify(gGLManager.initGL());
+ /* Bind the buffer to the context and make it current */
+ if (!OSMesaMakeCurrent( mMesaContext, mMesaBuffer, MESA_CHANNEL_TYPE, width, height ))
+ {
+ llerrs << "MESA: OSMesaMakeCurrent failed!" << llendl;
}
+
+ llverify(gGLManager.initGL());
}
diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h
index bc8e25ec44..c8d2bf2824 100644
--- a/indra/llwindow/llwindowmesaheadless.h
+++ b/indra/llwindow/llwindowmesaheadless.h
@@ -98,7 +98,7 @@ public:
LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clearBg,
- BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
+ BOOL disable_vsync, BOOL ignore_pixel_depth);
~LLWindowMesaHeadless();
private:
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 3bf4a48cb6..de731df228 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -186,7 +186,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
- BOOL disable_vsync, BOOL use_gl,
+ BOOL disable_vsync,
BOOL ignore_pixel_depth, U32 fsaa_samples)
: LLWindow(callbacks, fullscreen, flags),
Lock_Display(NULL),
@@ -197,7 +197,6 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
gKeyboard->setCallbacks(callbacks);
// Note that we can't set up key-repeat until after SDL has init'd video
- // Ignore use_gl for now, only used for drones on PC
mWindow = NULL;
mNeedsResize = FALSE;
mOverrideAspectRatio = 0.f;
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index 4e2a269ea3..91ba73a0ac 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -147,7 +147,7 @@ public:
protected:
LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, int x, int y, int width, int height, U32 flags,
- BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
+ BOOL fullscreen, BOOL clearBg, BOOL disable_vsync,
BOOL ignore_pixel_depth, U32 fsaa_samples);
~LLWindowSDL();
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 9a4dd41c4e..639ffb9d56 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -362,7 +362,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
- BOOL disable_vsync, BOOL use_gl,
+ BOOL disable_vsync,
BOOL ignore_pixel_depth,
U32 fsaa_samples)
: LLWindow(callbacks, fullscreen, flags)
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 54c9ac4d4d..aa7e2289bb 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -118,7 +118,7 @@ public:
protected:
LLWindowWin32(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
- BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
+ BOOL fullscreen, BOOL clearBg, BOOL disable_vsync,
BOOL ignore_pixel_depth, U32 fsaa_samples);
~LLWindowWin32();
diff --git a/indra/lscript/lscript_compile/CMakeLists.txt b/indra/lscript/lscript_compile/CMakeLists.txt
index 134703eed3..13cbd3ffd2 100644
--- a/indra/lscript/lscript_compile/CMakeLists.txt
+++ b/indra/lscript/lscript_compile/CMakeLists.txt
@@ -113,8 +113,10 @@ if (WINDOWS)
${CMAKE_CURRENT_BINARY_DIR}/indra.y.cpp
${CMAKE_CURRENT_BINARY_DIR}/indra.y.hpp
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bison.bat
+ ARGS
${BISON} ${M4_PATH}
- ${CMAKE_CURRENT_BINARY_DIR}/indra.y.cpp
+ -p indra_
+ -d -o ${CMAKE_CURRENT_BINARY_DIR}/indra.y.cpp
${CMAKE_CURRENT_SOURCE_DIR}/indra.y
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/bison.bat
diff --git a/indra/lscript/lscript_compile/bison.bat b/indra/lscript/lscript_compile/bison.bat
index 0baff4e5ef..d40997225e 100644
--- a/indra/lscript/lscript_compile/bison.bat
+++ b/indra/lscript/lscript_compile/bison.bat
@@ -2,10 +2,11 @@
@REM find m4, even if neither program is present in PATH.
@set bison=%1
-set M4PATH=%2
+shift
+set M4PATH=%1
+shift
set M4=
-@set output=%3
-@set input=%4
set PATH=%M4PATH%;%PATH%
-%bison% -d -o %output% %input%
+@REM %* does not work with shift...
+%bison% %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 587435301d..ce5180c0d2 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1319,11 +1319,11 @@ bool LLAppViewer::mainLoop()
// Scan keyboard for movement keys. Command keys and typing
// are handled by windows callbacks. Don't do this until we're
// done initializing. JC
- if ((gHeadlessClient || gViewerWindow->getWindow()->getVisible())
+ if (gViewerWindow->getWindow()->getVisible()
&& gViewerWindow->getActive()
&& !gViewerWindow->getWindow()->getMinimized()
&& LLStartUp::getStartupState() == STATE_STARTED
- && (gHeadlessClient || !gViewerWindow->getShowProgress())
+ && !gViewerWindow->getShowProgress()
&& !gFocusMgr.focusLocked())
{
LLMemType mjk(LLMemType::MTYPE_JOY_KEY);
@@ -1371,8 +1371,7 @@ bool LLAppViewer::mainLoop()
}
// Render scene.
- // *TODO: Should we run display() even during gHeadlessClient? DK 2011-02-18
- if (!LLApp::isExiting() && !gHeadlessClient)
+ if (!LLApp::isExiting())
{
pingMainloopTimeout("Main:Display");
gGLActive = TRUE;
@@ -2992,9 +2991,6 @@ bool LLAppViewer::initWindow()
{
LL_INFOS("AppInit") << "Initializing window..." << LL_ENDL;
- // store setting in a global for easy access and modification
- gHeadlessClient = gSavedSettings.getBOOL("HeadlessClient");
-
// always start windowed
BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index ab06b1f5aa..561734aaae 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -772,10 +772,6 @@ bool idle_startup()
gUserCredential = gLoginHandler.initializeLoginInfo();
display_startup();
}
- if (gHeadlessClient)
- {
- LL_WARNS("AppInit") << "Waiting at connection box in headless client. Did you mean to add autologin params?" << LL_ENDL;
- }
// Make sure the process dialog doesn't hide things
display_startup();
gViewerWindow->setShowProgress(FALSE);
@@ -3507,13 +3503,6 @@ bool process_login_success_response()
void transition_back_to_login_panel(const std::string& emsg)
{
- if (gHeadlessClient && gSavedSettings.getBOOL("AutoLogin"))
- {
- LL_WARNS("AppInit") << "Failed to login!" << LL_ENDL;
- LL_WARNS("AppInit") << emsg << LL_ENDL;
- exit(0);
- }
-
// Bounce back to the login screen.
reset_login(); // calls LLStartUp::setStartupState( STATE_LOGIN_SHOW );
gSavedSettings.setBOOL("AutoLogin", FALSE);
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index cc697f8510..fae20b1c13 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -313,24 +313,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// Logic for forcing window updates if we're in drone mode.
//
- // *TODO: Investigate running display() during gHeadlessClient. See if this early exit is needed DK 2011-02-18
- if (gHeadlessClient)
- {
-#if LL_WINDOWS
- static F32 last_update_time = 0.f;
- if ((gFrameTimeSeconds - last_update_time) > 1.f)
- {
- InvalidateRect((HWND)gViewerWindow->getPlatformWindow(), NULL, FALSE);
- last_update_time = gFrameTimeSeconds;
- }
-#elif LL_DARWIN
- // MBW -- Do something clever here.
-#endif
- // Not actually rendering, don't bother.
- return;
- }
-
-
//
// Bail out if we're in the startup state and don't want to try to
// render the world.
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index c036fcc114..e399b45cba 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1524,7 +1524,6 @@ static LLFastTimer::DeclareTimer FTM_REGION_SHIFT("Region Shift");
void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
{
- if (gHeadlessClient) return;
// This is called when we shift our origin when we cross region boundaries...
// We need to update many object caches, I'll document this more as I dig through the code
// cleaning things out...
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 0cad2e3ec6..1780c2715a 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1385,43 +1385,6 @@ void LLViewerWindow::handleMenuSelect(LLWindow *window, S32 menu_item)
BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S32 height)
{
- // *TODO: Enable similar information output for other platforms? DK 2011-02-18
-#if LL_WINDOWS
- if (gHeadlessClient)
- {
- HWND window_handle = (HWND)window->getPlatformWindow();
- PAINTSTRUCT ps;
- HDC hdc;
-
- RECT wnd_rect;
- wnd_rect.left = 0;
- wnd_rect.top = 0;
- wnd_rect.bottom = 200;
- wnd_rect.right = 500;
-
- hdc = BeginPaint(window_handle, &ps);
- //SetBKColor(hdc, RGB(255, 255, 255));
- FillRect(hdc, &wnd_rect, CreateSolidBrush(RGB(255, 255, 255)));
-
- std::string temp_str;
- temp_str = llformat( "FPS %3.1f Phy FPS %2.1f Time Dil %1.3f", /* Flawfinder: ignore */
- LLViewerStats::getInstance()->mFPSStat.getMeanPerSec(),
- LLViewerStats::getInstance()->mSimPhysicsFPS.getPrev(0),
- LLViewerStats::getInstance()->mSimTimeDilation.getPrev(0));
- S32 len = temp_str.length();
- TextOutA(hdc, 0, 0, temp_str.c_str(), len);
-
-
- LLVector3d pos_global = gAgent.getPositionGlobal();
- temp_str = llformat( "Avatar pos %6.1lf %6.1lf %6.1lf", pos_global.mdV[0], pos_global.mdV[1], pos_global.mdV[2]);
- len = temp_str.length();
- TextOutA(hdc, 0, 25, temp_str.c_str(), len);
-
- TextOutA(hdc, 0, 50, "Set \"HeadlessClient FALSE\" in settings.ini file to reenable", 61);
- EndPaint(window_handle, &ps);
- return TRUE;
- }
-#endif
return FALSE;
}
@@ -1568,12 +1531,12 @@ LLViewerWindow::LLViewerWindow(const Params& p)
resetSnapshotLoc();
// create window
+ const BOOL clear_bg = FALSE;
mWindow = LLWindowManager::createWindow(this,
p.title, p.name, p.x, p.y, p.width, p.height, 0,
p.fullscreen,
- gHeadlessClient,
+ clear_bg,
gSavedSettings.getBOOL("DisableVerticalSync"),
- !gHeadlessClient,
p.ignore_pixel_depth,
gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled
@@ -1717,7 +1680,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
void LLViewerWindow::initGLDefaults()
{
- if (gHeadlessClient) return;
gGL.setSceneBlendType(LLRender::BT_ALPHA);
if (!LLGLSLShader::sNoFixedFunction)
@@ -4997,11 +4959,6 @@ bool LLViewerWindow::onAlert(const LLSD& notify)
{
LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
- if (gHeadlessClient)
- {
- llinfos << "Alert: " << notification->getName() << llendl;
- }
-
// If we're in mouselook, the mouse is hidden and so the user can't click
// the dialog buttons. In that case, change to First Person instead.
if( gAgentCamera.cameraMouselook() )
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e874373f9e..61df5bc2eb 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1139,7 +1139,6 @@ void LLPipeline::releaseScreenBuffers()
void LLPipeline::createGLBuffers()
{
- if (gHeadlessClient) return;
stop_glerror();
LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS);
assertInitialized();