예제 #1
0
파일: Spout.cs 프로젝트: benkuper/SoftLove
		private  void SenderStopped(string senderName)
		{
			//Debug.Log("Sender stopped, sender name : "+senderName);
			if(_instance == null || _instance.activeLocalSenders == null || _instance.stoppedSenders == null)return;
			lock(this){
				TextureInfo texInfo = new TextureInfo(senderName);
				
				_instance.stoppedSenders.Add (texInfo);

				_instance.localSenderNames.Remove(texInfo.name);

				if(_instance.activeLocalSenders.Contains(texInfo)){
					_instance.activeLocalSenders.Remove(texInfo);
				}
			}//lock
			//Debug.Log("localSenderNames.count:"+instance.localSenderNames.Count);
			//Debug.Log("activeLocalSenders.count:"+instance.activeLocalSenders.Count);
		}
예제 #2
0
파일: Spout.cs 프로젝트: benkuper/SoftLove
		private  void SenderStarted(string senderName, IntPtr resourceView,int textureWidth, int textureHeight)
		{
			//Debug.Log("Spout. Sender started, sender name : "+senderName);
			if(_instance == null || _instance.activeLocalSenders == null || _instance.newSenders == null)return;
			lock(this){
				TextureInfo texInfo = new TextureInfo(senderName);
				//Debug.Log("resourceView:"+resourceView.ToInt32());
				texInfo.setInfos(textureWidth,textureHeight,resourceView);
				_instance.newSenders.Add(texInfo);
				if(_instance.localSenderNames.Contains(texInfo.name)){
				_instance.activeLocalSenders.Add(texInfo);
				//Debug.Log("activeLocalSenders.count:"+_instance.activeLocalSenders.Count);
				}
				//Debug.Log("Spout.SenderStarted.End");
			}//lock
		}
예제 #3
0
		public void  TexStopped(TextureInfo texInfo)
		{
			//Debug.Log("SpoutReceiver.texStopped:"+texInfo.name);
			if(texInfo.name == _sharingName)
			{		
				//Debug.Log("SpoutReceiver.texStopped:"+texInfo.name);
				texture = Spout.nullTexture;

				
			}
			else if(sharingName == "Any" && Spout.instance.activeSenders.Count > 0)
			{
				texture = Spout.instance.activeSenders[Spout.instance.activeSenders.Count-1].getTexture();
			}
		}
예제 #4
0
		public void TexShared(TextureInfo texInfo)
		{
			//Debug.Log("SpoutReceiver.texShared");
			if(sharingName == "" || sharingName == texInfo.name || sharingName == "Any")
			{
				//Debug.Log("SpoutReceiver.texShared:"+texInfo.name);
				texture = texInfo.getTexture();
			}
		}
예제 #5
0
		public void senderStopped(TextureInfo texInfo)
		{
			//Debug.Log ("Editor : senderStopped :"+texInfo.name);
			updateOptions();
		}
예제 #6
0
        //Make it comparable for Linq

        public override bool Equals(object obj)
        {
            TextureInfo q = obj as TextureInfo;

            return(q != null && q.name == this.name);
        }