Client for OpenFrameworks

Home Forums Syphon Syphon Development – Developer Client for OpenFrameworks

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
  • #5037

    Hey guys!

    I’ve been trying to implement a client on OpenFrameworks but [[SyphonServerDirectory sharedDirectory] servers] don’t return nothing.

    I don’t know objective-C as much as I know C++, but maybe the server directory needs some service that a regular C++ won’t catch. Or GLUT is messing it.

    I’m stuck here, any ideas?

    Anyway, I see that later we’ll need the OpenGL context, and as openFrameworks uses GLUT, here’s a modified GLUT with a function to return the context.

    NSOpenGLContext* of_glutGetOpengLContext(void);

    The compiled library and sources are here:

    You’ll need to copy the GLUT.Framework to the binary, just like the Syphon.Framework



    Update: SyphonServerDirectory returns nothing on setup(), but does return the servers on update().
    Now stuck anymore!


    Hey, it sounds like you’re getting there, but yes, it may take some time for SyphonServerDirectory to discover servers, so it will often return an empty array at application start.

    You should take a look at the state of our OpenFrameworks stuff on svn – it would be great if you could integrate your stuff with that.

    You can get the current context with CGLGetCurrentContext() – no need for a modified GLUT.


    Yeah, I did it!

    Here is a very simple client on openFrameworks:

    Right now I’m busy making a prototype, so my example just grab the first server available and display it. There’s still work to be done to make it usable for everyone, if anyone wants to continue from here, be my guest!

    Thanks for CGLGetCurrentContext(), no need to mess with GLUT anymore!


    Hi. I just checked in a working ofxSyphonClient into the SVN, which is more of an addon than a static implementation in the app. Feel free to try that out and let us know how that works for you. I’ve also updated an example so both clients and servers operate in the test app.

    Thanks for the enthusiasm! You can find the code on Google Code svn 🙂


    Hello Vade,

    Great news! And in the right time!

    I tried the example and it worked fine.
    But when I integrante ofxSyphonClient in my VJ app, the following condition on SyphonNameboundClient.m never works, I had to bypass it:

    (void)handleServerAnnounce:(NSNotification *)notification

    //if (![self parametersMatchDescription:[_client serverDescription]]
    // && [self parametersMatchDescription:newInfo])
    if (true)


    And I usually work with GL_TEXTURE_2D, and because Syphon is using GL_TEXTURE_RECTANGLE_ARB, my shaders will have to be duplicated, replacing sampler2D for sampler2DRect.


    If SyphonNameBoundClient is not working you ought to double check you are passing both the appName and the serverName correctly with the correct case. All implementations of QC and FFGL and Jitter uses the same class with no issues.

    As far as GL_TEXTURE_2D, Syphon will *never* be able to output those. You will have to render into your own FBO with a 2D texture attachment to “change” the texture target. Sorry, this is a current limitation of the underlaying API (IOSurface).



    I can’t seem to find the openFrameworks client example in the SVN repo. I noticed that the SyphonExample has some client stuff commented out, so I tried duplicating the project, commenting out the server/publish stuff, uncommenting the client stuff. However, this does not appear to work as I’m just getting a blank screen.

    Can you give me a bit more insight on how to get the openFrameworks client working?



    Hey Elie

    OF client is in a transitory state, pending some changes in the framework. IIRC, the stuff in SVN should work if you add SyphonNameboundClient.h and .m from the Shared folder in Syphon Implementations to the OF project. Get back to us if not.


    Not sure when/why the client code was commented out, but it is using SyphonNameBoundClient from shared in Syphon Implementations repo. Do you get compilation warnings? The client should be a matter of calling mClient.setup(), setting an app name and server name, and then calling draw. Thats it. I kept the servers active, but it should not make a difference.

    Did you link with the Syphon Framework ok? Going to need some more debugging info from you.



    I don’t get any compiling or linking errors (I added the Shared sources and the Syphon.framework to the Copy files build phase).
    The server runs fine, I can even see the passed screen and texture when I run the Syphon Demo “Simple Client”.
    The client runs without errors, but I just get a blank screen. I don’t think it’s receiving any data.

    Here is a link to my projects if you want to have a look:


    What is the name of your client? Are you actually setting the name and server name appropriatly? Does your Server show up in Simple Client? What other server source are you running?


    In your testApp.cpp you do

    mClient.setApplicationName("Simple Client");

    which attempts to find a server called Simple Client. You probably meant Simple Server.

    If I put the name of an existing server in there, your project works for me.


    Thanks for looking into this.

    I was able to receive frames from the Simple Server app using the following:
    mClient.setApplicationName("Simple Server");
    Although I would’ve expected “Simple Server” to be the server name. What’s the difference between the application name and the server name?

    I still can’t receive frames from the openFrameworks server to the openFrameworks client. I tried setting the application name to “Screen Output” or “Texture Output” but neither seem to work. Tom, were you able to get an oF -> oF link to work?


    You should read the docs on the framework. An application can send multiple frame sources via multiple servers. The app name stays the same. The server name is the human readable name of the individual instance within the app.

    So for clarity:

    If I have an Application named “SyphonExample”, it can have multiple Syphon Servers (like the OF example). I have to name each one some human readable name to let me identify them (some meaningful identifier/description – these descriptions do not need to be unique but, its helpful. Its not an error to have multiple servers have the same name, but it is confusing and thus frowned upon).

    So the “application name” for the above multi – server scenario is consistently “SyphonExmaple”, but the Server name could be “Screen Output” or “Texture Output”. (Again, like the OF example app in SVN).

    The Simple Server app only sends one image, named “”, since it will only ever have one individual image being sent, so its an empty string. Make sense?

    If you make an OF based mServer, you can name it whatever you want. Thats the “server name” that a client potentially needs. The App name is the name of the actual honest to goodness Application that hosts the server.

    OF to OF will and does work, however make sure to change the App Name to the name of your server host.

    For the SVN client, it should be:

    mainOutputSyphonServer.setName("Screen Output");
    	individualTextureSyphonServer.setName("Texture Output");
    	mClient.setServerName("Screen Output");

    Which will give you a sort of feedback effect (because the server is serving its own output, and the client is drawing into its main output, and the server and client are in the same app). Should look like so:


    Great, it works! Thanks for the clarification.

    If you’re interested, I’ve got the working ofxSyphon example broken up into two projects here:



    Hi Everybody !

    Sorry for crossposting … i’ve added a new thread for this issue … i realized this post was old and not specifically on the same problems …

    Well first of all i would like to congratulate the Syphon team for this amazing new tool which will allow a new brand of interconnections between several environments … congratulations and thanks for letting us play with it !!

    So i’m under Openframeworks 0.62, in a MacBookPro with OSX 10.6.7, with XCode 3.2.4 (64bit) and i’m trying to integrate ofxSyphon in a small app, just for testing how is the integration of Syphon on the OF environemt …

    What i did :

    – download the source’s from svn with this command line :
    svn checkout syphon-implementations-read-only
    – setup a simple app with the Client code sniffed from SyphonExample project
    – drag & drop the ofxSyphon folder to my Xcode project …

    It compiles fine but i’m facing some linking problems that go beyond my knowledge, sorry i’m quite new at Xcode …

    I got 9 errors like this :

    “_SyphonServerDescriptionUUIDKey”, referenced from:
    _SyphonServerDescriptionUUIDKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionUUIDKey$non_lazy_ptr)

    “_SyphonServerDescriptionNameKey”, referenced from:
    _SyphonServerDescriptionNameKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionNameKey$non_lazy_ptr)

    “.objc_class_name_SyphonClient”, referenced from:
    literal-pointer@__OBJC@__cls_refs@SyphonClient in SyphonNameboundClient.o

    “_SyphonServerDescriptionAppNameKey”, referenced from:
    _SyphonServerDescriptionAppNameKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionAppNameKey$non_lazy_ptr)

    “_SyphonServerRetireNotification”, referenced from:
    _SyphonServerRetireNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerRetireNotification$non_lazy_ptr)

    “.objc_class_name_SyphonServerDirectory”, referenced from:
    literal-pointer@__OBJC@__cls_refs@SyphonServerDirectory in


    “_SyphonServerUpdateNotification”, referenced from:
    _SyphonServerUpdateNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerUpdateNotification$non_lazy_ptr)

    “_SyphonServerAnnounceNotification”, referenced from
    _SyphonServerAnnounceNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerAnnounceNotification$non_lazy_ptr)
    ld: symbol(s) not found’

    I’ve checked that Syphon.framework is inside the ofxSyphon addon so i don’t understand this linking problems … any light into my darkness will be appreciated …

    Thanks .


Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.