Codota Logo
TextureCacheServiceImpl
Code IndexAdd Codota to your IDE (free)

How to use
TextureCacheServiceImpl
in
kendzi.jogl.texture

Best Java code snippets using kendzi.jogl.texture.TextureCacheServiceImpl (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: kendzi/kendzi3d

/**
 * DONT use Only for test!!
 *
 * @throws IOException
 *
 * @depricated
 */
public void setTexture(String pName, Texture pImg) {
  this.addTexture(pName, pImg, this.filter);
}
origin: kendzi/kendzi3d

/**
 * Set texture filter.
 *
 * @param pEnabled
 *            enabled
 */
public void setTextureFilter(boolean pEnabled) {
  if (this.filter != pEnabled) {
    this.filter = pEnabled;
    this.clear();
  }
}
origin: kendzi/kendzi3d

/**
 * Get texture from cache or load it to cache.
 *
 * @param pName
 *            file name from: <br>
 *            1. directory {PLUGIN_DIR_NAME}/ <br>
 *            2. from resources from jar in dir {PLUGIN_JAR}/ <br>
 * @return texture
 */
@Override
public Texture getTexture(GL gl, String pName) {
  return this.get(gl, pName);
}
origin: kendzi/kendzi3d

@Provides
@Singleton
TextureCacheService provideTextureCacheService(ResourceService pUrlReciverService) {
  TextureCacheServiceImpl textureCacheService = new TextureCacheServiceImpl();
  textureCacheService.setFileUrlReciverService(pUrlReciverService);
  textureCacheService.addTextureBuilder(new ColorTextureBuilder());
  textureCacheService.addTextureBuilder(new BwFileTextureBuilder(pUrlReciverService));
  return textureCacheService;
}
origin: kendzi/kendzi3d

/**
 * {@inheritDoc}
 *
 * @see kendzi.buildings.example.BaseJoglFrame#init(com.jogamp.opengl.GLAutoDrawable)
 */
@Override
public void init(GLAutoDrawable drawable) {
  super.init(drawable);
  /*
   * This is required only for textures file finding. Renderer use it to
   * load files with textures. If textures are not used but only colored
   * materials it is not required.
   */
  ResourceService resourceService = new LocalResourceReciver();
  // cache for textures files.
  TextureCacheServiceImpl textureCacheService = new TextureCacheServiceImpl();
  textureCacheService.setFilter(true);
  // Manual injection of dependencies.
  textureCacheService.setFileUrlReciverService(resourceService);
  textureLibraryStorageService = new TextureLibraryService(resourceService);
  // Set up of my model renderer to display my model
  modelRender = new ModelRender();
  // Manual injection of dependencies.
  modelRender.setTextureCacheService(textureCacheService);
  // Create model mesh.
  model = createRoofModel();
}
origin: kendzi/kendzi3d

@Provides
@Singleton
TextureCacheService provideTextureCacheService() {
  ResourceService resourceService = new LocalResourceReciver();
  TextureCacheServiceImpl service = new TextureCacheServiceImpl();
  service.setFileUrlReciverService(resourceService);
  return service;
}
origin: kendzi/kendzi3d

/**
 * Try to get texture. If it isn't laded it well be loaded from:<br>
 * 1. directory {PLUGIN_DIR_NAME}/textures <br>
 * 2. from resources from jar in dir {PLUGIN_JAR}/textures <br>
 *
 * @param pName
 * @return
 */
public Texture get(GL gl, String pName) {
  Texture texture = this.cache.get(pName);
  if (texture == null) {
    texture = loadTexture(gl, pName);
    if (texture == null) {
      texture = loadTexture(gl, TEXTURES_UNDEFINED_PNG);
    }
    if (texture == null) {
      log.error("no texture to load!!" + " texture url: " + pName);
    } else {
      setupFilter(gl, texture);
    }
    this.cache.put(pName, texture);
  }
  return texture;
}
origin: kendzi/kendzi3d

/**
 * Get texture image from.
 *
 * @param pName
 *            file name from: <br>
 *            1. directory {PLUGIN_DIR_NAME}/ <br>
 *            2. from resources from jar in dir {PLUGIN_JAR}/ <br>
 * @return texture
 */
@Override
public BufferedImage getImage(String pName) {
  return loadImage(pName);
}
origin: kendzi/kendzi3d

  return loadTextureFile(pName, this.filter);
} catch (Exception e) {
  log.error("can't load texture", e);
origin: kendzi/kendzi3d

/**
 * DONT use Only for test!!
 *
 * @throws IOException
 *
 * @depricated
 */
public void setTexture(GL gl, String pName, BufferedImage pImg) throws IOException {
  this.addTexture(gl, pName, pImg, this.filter);
}
kendzi.jogl.textureTextureCacheServiceImpl

Most used methods

  • <init>
  • setFileUrlReciverService
  • addTexture
  • addTextureBuilder
    Add texture builder.
  • clear
    Clean up all textures from cache.
  • get
    Try to get texture. If it isn't laded it well be loaded from: 1. directory {PLUGIN_DIR_NAME}/texture
  • loadImage
  • loadTexture
  • loadTextureFile
  • loadTextureImageFile
  • setFilter
  • setTexture
    DONT use Only for test!!
  • setFilter,
  • setTexture,
  • setTextureFilter,
  • setupFilter

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now