Examples of MTSceneTexture


Examples of org.mt4j.components.visibleComponents.widgets.MTSceneTexture

    pencilBrush.setFillColor(new MTColor(0, 0, 0, 255));
   
        //Create the frame/window that displays the drawing scene through a FBO
//        final MTSceneTexture sceneWindow = new MTSceneTexture(0,0, pa, drawingScene);
    //We have to create a fullscreen fbo in order to save the image uncompressed
    final MTSceneTexture sceneTexture = new MTSceneTexture(pa,0, 0, pa.width, pa.height, drawingScene);
        sceneTexture.getFbo().clear(true, 255, 255, 255, 0, true);
        sceneTexture.setStrokeColor(new MTColor(155,155,155));
        frame.addChild(sceneTexture);
       
        //Eraser button
        PImage eraser = pa.loadImage(imagesPath + "Kde_crystalsvg_eraser.png");
        MTImageButton b = new MTImageButton(eraser, pa);
        b.setNoStroke(true);
        b.translate(new Vector3D(-50,0,0));
        b.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent ae) {
        switch (ae.getID()) {
        case TapEvent.BUTTON_CLICKED:{
//          //As we are messing with opengl here, we make sure it happens in the rendering thread
          pa.invokeLater(new Runnable() {
            public void run() {
              sceneTexture.getFbo().clear(true, 255, 255, 255, 0, true);           
            }
          });
        }break;
        default:
          break;
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTSceneTexture

    app.getInputManager().disableGlobalInputProcessors(lastScene);
    app.getInputManager().disableGlobalInputProcessors(nextScene);
   
    app.invokeLater(new Runnable() {
      public void run() {
        lastSceneWindow = new MTSceneTexture(app,0, 0, Math.round(app.width/2f), Math.round(app.height/2f), lastScene);
        lastSceneRectangle = new MTRectangle(0,0, app.width, app.height, app);
       
        lastSceneRectangle.setGeometryInfo(lastSceneWindow.getGeometryInfo());
        lastSceneRectangle.setTexture(lastSceneWindow.getTexture());
        lastSceneRectangle.setStrokeColor(new MTColor(0,0,0,255));
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTSceneTexture

    app.getInputManager().disableGlobalInputProcessors(lastScene);
    app.getInputManager().disableGlobalInputProcessors(nextScene);
   
    app.invokeLater(new Runnable() {
      public void run() {
        lastSceneWindow = new MTSceneTexture(app,0, 0, lastScene);
        nextSceneWindow = new MTSceneTexture(app,0, 0, nextScene);

        lastSceneRectangle = new MTRectangle(0,0, app.width, app.height, app);
        lastSceneRectangle.setGeometryInfo(lastSceneWindow.getGeometryInfo());
        lastSceneRectangle.setTexture(lastSceneWindow.getTexture());
        lastSceneRectangle.setStrokeColor(new MTColor(0,0,0,255));
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTSceneTexture

    app.getInputManager().disableGlobalInputProcessors(lastScene);
    app.getInputManager().disableGlobalInputProcessors(nextScene);
   
    app.invokeLater(new Runnable() {
      public void run() {
        lastSceneWindow = new MTSceneTexture(app,0, 0, lastScene);
        nextSceneWindow = new MTSceneTexture(app,0, 0, nextScene);

        lastSceneRectangle = new MTRectangle(0,0, app.width, app.height, app);
        lastSceneRectangle.setGeometryInfo(lastSceneWindow.getGeometryInfo());
        lastSceneRectangle.setTexture(lastSceneWindow.getTexture());
        lastSceneRectangle.setStrokeColor(new MTColor(0,0,0,255));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.