Package com.jme3.shader

Examples of com.jme3.shader.Uniform.reset()


    protected void resetUniformLocations(Shader shader) {
        ListMap<String, Uniform> uniforms = shader.getUniformMap();
        for (int i = 0; i < uniforms.size(); i++) {
            Uniform uniform = uniforms.getValue(i);
            uniform.reset(); // e.g check location again
        }
    }

    /*
     * (Non-javadoc)
 
View Full Code Here


    // new loader each time, yes
    try {
      Geometry g;
      // need to load vial loadModel, JME does not see obj, etc as
      // Assets..
      t.reset();
      Spatial n = (Spatial) assetMan.loadModel(from.getAbsolutePath());
      time = t.getTimeInSeconds();
      System.out.println("File " + from.getAbsolutePath() + " loaded in "
          + time + " seconds");
      if (n instanceof Geometry) {
View Full Code Here

      System.out.println("File " + from.getAbsolutePath()
          + " converted in " + time + " seconds");
      String path = from.getAbsolutePath();
      String parent = from.getParent();
      // replace .nav with .jnv
      t.reset();
      BinaryExporter.getInstance().save(navMesh,
          new File(parent+"/nav.jnv"));
      time = t.getTimeInSeconds();
//      System.out.println("File "+parent+"/nav.jnv saved in "
//          + time + " seconds");
View Full Code Here

    // new loader each time, yes
    try {
//      System.out.println("-------------------------------------------------------");
      // need to load vial loadModel, JME does not see obj, etc as
      // Assets..
      t.reset();
      Spatial model = assetMan.loadModel(from.getAbsolutePath());
      Node n = new Node("dummy");
      if(!(model instanceof Node))
        n.attachChild(model);
      time = t.getTimeInSeconds();
View Full Code Here

     
      // center is in top left corner for nav mesh to be consistent with
      // this for borders move x right, move y up by half size
      Vector3f offset = new Vector3f(xd + 128, 0, yd - 128);
     
      t.reset();   
      Mesh mesh = NavMeshGenerator.buildNavmesh(n);
      if(mesh != null) {
      TiledNavMesh navMesh = new TiledNavMesh();
      navMesh.loadFromMesh(mesh, offset, isMeshRelative);
      time = t.getTimeInSeconds();
View Full Code Here

      System.out.println("File " + from.getAbsolutePath()
          + " converted in " + time + " seconds");
      String path = from.getAbsolutePath();
      String parent = from.getParent();
      // replace .nav with .jnv
      t.reset();
      BinaryExporter.getInstance().save(navMesh,
          new File(parent+"/nav.jnv"));
      time = t.getTimeInSeconds();
//      System.out.println("File "+parent+"/nav.jnv saved in "
//          + time + " seconds");
View Full Code Here

    Timer t = new NanoTimer();
    float time = 0f;

    // new loader each time, yes
    try {
      t.reset();
      Spatial n = (Spatial) assetMan.loadModel(from.getAbsolutePath());
      if(n != null) {
        String fName = from.getName().substring(0,
            from.getName().length() - fileEnding.length());
        fName = from.getParent()+"/"+fName+".j3o";
View Full Code Here

    // new loader each time, yes
    try {
      Geometry g;
      // need to load vial loadModel, JME does not see obj, etc as
      // Assets..
      t.reset();
      Spatial n = (Spatial) assetMan.loadModel(from.getAbsolutePath());
      time = t.getTimeInSeconds();
      System.out.println("File " + from.getAbsolutePath() + " loaded in "
          + time + " seconds");
      if (n instanceof Geometry) {
View Full Code Here

      System.out.println("File " + from.getAbsolutePath()
          + " converted in " + time + " seconds");
      String path = from.getAbsolutePath();
      String parent = from.getParent();
      // replace .nav with .jnv
      t.reset();
      BinaryExporter.getInstance().save(navMesh,
          new File(parent+"/nav.jnv"));
      time = t.getTimeInSeconds();
//      System.out.println("File "+parent+"/nav.jnv saved in "
//          + time + " seconds");
View Full Code Here

    // new loader each time, yes
    try {
      Geometry g;
      // need to load vial loadModel, JME does not see obj, etc as
      // Assets..
      t.reset();
      Spatial n = (Spatial) assetMan.loadModel(from.getAbsolutePath());
      time = t.getTimeInSeconds();
      System.out.println("File " + from.getAbsolutePath() + " loaded in "
          + time + " seconds");
      if (n instanceof Geometry) {
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.