org.xith3d.scenegraph
Class Texture2D

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.NodeComponent
          extended by org.xith3d.scenegraph.Texture
              extended by org.xith3d.scenegraph.Texture2D
All Implemented Interfaces:
org.jagatoo.datatypes.Enableable, org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.jagatoo.loaders.textures.AbstractTexture
Direct Known Subclasses:
ASCIITexture

public class Texture2D
extends Texture

Texture2D defines attributes that apply to .


Nested Class Summary
 
Nested classes/interfaces inherited from class org.xith3d.scenegraph.Texture
Texture.MipmapMode
 
Field Summary
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
Texture2D(org.jagatoo.opengl.enums.TextureFormat format)
          Constructs a new Texture2D object.
Texture2D(org.jagatoo.opengl.enums.TextureFormat format, int boundaryWidth)
          Constructs a new Texture2D object.
 
Method Summary
protected  void checkImageType(TextureImage image)
          This method is called by Texture.setImage(int, TextureImage).
 Texture2D cloneNodeComponent(boolean forceDuplicate)
          
static Texture2D createDrawTexture(org.jagatoo.opengl.enums.TextureFormat format, int width, int height)
           
static Texture2D createDrawTexture(org.jagatoo.opengl.enums.TextureFormat format, int width, int height, boolean useByteBuffer)
           
static Texture2D createDrawTexture(org.jagatoo.opengl.enums.TextureFormat format, int width, int height, boolean useByteBuffer, boolean yUp)
           
static Texture2D createDrawTexture(org.jagatoo.opengl.enums.TextureFormat format, int width, int height, boolean strechToPowerOfTwo, boolean useByteBuffer, boolean yUp)
           
static Texture2D createOfflineDrawTexture(org.jagatoo.opengl.enums.TextureFormat format, int width, int height)
           
static Texture2D createOfflineDrawTexture(org.jagatoo.opengl.enums.TextureFormat format, int width, int height, boolean useByteBuffer)
           
static Texture2D createOfflineDrawTexture(org.jagatoo.opengl.enums.TextureFormat format, int width, int height, boolean useByteBuffer, boolean yUp)
           
protected  void duplicateNodeComponent(NodeComponent original, boolean forceDuplicate)
          
 TextureImage2D getImage0()
           
 Texture2DCanvas getTextureCanvas()
           
 boolean hasTextureCanvas()
           
 boolean hasUpdateList()
           
 boolean isDrawTexture()
          Was created as draw texture?
 void setHasUpdateList(boolean b)
          This method must be called after the TextureImage2D#update(java.awt.Rectangle) method to make the renderer apply the update list to the graphics card.
 void setSizeChanged()
           
 
Methods inherited from class org.xith3d.scenegraph.Texture
addImage, enableAutoFreeLocalData, finalize, freeOpenGLResources, getBoundaryColor, getBoundaryColor, getBoundaryModeS, getBoundaryModeT, getBoundaryWidth, getCacheKey, getDefaultFilter, getFilter, getFormat, getHeight, getImage, getImagesCount, getMipMapMode, getOpenGLReferences, getOriginalHeight, getOriginalSize, getOriginalWidth, getResourceName, getSize, getStateId, getType, getWidth, hasSizeChanged, isDirty, isEnabled, isMarkedAsLocalDataToBeFreed, removeFromCache, setBoundaryColor, setBoundaryColor, setBoundaryModeS, setBoundaryModes, setBoundaryModeT, setBoundaryWidth, setCacheKey, setDefaultFilter, setEnabled, setFilter, setImage, setImage, setResourceName, toString
 
Methods inherited from class org.xith3d.scenegraph.NodeComponent
freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jagatoo.loaders.textures.AbstractTexture
getName, setName
 

Constructor Detail

Texture2D

public Texture2D(org.jagatoo.opengl.enums.TextureFormat format)
Constructs a new Texture2D object.

Parameters:
format -

Texture2D

public Texture2D(org.jagatoo.opengl.enums.TextureFormat format,
                 int boundaryWidth)
Constructs a new Texture2D object.

Parameters:
format -
boundaryWidth -
Method Detail

isDrawTexture

public final boolean isDrawTexture()
Was created as draw texture?

Returns:
Was created as draw texture?

setHasUpdateList

public void setHasUpdateList(boolean b)
This method must be called after the TextureImage2D#update(java.awt.Rectangle) method to make the renderer apply the update list to the graphics card.

Parameters:
b -

hasUpdateList

public final boolean hasUpdateList()

getImage0

public final TextureImage2D getImage0()
Returns:
the first

hasTextureCanvas

public final boolean hasTextureCanvas()

getTextureCanvas

public Texture2DCanvas getTextureCanvas()

setSizeChanged

public void setSizeChanged()
Overrides:
setSizeChanged in class Texture

checkImageType

protected void checkImageType(TextureImage image)
This method is called by Texture.setImage(int, TextureImage). It checks the added image's type and throws an exception, if the type is not accepted.

Specified by:
checkImageType in class Texture

duplicateNodeComponent

protected void duplicateNodeComponent(NodeComponent original,
                                      boolean forceDuplicate)

Overrides:
duplicateNodeComponent in class Texture

cloneNodeComponent

public Texture2D cloneNodeComponent(boolean forceDuplicate)

Specified by:
cloneNodeComponent in class NodeComponent

createDrawTexture

public static Texture2D createDrawTexture(org.jagatoo.opengl.enums.TextureFormat format,
                                          int width,
                                          int height,
                                          boolean strechToPowerOfTwo,
                                          boolean useByteBuffer,
                                          boolean yUp)

createDrawTexture

public static Texture2D createDrawTexture(org.jagatoo.opengl.enums.TextureFormat format,
                                          int width,
                                          int height,
                                          boolean useByteBuffer,
                                          boolean yUp)

createDrawTexture

public static Texture2D createDrawTexture(org.jagatoo.opengl.enums.TextureFormat format,
                                          int width,
                                          int height,
                                          boolean useByteBuffer)

createDrawTexture

public static Texture2D createDrawTexture(org.jagatoo.opengl.enums.TextureFormat format,
                                          int width,
                                          int height)

createOfflineDrawTexture

public static Texture2D createOfflineDrawTexture(org.jagatoo.opengl.enums.TextureFormat format,
                                                 int width,
                                                 int height,
                                                 boolean useByteBuffer,
                                                 boolean yUp)

createOfflineDrawTexture

public static Texture2D createOfflineDrawTexture(org.jagatoo.opengl.enums.TextureFormat format,
                                                 int width,
                                                 int height,
                                                 boolean useByteBuffer)

createOfflineDrawTexture

public static Texture2D createOfflineDrawTexture(org.jagatoo.opengl.enums.TextureFormat format,
                                                 int width,
                                                 int height)