diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llmath/llvolume.cpp | 20 | ||||
| -rw-r--r-- | indra/llmath/llvolume.h | 2 | ||||
| -rw-r--r-- | indra/llmessage/llcurl.cpp | 28 | ||||
| -rw-r--r-- | indra/llmessage/llcurl.h | 3 | ||||
| -rw-r--r-- | indra/llmessage/llhttpclient.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llface.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llviewermenufile.h | 10 | 
7 files changed, 61 insertions, 7 deletions
| diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index d1716e1407..7e1517fba7 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5614,19 +5614,31 @@ void LLVolumeFace::createBinormals()  	}  } -void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& transform, LLMatrix4& norm_transform) +void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat, LLMatrix4& norm_mat)  { +	U16 offset = mVertices.size(); + +	  	for (U32 i = 0; i < face.mVertices.size(); ++i)  	{  		VertexData v = face.mVertices[i]; -		v.mPosition *= mat; -		v.mNormal *= norm_transform; +		v.mPosition = v.mPosition*mat; +		v.mNormal = v.mNormal * norm_mat;  		mVertices.push_back(v); + +		if (offset == 0 && i == 0) +		{ +			mExtents[0] = mExtents[1] = v.mPosition; +		} +		else +		{ +			update_min_max(mExtents[0], mExtents[1], v.mPosition); +		}  	} -	U16 offset = mIndices.size(); +	  	for (U32 i = 0; i < face.mIndices.size(); ++i)  	{  		mIndices.push_back(face.mIndices[i]+offset); diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 1059c29566..36811785dc 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -805,7 +805,7 @@ public:  	void createBinormals();  	void makeTriStrip(); -	void appendFace(const LLVolumeFace& face); +	void appendFace(const LLVolumeFace& face, LLMatrix4& transform, LLMatrix4& normal_tranform);  	class VertexData  	{ diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 024e17a777..b93b94cd25 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -55,6 +55,7 @@  #include "llstl.h"  #include "llsdserialize.h"  #include "llthread.h" +#include "llvfile.h"  //////////////////////////////////////////////////////////////////////////////  /* @@ -801,7 +802,34 @@ bool LLCurlRequest::post(const std::string& url,  	bool res = addEasy(easy);  	return res;  } + +bool LLCurlRequest::post(const std::string& url, +						 const headers_t& headers, +						 const std::string& data, +						 LLCurl::ResponderPtr responder) +{ +	LLCurl::Easy* easy = allocEasy(); +	if (!easy) +	{ +		return false; +	} +	easy->prepRequest(url, headers, responder); + +	easy->getInput().write(data.data(), data.size()); +	S32 bytes = easy->getInput().str().length(); +	easy->setopt(CURLOPT_POST, 1); +	easy->setopt(CURLOPT_POSTFIELDS, (void*)NULL); +	easy->setopt(CURLOPT_POSTFIELDSIZE, bytes); + +	easy->slist_append("Content-Type: application/octet-stream"); +	easy->setHeaders(); + +	lldebugs << "POSTING: " << bytes << " bytes." << llendl; +	bool res = addEasy(easy); +	return res; +} +  // Note: call once per frame  S32 LLCurlRequest::process()  { diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index caf02cccd9..4302c19113 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -44,6 +44,7 @@  #include <boost/intrusive_ptr.hpp>  #include <curl/curl.h> // TODO: remove dependency +#include "llassettype.h"  #include "llbuffer.h"  #include "lliopipe.h"  #include "llsd.h" @@ -213,6 +214,8 @@ public:  	void get(const std::string& url, LLCurl::ResponderPtr responder);  	bool getByteRange(const std::string& url, const headers_t& headers, S32 offset, S32 length, LLCurl::ResponderPtr responder);  	bool post(const std::string& url, const headers_t& headers, const LLSD& data, LLCurl::ResponderPtr responder); +	bool post(const std::string& url, const headers_t& headers, const std::string& data, LLCurl::ResponderPtr responder); +  	S32  process();  	S32  getQueued(); diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index dd56e18caf..46952fa434 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -194,6 +194,7 @@ namespace  			fileBuffer = new U8 [fileSize];              vfile.read(fileBuffer, fileSize);              ostream.write((char*)fileBuffer, fileSize); +			delete [] fileBuffer;  			eos = true;  			return STATUS_DONE;  		} diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 0a9976f511..4822c303bf 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1081,14 +1081,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,  		mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex);  		if (LLPipeline::sUseTriStrips)  		{ -			for (U16 i = 0; i < num_indices; i++) +			for (U32 i = 0; i < num_indices; i++)  			{  				*indicesp++ = vf.mTriStrip[i] + index_offset;  			}  		}  		else  		{ -			for (U16 i = 0; i < num_indices; i++) +			for (U32 i = 0; i < num_indices; i++)  			{  				*indicesp++ = vf.mIndices[i] + index_offset;  			} diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 7167903311..7ffa5d5e57 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -100,4 +100,14 @@ void assign_defaults_and_show_upload_message(  	const std::string& display_name,  	std::string& description); +LLSD generate_new_resource_upload_capability_body( +	LLAssetType::EType asset_type, +	const std::string& name, +	const std::string& desc, +	LLFolderType::EType destination_folder_type, +	LLInventoryType::EType inv_type, +	U32 next_owner_perms, +	U32 group_perms, +	U32 everyone_perms); +  #endif | 
