zombie.core.textures
Class TextureID

java.lang.Object
  extended by zombie.core.textures.TextureID
All Implemented Interfaces:
java.io.Serializable, IDestroyable

public class TextureID
extends java.lang.Object
implements IDestroyable, java.io.Serializable

See Also:
Serialized Form

Field Summary
static boolean FREE_MEMORY
           
static gnu.trove.map.hash.THashMap<java.lang.Integer,java.lang.String> TextureIDMap
           
static java.util.Stack<java.lang.Integer> TextureIDStack
           
static long totalGraphicMemory
           
static float totalMemUsed
           
static boolean USE_MIPMAP
           
static boolean UseFiltering
           
 
Constructor Summary
TextureID(java.io.BufferedInputStream b, java.lang.String path, boolean bDoMask)
           
TextureID(java.io.BufferedInputStream b, java.lang.String path, boolean bDoMask, Texture.PZFileformat format)
           
TextureID(ImageData image)
           
TextureID(int width, int height)
           
TextureID(java.lang.String path)
           
TextureID(java.lang.String pcx, int[] palette)
           
TextureID(java.lang.String path, int red, int green, int blue)
           
TextureID(java.lang.String pcx, java.lang.String palette)
           
 
Method Summary
 boolean bind()
          binds the current texture
 boolean bindalways()
           
 void destroy()
          destory the object
 void freeMemory()
          free memory space
 WrappedBuffer getData()
           
 ImageData getImageData()
           
 java.lang.String getPathFileName()
           
 boolean isDestroyed()
          returns if the object is destryed or not
 boolean isSolid()
           
 void setData(java.nio.ByteBuffer bdata)
          if the data is null will be free the memory from the RAM but not from the VRAM
 void setImageData(ImageData data)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_MIPMAP

public static boolean USE_MIPMAP

FREE_MEMORY

public static boolean FREE_MEMORY

TextureIDMap

public static gnu.trove.map.hash.THashMap<java.lang.Integer,java.lang.String> TextureIDMap

TextureIDStack

public static java.util.Stack<java.lang.Integer> TextureIDStack

totalGraphicMemory

public static long totalGraphicMemory

UseFiltering

public static boolean UseFiltering

totalMemUsed

public static float totalMemUsed
Constructor Detail

TextureID

public TextureID(int width,
                 int height)

TextureID

public TextureID(ImageData image)

TextureID

public TextureID(java.lang.String pcx,
                 java.lang.String palette)

TextureID

public TextureID(java.lang.String pcx,
                 int[] palette)

TextureID

public TextureID(java.lang.String path,
                 int red,
                 int green,
                 int blue)

TextureID

public TextureID(java.lang.String path)

TextureID

public TextureID(java.io.BufferedInputStream b,
                 java.lang.String path,
                 boolean bDoMask,
                 Texture.PZFileformat format)

TextureID

public TextureID(java.io.BufferedInputStream b,
                 java.lang.String path,
                 boolean bDoMask)
Method Detail

bind

public boolean bind()
binds the current texture


bindalways

public boolean bindalways()

destroy

public void destroy()
Description copied from interface: IDestroyable
destory the object

Specified by:
destroy in interface IDestroyable

freeMemory

public void freeMemory()
free memory space


getData

public WrappedBuffer getData()

getImageData

public ImageData getImageData()

getPathFileName

public java.lang.String getPathFileName()

isDestroyed

public boolean isDestroyed()
Description copied from interface: IDestroyable
returns if the object is destryed or not

Specified by:
isDestroyed in interface IDestroyable

isSolid

public boolean isSolid()

setData

public void setData(java.nio.ByteBuffer bdata)
if the data is null will be free the memory from the RAM but not from the VRAM


setImageData

public void setImageData(ImageData data)