org.jagatoo.loaders.textures
Class TextureFactory

java.lang.Object
  extended by org.jagatoo.loaders.textures.TextureFactory

public abstract class TextureFactory
extends java.lang.Object

The TextureFactory creates instances of AbstractTextureImage.


Constructor Summary
TextureFactory()
           
 
Method Summary
 AbstractTexture createTexture(boolean withAlphaChannel)
          Creates a new 2D-AbstractTexture instance and chooses AbstractTexture.Format#RGB or AbstractTexture.Format#RGBA depending on the withAlphachannel parameter.
 AbstractTexture createTexture(TextureFormat format)
          Creates a new 2D-AbstractTexture instance.
 AbstractTexture createTexture(TextureImageFormat imageFormat)
          Creates a new 2D-AbstractTexture instance.
 AbstractTexture createTexture(TextureType type, TextureFormat format)
          Creates a new AbstractTexture instance.
 AbstractTextureImage createTextureImage(int width, int height, int orgWidth, int orgHeight, int pixelSize)
          Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.
 AbstractTextureImage createTextureImage(int width, int height, int orgWidth, int orgHeight, int pixelSize, boolean withAlphaChannel)
          Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.
 AbstractTextureImage createTextureImage(int width, int height, int orgWidth, int orgHeight, int pixelSize, int dataSizeHint, TextureImageInternalFormat internalFormat, TextureImageFormat format)
          Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.
 AbstractTextureImage createTextureImage(int width, int height, int orgWidth, int orgHeight, int pixelSize, TextureImageFormat format)
          Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.
 AbstractTextureImage createTextureImage(int width, int height, int orgWidth, int orgHeight, int pixelSize, TextureImageInternalFormat internalFormat, TextureImageFormat format)
          Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.
protected abstract  AbstractTextureImage createTextureImageImpl(int width, int height, int orgWidth, int orgHeight, int pixelSize, int dataSize, TextureImageInternalFormat internalFormat, TextureImageFormat format)
          Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.
protected abstract  AbstractTexture createTextureImpl(TextureType type, TextureFormat format)
          Creates a new AbstractTexture instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextureFactory

public TextureFactory()
Method Detail

createTextureImageImpl

protected abstract AbstractTextureImage createTextureImageImpl(int width,
                                                               int height,
                                                               int orgWidth,
                                                               int orgHeight,
                                                               int pixelSize,
                                                               int dataSize,
                                                               TextureImageInternalFormat internalFormat,
                                                               TextureImageFormat format)
Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.

Parameters:
width -
height -
orgWidth -
orgHeight -
pixelSize -
dataSize -
format -
internalFormat -
Returns:
the new AbstractTextureImage.

createTextureImage

public final AbstractTextureImage createTextureImage(int width,
                                                     int height,
                                                     int orgWidth,
                                                     int orgHeight,
                                                     int pixelSize,
                                                     int dataSizeHint,
                                                     TextureImageInternalFormat internalFormat,
                                                     TextureImageFormat format)
Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.

Parameters:
width -
height -
orgWidth -
orgHeight -
pixelSize -
dataSizeHint - if -1, the data-size is auto-calculated.
format -
internalFormat -
Returns:
the new AbstractTextureImage.

createTextureImage

public final AbstractTextureImage createTextureImage(int width,
                                                     int height,
                                                     int orgWidth,
                                                     int orgHeight,
                                                     int pixelSize,
                                                     TextureImageInternalFormat internalFormat,
                                                     TextureImageFormat format)
Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.

Parameters:
width -
height -
orgWidth -
orgHeight -
pixelSize -
format -
internalFormat -
Returns:
the new AbstractTextureImage.

createTextureImage

public final AbstractTextureImage createTextureImage(int width,
                                                     int height,
                                                     int orgWidth,
                                                     int orgHeight,
                                                     int pixelSize,
                                                     TextureImageFormat format)
Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.

Parameters:
width -
height -
orgWidth -
orgHeight -
pixelSize -
format -
Returns:
the new AbstractTextureImage.

createTextureImage

public final AbstractTextureImage createTextureImage(int width,
                                                     int height,
                                                     int orgWidth,
                                                     int orgHeight,
                                                     int pixelSize,
                                                     boolean withAlphaChannel)
Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.

Parameters:
width -
height -
orgWidth -
orgHeight -
pixelSize -
withAlphaChannel -
Returns:
the new AbstractTextureImage.

createTextureImage

public final AbstractTextureImage createTextureImage(int width,
                                                     int height,
                                                     int orgWidth,
                                                     int orgHeight,
                                                     int pixelSize)
Creates an instance of AbstractTextureImage with an initialized ByteBuffer, which is returned by the AbstractTextureImage.getDataBuffer() method.

Parameters:
width -
height -
orgWidth -
orgHeight -
pixelSize -
Returns:
the new AbstractTextureImage.

createTextureImpl

protected abstract AbstractTexture createTextureImpl(TextureType type,
                                                     TextureFormat format)
Creates a new AbstractTexture instance.

Parameters:
type -
format -
Returns:
the new texture.

createTexture

public final AbstractTexture createTexture(TextureType type,
                                           TextureFormat format)
Creates a new AbstractTexture instance.

Parameters:
type -
format -
Returns:
the new texture.

createTexture

public final AbstractTexture createTexture(TextureFormat format)
Creates a new 2D-AbstractTexture instance.

Parameters:
format -
Returns:
the new texture.

createTexture

public final AbstractTexture createTexture(TextureImageFormat imageFormat)
Creates a new 2D-AbstractTexture instance.

Parameters:
format -
Returns:
the new texture.

createTexture

public final AbstractTexture createTexture(boolean withAlphaChannel)
Creates a new 2D-AbstractTexture instance and chooses AbstractTexture.Format#RGB or AbstractTexture.Format#RGBA depending on the withAlphachannel parameter.

Parameters:
withAlphaChannel -
Returns:
the new texture.