• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    A Processing sketch to an Isadora stage

    Off-Topic Discussion
    10
    23
    14242
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rainbow
      rainbow last edited by

      found this on http://forum.processing.org/two/discussion/comment/3810#Comment_3810

      saves my time coding processing syphon out

      latest IsadoraCore prerelease OSX 10.9.1 Processing 2.11

      Simple cube,syphon and osc scetch. well documented, enjoy …….

      rainbow

      e4bc5b-simple.zip

      1 Reply Last reply Reply Quote 0
      • primaldivine
        primaldivine last edited by

        I have a blog page here on OSC and Processing:
        http://www.jamiegriffiths.com/isadora-and-processing-via-osc/

        Pro-User Latest Beta - MacBook Pro i7 2.66GHz SSD
        www.jamiegriffiths.com Arctic Canada
        www.chickweedarts.com

        1 Reply Last reply Reply Quote 0
        • bruper
          bruper last edited by

          this is what I used 2 years ago with Processing 1.5.1, it does still works with that version but not with v.2.
          Don't know why...
          you can then use any Syphon client anywhere:


          import javax.media.opengl.;
          import processing.opengl.
          ;
          import jsyphon.*; // Syphon

          JSyphonServer mySyphon;
          PGraphicsOpenGL pgl;
          GL gl;
          int[] texID;

          void setup() {
            size(640, 480, OPENGL);
            pgl = (PGraphicsOpenGL) g;
            gl = pgl.gl;
            initSyphon(gl,"processing");

          strokeWeight(0.5);
            stroke(255, 50);
            background(0);

          }

          void draw() {
            line(width/2, height/2, random(0, width), random(0, height));
            renderTexture(pgl.gl);
          }

          void initSyphon(GL gl, String theName) {
              if(mySyphon!=null) {
                mySyphon.stop();
              }
              mySyphon = new JSyphonServer();
              mySyphon.test();
              mySyphon.initWithName(theName);

          // copy to texture, to send to Syphon.
              texID = new int[1];
              gl.glGenTextures(1, texID, 0);
              gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE_EXT, texID[0]);
              gl.glTexImage2D(gl.GL_TEXTURE_RECTANGLE_EXT, 0, gl.GL_RGBA8, width, height, 0, gl.GL_RGBA, gl.GL_UNSIGNED_BYTE, null);
          }

          void renderTexture(GL gl) {
            gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE_EXT, texID[0]);
            gl.glCopyTexSubImage2D(gl.GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, 0, 0, width, height);
            mySyphon.publishFrameTexture(texID[0], gl.GL_TEXTURE_RECTANGLE_EXT, 0, 0, width, height, width, height, false);
          }

          public void stop() {
            dispose();
          }

          void dispose() {
            println("\n\nabout to stop sketch ...");
            println("deleting textures");
            gl.glDeleteTextures(1, texID, 0);
            if(mySyphon!=null) {
              println("stopping the syphon server");
              mySyphon.stop();
            }
            println("sketch stopped, done.");
          }

          17"MBP 2.93GHZ Core2Duo mid 2009 - OSX10.11.6 - 8GB, 1TBCrucial_SSD, izzy 3.0.7

          1 Reply Last reply Reply Quote 0
          • First post
            Last post