GithubHelp home page GithubHelp logo

Comments (2)

codeanticode avatar codeanticode commented on August 13, 2024 1

It's actually the same as #32, since mask() just calls filter(). I think it's an upstream bug in the OpenGL renderer in Processing.

from processing.

CaseyJScalf avatar CaseyJScalf commented on August 13, 2024

Nice work I appreciate the follow up. I took a look at #32 and found that to be a helpful description of the problem with the ordering of the "server.sendImage(canvas);" in the beginning being rather helpful.

I did notice that if I put it at the very start the Syphon output was good but the Processing window would be null. So I put it just after beginDraw()

The code below works great now and is shown in the screenshot.

Screen Shot 2022-03-13 at 3 25 19 PM

import codeanticode.syphon.*;

PGraphics canvas;
SyphonServer server;

void setup() { 
  size(400,400, P3D);
  canvas = createGraphics(400, 400, P3D);
  frameRate(30);
  
  // Create syhpon server to send frames out.
  server = new SyphonServer(this, "Processing Syphon");
}

void draw() {
  
  canvas.beginDraw();
  
  server.sendImage(canvas);
  
  canvas.background(127);
  canvas.lights();
  canvas.translate(width/2, height/2);
  canvas.rotateX(frameCount * 0.01);
  canvas.rotateY(frameCount * 0.01);  
  canvas.box(150);
  canvas.filter(INVERT);
  canvas.filter(BLUR, 3);
  canvas.endDraw();
  image(canvas, 0, 0);
  
}

from processing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.