Package org.newdawn.slick.opengl

Examples of org.newdawn.slick.opengl.Texture


    textures.clear();
    ZanMinimap.instance.texman.reset();
  }

  public static Texture getTextureFromUrl(String url) {
    Texture tex = getTextureFromUrl(null, url);
    if (tex == null) {
      CustomTextureManager.downloadTexture(url, true);
      tex = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/block/spout.png");
    }
    return tex;
View Full Code Here


  }
 
  // Don't call this method, for future use.
  protected Texture getTextureFromCoords(World world, int x, int y, int z) {
    short customId = 0;
    Texture texture = null;
    if (SpoutClient.getInstance().getRawWorld() != null) {
      SpoutcraftChunk sChunk = Spoutcraft.getChunkAt(SpoutClient.getInstance().getRawWorld(), x, y, z);
      customId = sChunk.getCustomBlockId(x, y, z)
      short[] customBlockIds = sChunk.getCustomBlockIds();
      byte[] customBlockData = sChunk.getCustomBlockData();     
View Full Code Here

  }

  // Don't call this method, for future use.
  protected Texture getTextureFromItemStack(ItemStack itemStack) {
    BlockDesign design = null;
    Texture texture = null;
    org.spoutcraft.api.material.CustomItem item = MaterialData.getCustomItem(itemStack.getItemDamage());
    if (item != null) {
      String textureURI = item.getTexture();
      if (textureURI == null) {
        org.spoutcraft.api.material.CustomBlock block = MaterialData.getCustomBlock(itemStack.getItemDamage());
View Full Code Here

  }
}

class LocalTexture extends GenericTexture {
  public void render() {
    Texture texture = CustomTextureManager.getTextureFromPath(getUrl());
    if (texture != null) {
      GL11.glTranslatef((float) getScreenX(), (float) getScreenY(), 0); // Moves texture into place
      ((MCRenderDelegate)Spoutcraft.getRenderDelegate()).drawTexture(texture, (int)getWidth(), (int)getHeight(), isDrawingAlphaChannel());
    }
  }
View Full Code Here

          loadDesign(file);
        } else if (FileUtil.isImageFile(file.getName())) {
          if (spoutDebug) {
            System.out.println("[Spoutcraft] Loading image: " + file.getName() + " from: " + file.getParent());
          }
          Texture tex = CustomTextureManager.getTextureFromUrl(((PrecacheTuple) entry.getKey()).getPlugin(),file.getName());
          if (spoutDebug && tex == null) {
            System.out.println("[Spoutcraft] Precache tried to load a null image: " + tex);
          }
        }
      }
View Full Code Here

        var5.rotateAroundY(-this.rotationYaw * (float)Math.PI / 180.0F);
        var5 = var5.addVector(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ);
        // Spout Start
        if (par1ItemStack.itemID == 318) {
          BlockDesign design = null;
          Texture texture = null;
          org.spoutcraft.api.material.CustomItem item = MaterialData.getCustomItem(par1ItemStack.getItemDamage());
          if (item != null) {
            String textureURI = item.getTexture();
            if (textureURI == null) {
              org.spoutcraft.api.material.CustomBlock block = MaterialData.getCustomBlock(par1ItemStack.getItemDamage());
View Full Code Here

          for (currentTexture = 0; currentTexture < hitTextures.size(); currentTexture++) {
            int texture = defaultTexture;
            // First pass (currentTexture == 0) is for the default terrain.png texture. Subsquent passes are for custom textures
            // This design is to avoid unnessecary glBindTexture calls.
            if (currentTexture > 0) {
              Texture customTexture = CustomTextureManager.getTextureFromUrl(hitTexturesPlugins.get(currentTexture), hitTextures.get(currentTexture));             
              if (customTexture == null) {
                customTexture = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/block/spout.png");
              }
              if (customTexture != null) {
                texture = customTexture.getTextureID();
                TextureUtil.bindTexture(texture);
                //game.renderEngine.bindTexture(texture);
                if (texture <= 0) {
                  texture = defaultTexture;
                }
View Full Code Here

      for (CustomBlock block : MaterialData.getCustomBlocks()) {
        if (block.getBlockDesign() != null) {
          String texture = block.getBlockDesign().getTextureURL();
          String textureAddon = block.getBlockDesign().getTextureAddon();
          if (texture != null && textureAddon != null) {
            Texture tex = CustomTextureManager.getTextureFromUrl(textureAddon, texture);
            if (tex != null) {
              initalizeTexture(tex.getTextureID());
            }
          }
        }
      }
View Full Code Here

    for (CustomBlock block : MaterialData.getCustomBlocks()) {
      if (block.getBlockDesign() != null) {
        String texture = block.getBlockDesign().getTextureURL();
        String textureAddon = block.getBlockDesign().getTextureAddon();
        if (texture != null && textureAddon != null) {
          Texture tex = CustomTextureManager.getTextureFromUrl(textureAddon, texture);
          if (tex != null) {
            update(tex.getTextureID());
          }
        }
      }
    }
View Full Code Here

        for (CustomBlock block : MaterialData.getCustomBlocks()) {
          if (block.getBlockDesign() != null) {
            String texture = block.getBlockDesign().getTextureURL();
            String textureAddon = block.getBlockDesign().getTextureAddon();
            if (texture != null && textureAddon != null) {
              Texture tex = CustomTextureManager.getTextureFromUrl(textureAddon, texture);
              if (tex != null) {
                onTick(tex.getTextureID(), targetFade, currentFade);
              }
            }
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.opengl.Texture

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.