Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendScreen() method doesn't work #23

Closed
knupel opened this issue Jul 16, 2015 · 7 comments
Closed

sendScreen() method doesn't work #23

knupel opened this issue Jul 16, 2015 · 7 comments
Assignees

Comments

@knupel
Copy link

knupel commented Jul 16, 2015

The code bellow work on Processing 3.0a5 but not on Processing 3.0a10. I know this code is not the official example, but it's very easy to use, so maybe there is something to do in Syphon Library ?
That be awesome :)

import codeanticode.syphon.*;
SyphonServer server;

void setup() {
  size(500, 500, P3D);
  server = new SyphonServer(this, "#PParis15");
}

void draw() {
  background(255 *abs(sin(frameCount *.01))) ;
  server.sendScreen();
}
@knupel knupel changed the title Un official example broken Unofficial example broken Jul 16, 2015
@codeanticode codeanticode self-assigned this Aug 6, 2015
@codeanticode codeanticode changed the title Unofficial example broken sendScreen() method doesn't work Sep 12, 2015
@knupel
Copy link
Author

knupel commented Sep 12, 2015

Before I used this solution, now it's broken, but maybe there is something to do around that
http://forum.processing.org/two/discussion/888/a-little-simplicity-with-syphon

class Syphon {
  SyphonServer server;
  PApplet p;
  Syphon(PApplet p, String name){
    this.p = p;
    server = new SyphonServer(p, name);
  }
  void send(){
     send(p.g);
  }
  void send(PGraphics g){
     server.sendImage(g);
  } 
}

@surmvoise
Copy link

I also experience an issue with server.sendScreen(). I only receive a glitched image of the OS UI
I run Processing 3.0.1 on a Mac with syphon library 2.0-RC2. Any fixes or workarounds?
bildschirmfoto 2016-02-04 um 00 07 10

@vade
Copy link
Member

vade commented Feb 3, 2016

are you certain you are running processing in legacy OpenGL 21 renderer, and not 3.x/4.x core profile?

@surmvoise
Copy link

I'm not shure about that. Those terms don't mean much to me... :/ sorry. Do you mean like this?
void setup() { size(600, 600, OPENGL); }
Or what else do I have to do to get this fixed?

I also get this error message:

2016-02-04 00:29:11.571 java[17964:2031432] SYPHON DEBUG: SyphonServerConnectionManager: Start Connection
2016-02-04 00:29:11.572 java[17964:2031432] SYPHON DEBUG: SyphonServerConnectionManager: Created connection with UUID: info.v002.Syphon.8944EA6E-9AC2-47F2-BC24-7A69C91A8636
OpenGL error 1282 at top endDraw(): invalid operation

@knupel
Copy link
Author

knupel commented Feb 4, 2016

I'm not sure for your problem, but if you use Processing 3.0.1 you must use the last Syphon librarie and check the example. Now you must implement syphon in void settings to change the renderings JOGL or something like that :)

import codeanticode.syphon.*;

SyphonServer server;

void settings() {
  size(400,400, P3D);
  PJOGL.profile=1;
}

void setup() {
  // Create syhpon server to send frames out.
  server = new SyphonServer(this, "Processing Syphon");
}

void draw() {
  background(127);
  lights();
  translate(width/2, height/2);
  rotateX(frameCount * 0.01);
  rotateY(frameCount * 0.01);  
  box(150);
  server.sendScreen();
}

@surmvoise
Copy link

Thanks so much, @StanLepunK ! I somehow didn't realize that the void settings() is something different from void setup(). Now I it sends the image correctly.
But anyway, what is this code line for?
PJOGL.profile=1;

@knupel
Copy link
Author

knupel commented Feb 4, 2016

You're welcome.
This line I think is to change the profil of Processing rendering but not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants