ofxBlackBox: openFramework multiTouch GUI

Despite the cheesy name, the goal is to make an addon for openFrameworks with a minimalist aesthetic orientation.
It is fully compatible with TUIO and objects can be dragged, resized, and rotated with two fingers.
This boxes can be setup using a xml file. There you can specify the type and order of the content object.

Code at: github.com/patriciogonzalezvivo/ofxBlackBox

Share

4 thoughts on “ofxBlackBox: openFramework multiTouch GUI

  1. I tried to run this addon, but I got segmentation error. I think it is because the TUIO thread is trying to access the main drawing thread, which is forbidden? Don’t you have segmentation error?

    I think those TUIO events are from a different thread, but in the code, it tries to directly draw something when receiving the events. I wonder how it works on your machine. I am using Linux.

    • Hello Nan, I think I´m not understanding exactly what you means.
      Have you check the example?

      This code it´s a bit old and I know it´s not very clean. I´m doing something like this to get a pointer to the TUIO client in order windows can check for tuioCursors independently from the testApp. May be, It´s not the best practice… but it´s working for me.

      
      void testApp::setup(){
      
        ...
      
        window.setup("setup.xml");
        ofAddListener(window.objectPressed,this,&testApp::windowPressed);
        
        ofAddListener(tuioClient.cursorAdded,this,&testApp::tuioAdded);
        ofAddListener(tuioClient.cursorRemoved,this,&testApp::tuioRemoved);
        ofAddListener(tuioClient.cursorUpdated,this,&testApp::tuioUpdated);
        tuioClient.start(3333);
      
        window.setTuioClient(&tuioClient);
      
      }
      
      //--------------------------------------------------------------
      void testApp::update(){
        ofBackground(100,100,100);  
      
        window.update();
        
        tuioClient.getMessage();
      }
      
      //--------------------------------------------------------------
      void testApp::draw(){
        ofSetColor(255, 255, 255);
      
        window.draw();
        
      }
      

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>