Examples of TextureLoader


Examples of com.badlogic.gdx.assets.loaders.TextureLoader

    setLoader(BitmapFont.class, new BitmapFontLoader(new InternalFileHandleResolver()));
    setLoader(Music.class, new MusicLoader(new InternalFileHandleResolver()));
    setLoader(Pixmap.class, new PixmapLoader(new InternalFileHandleResolver()));
    setLoader(Sound.class, new SoundLoader(new InternalFileHandleResolver()));
    setLoader(TextureAtlas.class, new TextureAtlasLoader(new InternalFileHandleResolver()));
    setLoader(Texture.class, new TextureLoader(new InternalFileHandleResolver()));
    setLoader(Skin.class, new SkinLoader(new InternalFileHandleResolver()));
    setLoader(TileMapRenderer.class, new TileMapRendererLoader(new InternalFileHandleResolver()));
    threadPool = Executors.newFixedThreadPool(1, new ThreadFactory() {
      @Override
      public Thread newThread (Runnable r) {
View Full Code Here

Examples of com.badlogic.gdx.assets.loaders.TextureLoader

    setLoader(BitmapFont.class, new BitmapFontLoader(resolver));
    setLoader(Music.class, new MusicLoader(resolver));
    setLoader(Pixmap.class, new PixmapLoader(resolver));
    setLoader(Sound.class, new SoundLoader(resolver));
    setLoader(TextureAtlas.class, new TextureAtlasLoader(resolver));
    setLoader(Texture.class, new TextureLoader(resolver));
    setLoader(Skin.class, new SkinLoader(resolver));
    setLoader(ParticleEffect.class, new ParticleEffectLoader(resolver));
    setLoader(PolygonRegion.class, new PolygonRegionLoader(resolver));
    setLoader(I18NBundle.class, new I18NBundleLoader(resolver));
    setLoader(Model.class, ".g3dj", new G3dModelLoader(new JsonReader(), resolver));
View Full Code Here

Examples of com.sun.j3d.utils.image.TextureLoader

        q.set(1.0f, 1.0f);
        plane.setTextureCoordinate(3, q);

        Appearance appear = new Appearance();

        TextureLoader loader = new TextureLoader(bimage);
        ImageComponent2D image = loader.getImage();

        if (Debug.debugging("3d")) {
            Debug.output("MapContent: image height: " + image.getHeight()
                    + ", width: " + image.getWidth());
        }
View Full Code Here

Examples of com.sun.j3d.utils.image.TextureLoader

        if(changed){
            if(value instanceof File){
                File newFile=(File)value;
                try{
                    TextureLoader tex = new TextureLoader(newFile.getAbsolutePath(), null);
                    setTexture(tex.getTexture());
                    _object.getTexture().setUserData(newFile);
                }catch (Exception e) {
                    String emsg=e.getLocalizedMessage();
                    if(emsg==null){
                        emsg=e.getMessage();
View Full Code Here

Examples of com.sun.j3d.utils.image.TextureLoader

          textureImage = ImageIO.read(textureImageUrl);
        } catch (IOException ex) {
          // Ignore images at other format
        }
        if (textureImage != null) {
          TextureLoader textureLoader = new TextureLoader(textureImage);
          Texture texture = textureLoader.getTexture();
          // Keep in user data the URL of the texture image
          texture.setUserData(textureImageUrl);
          currentAppearance.setTexture(texture);
        }
      } else {
View Full Code Here

Examples of com.sun.j3d.utils.image.TextureLoader

    BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
    Graphics g = image.getGraphics();
    g.setColor(color);
    g.drawLine(0, 0, 0, 0);
    g.dispose();
    Texture texture = new TextureLoader(image).getTexture();
    texture.setCapability(Texture.ALLOW_IMAGE_READ);
    texture.setCapability(Texture.ALLOW_FORMAT_READ);
    texture.getImage(0).setCapability(ImageComponent2D.ALLOW_IMAGE_READ);
    texture.getImage(0).setCapability(ImageComponent2D.ALLOW_FORMAT_READ);
    return texture;
View Full Code Here

Examples of com.sun.j3d.utils.image.TextureLoader

    }           
    final Texture texture;
    if (image == null) {
      texture = errorTexture;
    } else {
      texture = new TextureLoader(image).getTexture();
      // Keep in user data the URL of the texture image
      if (content instanceof URLContent) {
        texture.setUserData(((URLContent)content).getURL());
      }
    }
View Full Code Here

Examples of com.sun.j3d.utils.image.TextureLoader

      if ("init_from".equals(name)) {
        try {
          URL textureImageUrl = new URL(baseUrl, getCharacters());
          BufferedImage textureImage = ImageIO.read(textureImageUrl);
          if (textureImage != null) {
            TextureLoader textureLoader = new TextureLoader(textureImage);
            Texture texture = textureLoader.getTexture();
            // Keep in user data the URL of the texture image
            texture.setUserData(textureImageUrl);
            this.textures.put(this.imageId, texture);
          }
        } catch (IOException ex) {
View Full Code Here

Examples of com.sun.j3d.utils.image.TextureLoader

      Sphere.GENERATE_NORMALS_INWARD |
      Sphere.GENERATE_TEXTURE_COORDS, 50);
       
    Appearance backgroundApp = S.getAppearance();
    backGeoBranch.addChild(S);
    TextureLoader tex=null;
    if(!fname.startsWith("http://"))
      tex = new TextureLoader(fname,this);
    else {
      try {
        tex=new TextureLoader(new java.net.URL(fname),this);
      }
      catch(Exception e) {
      }
    }
    if (tex != null) backgroundApp.setTexture(tex.getTexture());
    bg.setGeometry(backGeoBranch);
    objTrans.addChild(bg);
    objRoot.addChild(objTrans);
  }
View Full Code Here

Examples of com.sun.j3d.utils.image.TextureLoader

    Shape3D getArtilleryTarget(int type) {
        return getModel(tileManager.getArtilleryTarget(type), .5f, false);
    }
   
    public Texture2D getTexture(String filename) {
        TextureLoader tl = new TextureLoader(filename, TextureLoader.GENERATE_MIPMAP, null);
        Texture2D tex = (Texture2D)tl.getTexture();
        tex.setMagFilter(Texture.NICEST);
        tex.setMinFilter(Texture.NICEST);
        return tex;
    }
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.