Package processing.opengl

Examples of processing.opengl.PGraphicsOpenGL.endGL()


      }

//      gl.glDisable(GL.GL_BLEND);
      //Reset blendfunction
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      pgl.endGL();
    }

   
    public void fadeToColor(PApplet p, GL gl, float r, float g, float b, float speed) {
//      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
View Full Code Here


          */
         
          //FIXME test not using glReadpixel to get the depth at the location
          //instead we have to build a ray with the result, from the camera location going through the resulst and check for hits ourselves
          glu.gluUnProject((double)screenX, applet.height - (double)screenY, 0, model, 0, proj, 0, viewport, 0, mousePosArr, 0);
        pgl.endGL();
       
        returnVect = new Vector3D((float)mousePosArr[0], (float)mousePosArr[1], (float)mousePosArr[2]);
      }catch(Exception e){
        e.printStackTrace();
        //System.out.println("Use method getWorldForScreenCoords only when drawing with openGL! And dont put negative screen values in!");
View Full Code Here

      try{
        PGraphicsOpenGL pgl = ((PGraphicsOpenGL)applet.g);
        GL gl   = pgl.beginGL()
        GLU glu = pgl.glu;
        Vector3D returnVect = projectGL(gl, glu, point);
        pgl.endGL();
        return returnVect;
      }catch(Exception e){
        e.printStackTrace();
        //System.out.println("Use method getWorldForScreenCoords only when drawing with openGL! And dont put negative screen values in!");
      }
View Full Code Here

          GL gl   = pgl.beginGL()
            gl.glPushMatrix();
              gl.glMultMatrixf(shape.getGlobalMatrix().toFloatBuffer());
              NewPt = Tools3D.projectGL(gl, pgl.glu, NewPt, NewPt);
            gl.glPopMatrix();
            pgl.endGL();
           
            this.mapToSphere(NewPt, this.StVec);
          }else{
            logger.error(getName() + " Didnt hit sphere!");
          }
View Full Code Here

          GL gl   = pgl.beginGL()
            gl.glPushMatrix();
              gl.glMultMatrixf(shape.getGlobalMatrix().toFloatBuffer());
              NewPt = Tools3D.projectGL(gl, pgl.glu, NewPt, NewPt);
            gl.glPopMatrix();
            pgl.endGL();
           
            logger.debug(NewPt);
            this.drag(NewPt, q);
          }else{
            return Matrix.get4x4Identity();
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.