12 #include <OpenGL/OpenGL.h>
13 #include <OpenGL/CGLMacro.h>
20 "title" :
"VuoSyphonSender",
37 - (void) initServerWithName:(NSString*)name
40 dispatch_sync(dispatch_get_main_queue(), ^{
43 syphonServer = [[SyphonServer alloc] initWithName:name context:cgl_ctx options:nil];
51 - (void) publishFrame:(
VuoImage)image
55 if (image->pixelsWide < 1 || image->pixelsHigh < 1)
62 glDisable(GL_CULL_FACE);
64 [syphonServer publishFrameTexture:image->glTextureName
65 textureTarget:GL_TEXTURE_2D
66 imageRegion:NSMakeRect(0, 0, image->pixelsWide, image->pixelsHigh)
67 textureDimensions:NSMakeSize(image->pixelsWide, image->pixelsHigh)
70 glEnable(GL_CULL_FACE);
78 - (void) setName:(NSString*)newName
81 dispatch_sync(dispatch_get_main_queue(), ^{
93 dispatch_sync(dispatch_get_main_queue(), ^{
96 [syphonServer release];