Imagine a track with many poles, each pole being the same geometry; the LL viewer requires a geometry element for every single pole! This patch makes libomv able to parse Collada files where instances reuse geometries, allowing for much more concise Collada files.
(1) handle hierarchical nodes in the visual scene
(2) handle the <triangle> element of geometries. This was done the lazy way: convert <triangles> to <polylist> and call the function that was already there for handling <polylist>
On at least Mono 3.2.8, multiple UDP sockets can bind to the same port by default. This means that
when running multiple connections, two can occasionally bind to the same port, leading to unexpected
errors as they intercept each others messages.
Prevent this by explicitly setting SocketOptionName.ReuseAddress = false
In 2208379 (Mon Aug 11 23:57:33 2014), DownloadManager.ParallelDownloads was accidentally set to 0 instead of 8.
This commit also try/catches the parallel part of AppearanceManager.DownloadTextures()
Previously, CapsBase.SetupRequest() hardcoded this to 32 and DownloadManager.ParallelDownloads was setting this with a default value of 8.
This meant that the ConnectionLimit would oscillate rapidly between these two figures as requests were made.
On Mono 3.2.8 and quite possibly other Mono, this appears to increase the chance that the VM will crash under heavy request load.
This commit makes both SetupRequest() calls use the static Settings.HTTP_MAX_CONNECTIONS - other static settings already exist, and so also makes this configurable.
DownloadManager.ParallelDownloads remains a separate setting since it also governs max parallel downloads through a separate coded mechanism.
Under moderate or greater CPU load, pushing to the threadpool means that events such as EstablishAgentCommunication may be processed before EnableSimulator
even though the simulator sends them in the reverse order.
This triggers the logging of various errors and warnings by libomv.
Handling these synchronously shouldn't have a huge impact since the number of events is not high and taking time here can only hold up event upload
Sample code:
var parser = new OpenMetaverse.ImportExport.ColladaLoader();
var prims = parser.Load(o.FileName);
if (prims != null && prims.Count > 0)
{
var uploader = new OpenMetaverse.ImportExport.ModelUploader(client, prims);
uploader.PrepareUpload();
}
Note that PrepareUpload performs the upload as well in this initial stage.
TODO:
* Image upload
* Support for quads in addition to triangles