public void DefineSyphonClient(SyphonServerObject server) { //hold on to object reference attachedServer = server; boundAppName = server.SyphonServerDescriptionAppName; if (server.SyphonServerDescriptionName == "") { boundName = Syphon.UNNAMED_STRING; } else { boundName = server.SyphonServerDescriptionName; } //initialize the texture if (attachedTexture == null) { attachedTexture = new RenderTexture(16, 16, 0, RenderTextureFormat.ARGB32); attachedTexture.filterMode = FilterMode.Bilinear; attachedTexture.wrapMode = TextureWrapMode.Clamp; attachedTexture.Create(); Syphon.SafeMaterial.SetPass(0); RenderTexture.active = attachedTexture; GL.Clear(false, true, new Color(0, 0, 0, 0)); RenderTexture.active = null; cachedTexID = IntPtr.Zero; } InitSyphonClient(); }
public SyphonServerObject(SyphonServerObject deepCopyConstruct) { SyphonServerDescriptionAppName = deepCopyConstruct.SyphonServerDescriptionAppName; SyphonServerDescriptionName = deepCopyConstruct.SyphonServerDescriptionName; SyphonServerDescriptionUUID = deepCopyConstruct.SyphonServerDescriptionUUID; syphonServerPointer = deepCopyConstruct.SyphonServerPointer; }
public SyphonServerObject(SyphonServerObject deepCopyConstruct) { SyphonServerDescriptionAppName = deepCopyConstruct.SyphonServerDescriptionAppName; SyphonServerDescriptionName = deepCopyConstruct.SyphonServerDescriptionName; SyphonServerDescriptionUUID = deepCopyConstruct.SyphonServerDescriptionUUID; syphonServerPointer = deepCopyConstruct.SyphonServerPointer; }
public void CreateSyphonServer(SyphonServerObject deepCopy) { SyphonServerDescriptionAppName = deepCopy.SyphonServerDescriptionAppName; SyphonServerDescriptionName = deepCopy.SyphonServerDescriptionName; SyphonServerDescriptionUUID = deepCopy.SyphonServerDescriptionUUID; syphonServerPointer = deepCopy.SyphonServerPointer; }
public void AnnounceServer(string appName, string name) { if (!initialized && MatchesDescription(appName, name)) { announceServerQueueServer = Syphon.GetSyphonServer(appName, name); if (announceServerQueueServer != null) { announceServerQueue = true; // // DestroySyphonClient(); // DefineSyphonClient(server); // InitSyphonClient(); // Debug.Log("announced app:" + appName + " name: " + name ); } } }
//make sure that announce/retire are performed on the main thread by putting commands in a queue public void Update() { if (announceServerQueue) { DefineSyphonClient(announceServerQueueServer); InitSyphonClient(); // StackTrace stackTrace = new StackTrace(); // UnityEngine.Debug.Log("init'd syphon client " + boundAppName + " " + boundName + stackTrace.GetFrame(1).GetMethod().Name); // Debug.Log("announced app:" + announceServerQueueServer.SyphonServerDescriptionAppName + " name: " + announceServerQueueServer.SyphonServerDescriptionName ); announceServerQueue = false; announceServerQueueServer = null; } if (retireServerQueue) { DestroySyphonClient(); retireServerQueue = false; // Debug.Log("retired app:" + appName + " name: " + name ); } }
public static void AddClientToUnsortedList(string appName, string name, SyphonServerObject server) { SyphonClientObject result = GetSyphonClient(appName, name); // Debug.Log(result.BoundAppName + " " + result.BoundName + " was the result"); if (result == null) { // Debug.Log("DIDNT EXIST: " + appName + "/" +name); //if it was null when trying to add a new client, just add a new one and init. Syphon.UnsortedClients.Add(ScriptableObject.CreateInstance <SyphonClientObject>()); Syphon.UnsortedClients[Syphon.UnsortedClients.Count - 1].DefineSyphonClient(server); Syphon.UnsortedClients[Syphon.UnsortedClients.Count - 1].InitSyphonClient(); } else { // Debug.Log("EXISTED: " + appName + "/" +name); result.DestroySyphonClient(); result.DefineSyphonClient(server); result.InitSyphonClient(); } }
public void DefineSyphonClient(SyphonServerObject server){ //hold on to object reference attachedServer = server; boundAppName = server.SyphonServerDescriptionAppName; if(server.SyphonServerDescriptionName == "") boundName = Syphon.UNNAMED_STRING; else boundName = server.SyphonServerDescriptionName; //initialize the texture if(attachedTexture == null){ attachedTexture = new RenderTexture(16, 16, 0, RenderTextureFormat.ARGB32); attachedTexture.filterMode = FilterMode.Bilinear; attachedTexture.wrapMode = TextureWrapMode.Clamp; attachedTexture.Create(); Syphon.SafeMaterial.SetPass(0); RenderTexture.active = attachedTexture; GL.Clear(false, true, new Color(0, 0, 0, 0)); RenderTexture.active = null; cachedTexID = -1; } InitSyphonClient(); }
public void DefineSyphonClient(SyphonClientObject client) { // UnityEngine.Debug.Log("created syphon client: " + boundName + " " +boundAppName); //hold on to object reference attachedServer = client.attachedServer; boundAppName = client.AttachedServer.SyphonServerDescriptionAppName; if (client.AttachedServer.SyphonServerDescriptionName == "") { boundName = Syphon.UNNAMED_STRING; } else { boundName = client.AttachedServer.SyphonServerDescriptionName; } //initialize the texture if (attachedTexture == null) { attachedTexture = new RenderTexture(128, 128, 0, RenderTextureFormat.ARGB32); attachedTexture.filterMode = FilterMode.Bilinear; attachedTexture.wrapMode = TextureWrapMode.Clamp; } //TODO: create the syphon client in plugin }
public static SyphonClientObject AddClientToSyphonClientsList(string appName, string name, SyphonServerObject server) { SyphonClientObject result = GetSyphonClient(appName, name); // Debug.Log(result.BoundAppName + " " + result.BoundName + " was the result"); if (result == null) { // UnityEngine.Debug.Log("DIDNT EXIST: " + appName + "/" +name); //if it was null when trying to add a new client, just add a new one and init. result = ScriptableObject.CreateInstance <SyphonClientObject>(); result.DefineSyphonClient(server); Syphon.SyphonClients.Add(result); } else { // UnityEngine.Debug.Log("EXISTED: " + appName + "/" +name + ". doing nothing."); } return(result); }
public static void AddClientToUnsortedList(string appName, string name, SyphonServerObject server) { SyphonClientObject result = GetSyphonClient(appName, name); // Debug.Log(result.BoundAppName + " " + result.BoundName + " was the result"); if(result == null){ // Debug.Log("DIDNT EXIST: " + appName + "/" +name); //if it was null when trying to add a new client, just add a new one and init. Syphon.UnsortedClients.Add(ScriptableObject.CreateInstance<SyphonClientObject>() ); Syphon.UnsortedClients[Syphon.UnsortedClients.Count -1 ].DefineSyphonClient(server); Syphon.UnsortedClients[Syphon.UnsortedClients.Count -1 ].InitSyphonClient(); } else{ // Debug.Log("EXISTED: " + appName + "/" +name); result.DestroySyphonClient(); result.DefineSyphonClient(server); result.InitSyphonClient(); } }
public static SyphonClientObject AddClientToSyphonClientsList(string appName, string name, SyphonServerObject server) { SyphonClientObject result = GetSyphonClient(appName, name); // Debug.Log(result.BoundAppName + " " + result.BoundName + " was the result"); if(result == null){ // UnityEngine.Debug.Log("DIDNT EXIST: " + appName + "/" +name); //if it was null when trying to add a new client, just add a new one and init. result = ScriptableObject.CreateInstance<SyphonClientObject>(); result.DefineSyphonClient(server); Syphon.SyphonClients.Add(result); } else{ // UnityEngine.Debug.Log("EXISTED: " + appName + "/" +name + ". doing nothing."); } return result; }
public void CreateSyphonServer(SyphonServerObject deepCopy){ SyphonServerDescriptionAppName = deepCopy.SyphonServerDescriptionAppName; SyphonServerDescriptionName = deepCopy.SyphonServerDescriptionName; SyphonServerDescriptionUUID = deepCopy.SyphonServerDescriptionUUID; syphonServerPointer = deepCopy.SyphonServerPointer; }
//make sure that announce/retire are performed on the main thread by putting commands in a queue public void Update() { if(announceServerQueue){ DefineSyphonClient(announceServerQueueServer); InitSyphonClient(); // StackTrace stackTrace = new StackTrace(); // UnityEngine.Debug.Log("init'd syphon client " + boundAppName + " " + boundName + stackTrace.GetFrame(1).GetMethod().Name); // Debug.Log("announced app:" + announceServerQueueServer.SyphonServerDescriptionAppName + " name: " + announceServerQueueServer.SyphonServerDescriptionName ); announceServerQueue = false; announceServerQueueServer = null; } if(retireServerQueue){ DestroySyphonClient(); retireServerQueue = false; // Debug.Log("retired app:" + appName + " name: " + name ); } }
public void DefineSyphonClient(SyphonClientObject client) { // UnityEngine.Debug.Log("created syphon client: " + boundName + " " +boundAppName); //hold on to object reference attachedServer = client.attachedServer; boundAppName = client.AttachedServer.SyphonServerDescriptionAppName; if(client.AttachedServer.SyphonServerDescriptionName == "") boundName = Syphon.UNNAMED_STRING; else boundName = client.AttachedServer.SyphonServerDescriptionName; //initialize the texture if(attachedTexture == null){ attachedTexture = new RenderTexture(128, 128, 0, RenderTextureFormat.ARGB32); attachedTexture.filterMode = FilterMode.Bilinear; attachedTexture.wrapMode = TextureWrapMode.Clamp; } //TODO: create the syphon client in plugin }
public void AnnounceServer(string appName, string name) { if(!initialized && MatchesDescription(appName, name)){ announceServerQueueServer = Syphon.GetSyphonServer(appName, name); if(announceServerQueueServer != null){ announceServerQueue = true; // // DestroySyphonClient(); // DefineSyphonClient(server); // InitSyphonClient(); // Debug.Log("announced app:" + appName + " name: " + name ); } } }