Package engine.graphics.synthesis.texture.CacheTileManager

Examples of engine.graphics.synthesis.texture.CacheTileManager.TileCacheEntry


      int globalXres = xres;
      int globalYres = yres;

      for (int py = 0; py < globalYres / (cyres + 1) + 1; py++) {
        for (int px = 0; px < globalXres / (cxres + 1) + 1; px++) {
          TileCacheEntry e = CacheTileManager.getCache(c, px, py, cxres, cyres, globalXres, globalYres);
          tempGetImage(img, globalXres, globalYres, e);
        }
      }
    } else { // don't use cache
      for (int y = 0; y < yres; y++) {
View Full Code Here


      int globalXres = xres;
      int globalYres = yres;

      for (int py = 0; py < globalYres / (cyres + 1) + 1; py++) {
        for (int px = 0; px < globalXres / (cxres + 1) + 1; px++) {
          TileCacheEntry e = CacheTileManager.getCache(c, px, py, cxres, cyres, globalXres, globalYres);
          tempGetImage_ABGR(img, globalXres, globalYres, e);
        }
      }
    } else { // don't use cache
      for (int y = 0; y < yres; y++) {
View Full Code Here

    if (progress != null)
      progress.startProgress();
    long time = System.currentTimeMillis();

    TileCacheEntry tce = null;
    if (useCache && (img.getWidth() >= minCacheSize && img.getHeight() >= minCacheSize)) {
       tce = CacheTileManager.getCache(c, px, py, img.getWidth(), img.getHeight(), globalXres, globalYres);
    }
   
    for (int y = 0; y < img.getHeight(); y++) {
        if (progress != null)
          progress.setProgress(y / (float) img.getHeight());
        for (int x = 0; x < img.getWidth(); x++) {
          float u = (float) (x + px * img.getWidth()) / (float) globalXres;
          float v = (float) (y + py * img.getHeight()) / (float) globalYres;

          final Vector4 col;
          if (tce == null) col = c.valueRGBA(u, v);
          else col = tce.sample(x, y);
         
          final Vector3 color = new Vector3();
          int val;
          // !!UGH TODO: optimize this!!
          if (mode == 0) {
View Full Code Here

TOP

Related Classes of engine.graphics.synthesis.texture.CacheTileManager.TileCacheEntry

Copyright © 2018 www.massapicom. 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.