javax.media.j3d
Class TextureRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeComponentRetained
              extended by javax.media.j3d.TextureRetained
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Texture2DRetained, Texture3DRetained, TextureCubeMapRetained

abstract class TextureRetained
extends NodeComponentRetained

The Texture object is a component object of an Appearance object that defines the texture properties used when texture mapping is enabled. Texture object is an abstract class and all texture objects must be created as either a Texture2D object or a Texture3D object.


Field Summary
(package private)  float anisotropicFilterDegree
           
(package private)  int anisotropicFilterMode
           
(package private) static int BASE_LEVEL_CHANGED
           
(package private)  int baseLevel
           
(package private)  Color4f boundaryColor
           
(package private)  int boundaryModeS
           
(package private)  int boundaryModeT
           
(package private)  int boundaryWidth
           
(package private) static int COLOR_CHANGED
           
(package private)  boolean enable
           
(package private) static int ENABLE_CHANGED
           
(package private)  float[] filter4FuncPts
           
(package private)  int format
           
(package private)  int height
           
(package private) static int IMAGE_CHANGED
           
(package private)  ImageComponentRetained[][] images
           
(package private) static int IMAGES_CHANGED
           
(package private)  java.util.ArrayList[][] imageUpdateInfo
           
(package private)  int[] imageUpdatePruneMask
           
(package private)  boolean isAlphaNeedUpdate
           
(package private)  int isDirty
           
(package private) static int LOD_OFFSET_CHANGED
           
(package private)  Point3f lodOffset
           
(package private) static int MAG_FILTER
           
(package private)  int magFilter
           
(package private) static int MAX_LEVEL_CHANGED
           
(package private) static int MAX_LOD_CHANGED
           
(package private)  int maximumLevel
           
(package private)  float maximumLod
           
(package private)  int maxLevels
           
private  int maxMipMapLevels
           
(package private) static int MIN_FILTER
           
(package private) static int MIN_LOD_CHANGED
           
(package private)  int minFilter
           
(package private)  float minimumLod
           
(package private)  int mipmapMode
           
(package private)  int numFaces
           
(package private)  int numSharpenTextureFuncPts
           
(package private)  int objectId
           
(package private)  int resourceCreationMask
           
(package private)  int resourceInReloadList
           
(package private)  java.lang.Object resourceLock
           
(package private)  int resourceLodUpdatedMask
           
(package private)  int resourceUpdatedMask
           
(package private)  float[] sharpenTextureFuncPts
           
(package private) static int STATE_CHANGED
           
private  int texTimestamp
           
private  java.util.HashMap<RenderBin,java.lang.Integer> textureBinRefCount
           
(package private) static int UPDATE_IMAGE
           
private  boolean useAsRaster
           
(package private)  boolean userSpecifiedEnable
           
(package private)  int width
           
private  boolean widthOrHeightIsNPOT
           
 
Fields inherited from class javax.media.j3d.NodeComponentRetained
changedFrequent, compChanged, duplicateOnCloneTree, mirror, refCnt, refCount, users
 
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source
 
Fields inherited from class javax.media.j3d.IndexedObject
listIdx
 
Constructor Summary
TextureRetained()
           
 
Method Summary
(package private)  void addImageUpdateInfo(int level, int face, ImageComponentUpdateInfo arg)
          addImageUpdateInfo(int level) is to update a particular level.
(package private)  void bindTexture(Canvas3D cv)
           
(package private)  void bindTexture(Context ctx, int objectId, boolean enable)
           
(package private)  void checkImageSize(int level, ImageComponent image)
           
(package private)  void checkSizes(ImageComponentRetained[] images)
           
(package private)  void clearLive(int refCount)
           
(package private)  void createMirrorObject()
           
(package private)  void decTextureBinRefCount(TextureBin tb)
           
(package private)  void freeTextureId(int id)
           
(package private)  float getAnisotropicFilterDegree()
           
(package private)  int getAnisotropicFilterMode()
           
(package private)  int getBaseLevel()
           
(package private)  void getBoundaryColor(Color4f boundaryColor)
          Retrieves the texture boundary color for this texture object.
(package private)  int getBoundaryModeS()
          Retrieves the boundary mode for the S coordinate.
(package private)  int getBoundaryModeT()
          Retrieves the boundary mode for the T coordinate.
(package private)  int getBoundaryWidth()
          Retrieves the boundary width.
(package private)  boolean getEnable()
          Retrieves the state of the texture enable flag.
(package private)  float[] getFilter4Func()
           
(package private)  void getFilter4Func(float[] weights)
           
(package private)  int getFilter4FuncPointsCount()
           
(package private)  int getFormat()
           
(package private)  int getHeight()
           
(package private)  ImageComponent getImage(int level)
          Gets a specified mipmap level.
(package private)  ImageComponent[] getImages()
           
(package private)  void getLodOffset(Tuple3f offset)
           
(package private)  int getMagFilter()
          Retrieves the magnification filter.
(package private)  int getMaximumLevel()
           
(package private)  float getMaximumLOD()
           
(package private)  int getMinFilter()
          Retrieves the minification filter.
(package private)  float getMinimumLOD()
           
(package private)  int getMipMapMode()
          Retrieves current mipmap mode.
(package private)  float[] getSharpenTextureFunc()
          internal method only -- returns internal function points
(package private)  void getSharpenTextureFunc(float[] lod, float[] pts)
          Copies the array of sharpen texture LOD function points into the specified arrays
(package private)  void getSharpenTextureFunc(Point2f[] pts)
           
(package private)  int getSharpenTextureFuncPointsCount()
          Get number of points in the sharpen texture LOD function
(package private)  int getTextureBinRefCount(TextureBin tb)
           
(package private)  int getTextureId()
           
(package private)  int getWidth()
           
(package private)  void handleFrequencyChange(int bit)
           
(package private)  void incTextureBinRefCount(TextureBin tb)
           
(package private)  void initAnisotropicFilterDegree(float degree)
           
(package private)  void initAnisotropicFilterMode(int mode)
          Set Anisotropic Filter
(package private)  void initBaseLevel(int level)
           
(package private)  void initBoundaryColor(Color4f boundaryColor)
          Sets the texture boundary color for this texture object.
(package private)  void initBoundaryColor(float r, float g, float b, float a)
          Sets the texture boundary color for this texture object.
(package private)  void initBoundaryModeS(int boundaryModeS)
          Sets the boundary mode for the S coordinate in this texture object.
(package private)  void initBoundaryModeT(int boundaryModeT)
          Sets the boundary mode for the T coordinate in this texture object.
(package private)  void initEnable(boolean state)
          Enables or disables texture mapping for this appearance component object.
(package private)  void initFilter4Func(float[] weights)
           
(package private)  void initialize(int format, int width, int widLevels, int height, int heiLevels, int mipmapMode, int boundaryWidth)
           
(package private)  void initImage(int level, ImageComponent image)
          Sets a specified mipmap level.
(package private)  void initImages(ImageComponent[] images)
           
(package private)  void initLodOffset(float s, float t, float r)
           
(package private)  void initMagFilter(int magFilter)
          Sets the magnification filter function.
(package private)  void initMaximumLevel(int level)
           
(package private)  void initMaximumLOD(float lod)
           
(package private)  void initMinFilter(int minFilter)
          Sets the minification filter function.
(package private)  void initMinimumLOD(float lod)
           
(package private)  void initMipMapMode(int mipmapMode)
          Sets mipmap mode for texture mapping for this texture object.
(package private)  void initMirrorObject()
          Initializes a mirror object, point the mirror object to the retained object if the object is not editable
(package private)  void initSharpenTextureFunc(float[] pts)
           
(package private)  void initSharpenTextureFunc(float[] lod, float[] pts)
          Set Sharpen Texture function
(package private)  void initSharpenTextureFunc(Point2f[] pts)
           
private  boolean isEnabled(Canvas3D cv)
           
private static boolean isPowerOfTwo(int val)
           
(package private)  boolean isUseAsRaster()
           
(package private)  void notifyImageComponentImageChanged(ImageComponentRetained image, ImageComponentUpdateInfo value)
           
(package private)  int numMipMapLevels()
           
(package private)  void pruneImageUpdateInfo()
          Go through the image update info list and remove those that are already done by all the resources
(package private)  void reloadTexture(Canvas3D cv)
           
(package private)  void reloadTextureImage(Canvas3D cv, int face, int level, ImageComponentRetained image, int numLevels)
          reloadTextureImage is used to load a particular level of image This method needs to take care of RenderedImage as well as BufferedImage
(package private)  void reloadTextureSharedContext(Canvas3D cv)
          reloadTextureSharedContext is called to reload texture on a shared context.
(package private)  void reloadTextureSubImage(Canvas3D cv, int face, int level, ImageComponentUpdateInfo info, ImageComponentRetained image)
          update a subregion of the texture image This method needs to take care of RenderedImage as well as BufferedImage
(package private)  void sendMessage(int attrMask, java.lang.Object attr)
           
(package private)  void setBaseLevel(int level)
           
(package private)  void setEnable(boolean state)
          Enables or disables texture mapping for this appearance component object and sends a message notifying the interested structures of the change.
(package private)  void setImage(int level, ImageComponent image)
           
(package private)  void setImages(ImageComponent[] images)
           
(package private)  void setLive(boolean backgroundGroup, int refCount)
           
(package private)  void setLodOffset(float s, float t, float r)
           
(package private)  void setMaximumLevel(int level)
           
(package private)  void setMaximumLOD(float lod)
           
(package private)  void setMinimumLOD(float lod)
           
private  void setTextureBinRefCount(TextureBin tb, int refCount)
           
(package private)  void setUseAsRaster(boolean useAsRaster)
           
(package private)  void updateMirrorObject(int component, java.lang.Object value)
          Update the "component" field of the mirror object with the given "value"
(package private)  void updateNative(Canvas3D cv)
          updateNative is called while traversing the RenderBin to update the texture state
(package private)  void updateResourceCreationMask()
           
(package private)  void updateTexture(Canvas3D cv, int resourceBit)
           
(package private)  void updateTextureAnisotropicFilter(Context ctx, float degree)
           
(package private)  void updateTextureBoundary(Canvas3D cv)
           
(package private)  void updateTextureBoundary(Context ctx, int boundaryModeS, int boundaryModeT, float boundaryRed, float boundaryGreen, float boundaryBlue, float boundaryAlpha)
           
(package private)  void updateTextureDimensions(Canvas3D cv)
          load level 0 explicitly with null pointer to enable mipmapping when level 0 is not the base level
(package private)  void updateTextureFields(Canvas3D cv)
           
(package private)  void updateTextureFilter4Func(Context ctx, int numFilter4FuncPts, float[] filter4FuncPts)
           
(package private)  void updateTextureFilterModes(Context ctx, int minFilter, int magFilter)
           
(package private)  void updateTextureImage(Canvas3D cv, int face, int numLevels, int level, int textureFormat, int imageFormat, int width, int height, int boundaryWidth, int imageDataType, java.lang.Object data)
           
(package private)  void updateTextureLOD(Canvas3D cv)
           
(package private)  void updateTextureLodOffset(Context ctx, float lodOffsetX, float lodOffsetY, float lodOffsetZ)
           
(package private)  void updateTextureLodRange(Context ctx, int baseLevel, int maximumLevel, float minimumLod, float maximumLod)
           
(package private)  void updateTextureSharpenFunc(Context ctx, int numSharpenTextureFuncPts, float[] sharpenTextureFuncPts)
           
(package private)  void updateTextureSubImage(Canvas3D cv, int face, int level, int xoffset, int yoffset, int textureFormat, int imageFormat, int imgXOffset, int imgYOffset, int tilew, int width, int height, int imageDataType, java.lang.Object data)
           
(package private)  boolean useAutoMipMapGeneration(Canvas3D cv)
           
(package private)  void validate()
           
 
Methods inherited from class javax.media.j3d.NodeComponentRetained
addAMirrorUser, addUser, clone, copyMirrorUsers, decRefCnt, doSetLive, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, notifyUsers, removeAMirrorUser, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, setFrequencyChangeMask, setInImmCtx
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, compile, doSetLive, doSetLive, getSource, getVirtualUniverse, isInSetLive, isStatic, markAsLive, merge, mergeTransform, setCompiled, setLive, setLive, setSource, traverse
 
Methods inherited from class javax.media.j3d.IndexedObject
getIdxUsed, incIdxUsed
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENABLE_CHANGED

static final int ENABLE_CHANGED
See Also:
Constant Field Values

COLOR_CHANGED

static final int COLOR_CHANGED
See Also:
Constant Field Values

IMAGE_CHANGED

static final int IMAGE_CHANGED
See Also:
Constant Field Values

STATE_CHANGED

static final int STATE_CHANGED
See Also:
Constant Field Values

UPDATE_IMAGE

static final int UPDATE_IMAGE
See Also:
Constant Field Values

IMAGES_CHANGED

static final int IMAGES_CHANGED
See Also:
Constant Field Values

BASE_LEVEL_CHANGED

static final int BASE_LEVEL_CHANGED
See Also:
Constant Field Values

MAX_LEVEL_CHANGED

static final int MAX_LEVEL_CHANGED
See Also:
Constant Field Values

MIN_LOD_CHANGED

static final int MIN_LOD_CHANGED
See Also:
Constant Field Values

MAX_LOD_CHANGED

static final int MAX_LOD_CHANGED
See Also:
Constant Field Values

LOD_OFFSET_CHANGED

static final int LOD_OFFSET_CHANGED
See Also:
Constant Field Values

MIN_FILTER

static final int MIN_FILTER
See Also:
Constant Field Values

MAG_FILTER

static final int MAG_FILTER
See Also:
Constant Field Values

boundaryWidth

int boundaryWidth

boundaryModeS

int boundaryModeS

boundaryModeT

int boundaryModeT

minFilter

int minFilter

magFilter

int magFilter

isDirty

int isDirty

boundaryColor

Color4f boundaryColor

objectId

int objectId

mipmapMode

int mipmapMode

format

int format

width

int width

height

int height

widthOrHeightIsNPOT

private boolean widthOrHeightIsNPOT

images

ImageComponentRetained[][] images

maxLevels

int maxLevels

maxMipMapLevels

private int maxMipMapLevels

numFaces

int numFaces

baseLevel

int baseLevel

maximumLevel

int maximumLevel

minimumLod

float minimumLod

maximumLod

float maximumLod

lodOffset

Point3f lodOffset

useAsRaster

private boolean useAsRaster

enable

boolean enable

userSpecifiedEnable

boolean userSpecifiedEnable

isAlphaNeedUpdate

boolean isAlphaNeedUpdate

numSharpenTextureFuncPts

int numSharpenTextureFuncPts

sharpenTextureFuncPts

float[] sharpenTextureFuncPts

filter4FuncPts

float[] filter4FuncPts

anisotropicFilterMode

int anisotropicFilterMode

anisotropicFilterDegree

float anisotropicFilterDegree

resourceCreationMask

int resourceCreationMask

resourceUpdatedMask

int resourceUpdatedMask

resourceLodUpdatedMask

int resourceLodUpdatedMask

resourceInReloadList

int resourceInReloadList

imageUpdateInfo

java.util.ArrayList[][] imageUpdateInfo

imageUpdatePruneMask

int[] imageUpdatePruneMask

textureBinRefCount

private java.util.HashMap<RenderBin,java.lang.Integer> textureBinRefCount

texTimestamp

private int texTimestamp

resourceLock

java.lang.Object resourceLock
Constructor Detail

TextureRetained

TextureRetained()
Method Detail

isPowerOfTwo

private static boolean isPowerOfTwo(int val)

initialize

void initialize(int format,
                int width,
                int widLevels,
                int height,
                int heiLevels,
                int mipmapMode,
                int boundaryWidth)

getFormat

final int getFormat()

getWidth

final int getWidth()

getHeight

final int getHeight()

numMipMapLevels

final int numMipMapLevels()

initBoundaryModeS

final void initBoundaryModeS(int boundaryModeS)
Sets the boundary mode for the S coordinate in this texture object.

Parameters:
boundaryModeS - the boundary mode for the S coordinate, one of: CLAMP or WRAP.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

getBoundaryModeS

final int getBoundaryModeS()
Retrieves the boundary mode for the S coordinate.

Returns:
the current boundary mode for the S coordinate.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

initBoundaryModeT

final void initBoundaryModeT(int boundaryModeT)
Sets the boundary mode for the T coordinate in this texture object.

Parameters:
boundaryModeT - the boundary mode for the T coordinate, one of: CLAMP or WRAP.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

getBoundaryModeT

final int getBoundaryModeT()
Retrieves the boundary mode for the T coordinate.

Returns:
the current boundary mode for the T coordinate.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

getBoundaryWidth

final int getBoundaryWidth()
Retrieves the boundary width.

Returns:
the boundary width of this texture.

initMinFilter

final void initMinFilter(int minFilter)
Sets the minification filter function. This function is used when the pixel being rendered maps to an area greater than one texel.

Parameters:
minFilter - the minification filter, one of: FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR, MULTI_LEVEL_POINT, MULTI_LEVEL_LINEAR.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

getMinFilter

final int getMinFilter()
Retrieves the minification filter.

Returns:
the current minification filter function.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

initMagFilter

final void initMagFilter(int magFilter)
Sets the magnification filter function. This function is used when the pixel being rendered maps to an area less than or equal to one texel.

Parameters:
magFilter - the magnification filter, one of: FASTEST, NICEST, BASE_LEVEL_POINT, or BASE_LEVEL_LINEAR.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

getMagFilter

final int getMagFilter()
Retrieves the magnification filter.

Returns:
the current magnification filter function.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

initImage

void initImage(int level,
               ImageComponent image)
Sets a specified mipmap level.

Parameters:
level - mipmap level to set: 0 is the base level
image - pixel array object containing the texture image
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.
java.lang.IllegalArgumentException - if an ImageComponent3D is used in a Texture2D or ImageComponent2D in Texture3D power of 2 OR invalid format/mipmapMode is specified.

checkImageSize

final void checkImageSize(int level,
                          ImageComponent image)

checkSizes

final void checkSizes(ImageComponentRetained[] images)

setImage

final void setImage(int level,
                    ImageComponent image)

initImages

void initImages(ImageComponent[] images)

setImages

final void setImages(ImageComponent[] images)

getImage

final ImageComponent getImage(int level)
Gets a specified mipmap level.

Parameters:
level - mipmap level to get: 0 is the base level
Returns:
the pixel array object containing the texture image
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

getImages

final ImageComponent[] getImages()

initMipMapMode

final void initMipMapMode(int mipmapMode)
Sets mipmap mode for texture mapping for this texture object.

Parameters:
mipMapMode - the new mipmap mode for this object. One of: BASE_LEVEL or MULTI_LEVEL_MIPMAP.
Throws:
RestrictedAccessException - if the method is called

getMipMapMode

final int getMipMapMode()
Retrieves current mipmap mode.

Returns:
current mipmap mode of this texture object.
Throws:
RestrictedAccessException - if the method is called

initEnable

final void initEnable(boolean state)
Enables or disables texture mapping for this appearance component object.

Parameters:
state - true or false to enable or disable texture mapping

setEnable

final void setEnable(boolean state)
Enables or disables texture mapping for this appearance component object and sends a message notifying the interested structures of the change.

Parameters:
state - true or false to enable or disable texture mapping

getEnable

final boolean getEnable()
Retrieves the state of the texture enable flag.

Returns:
true if texture mapping is enabled, false if texture mapping is disabled

initBaseLevel

final void initBaseLevel(int level)

setBaseLevel

final void setBaseLevel(int level)

getBaseLevel

final int getBaseLevel()

initMaximumLevel

final void initMaximumLevel(int level)

setMaximumLevel

final void setMaximumLevel(int level)

getMaximumLevel

final int getMaximumLevel()

initMinimumLOD

final void initMinimumLOD(float lod)

setMinimumLOD

final void setMinimumLOD(float lod)

getMinimumLOD

final float getMinimumLOD()

initMaximumLOD

final void initMaximumLOD(float lod)

setMaximumLOD

final void setMaximumLOD(float lod)

getMaximumLOD

final float getMaximumLOD()

initLodOffset

final void initLodOffset(float s,
                         float t,
                         float r)

setLodOffset

final void setLodOffset(float s,
                        float t,
                        float r)

getLodOffset

final void getLodOffset(Tuple3f offset)

initBoundaryColor

final void initBoundaryColor(Color4f boundaryColor)
Sets the texture boundary color for this texture object. The texture boundary color is used when boundaryModeS or boundaryModeT is set to CLAMP.

Parameters:
boundaryColor - the new texture boundary color.

initBoundaryColor

final void initBoundaryColor(float r,
                             float g,
                             float b,
                             float a)
Sets the texture boundary color for this texture object. The texture boundary color is used when boundaryModeS or boundaryModeT is set to CLAMP.

Parameters:
r - the red component of the color.
g - the green component of the color.
b - the blue component of the color.
a - the alpha component of the color.

getBoundaryColor

final void getBoundaryColor(Color4f boundaryColor)
Retrieves the texture boundary color for this texture object.

Parameters:
boundaryColor - the vector that will receive the current texture boundary color.

initAnisotropicFilterMode

final void initAnisotropicFilterMode(int mode)
Set Anisotropic Filter


getAnisotropicFilterMode

final int getAnisotropicFilterMode()

initAnisotropicFilterDegree

final void initAnisotropicFilterDegree(float degree)

getAnisotropicFilterDegree

final float getAnisotropicFilterDegree()

initSharpenTextureFunc

final void initSharpenTextureFunc(float[] lod,
                                  float[] pts)
Set Sharpen Texture function


initSharpenTextureFunc

final void initSharpenTextureFunc(Point2f[] pts)

initSharpenTextureFunc

final void initSharpenTextureFunc(float[] pts)

getSharpenTextureFuncPointsCount

final int getSharpenTextureFuncPointsCount()
Get number of points in the sharpen texture LOD function


getSharpenTextureFunc

final void getSharpenTextureFunc(float[] lod,
                                 float[] pts)
Copies the array of sharpen texture LOD function points into the specified arrays


getSharpenTextureFunc

final void getSharpenTextureFunc(Point2f[] pts)

initFilter4Func

final void initFilter4Func(float[] weights)

getFilter4FuncPointsCount

final int getFilter4FuncPointsCount()

getFilter4Func

final void getFilter4Func(float[] weights)

getSharpenTextureFunc

final float[] getSharpenTextureFunc()
internal method only -- returns internal function points


getFilter4Func

final float[] getFilter4Func()

setLive

void setLive(boolean backgroundGroup,
             int refCount)
Overrides:
setLive in class NodeComponentRetained

clearLive

void clearLive(int refCount)
Overrides:
clearLive in class NodeComponentRetained

bindTexture

void bindTexture(Context ctx,
                 int objectId,
                 boolean enable)

updateTextureBoundary

void updateTextureBoundary(Context ctx,
                           int boundaryModeS,
                           int boundaryModeT,
                           float boundaryRed,
                           float boundaryGreen,
                           float boundaryBlue,
                           float boundaryAlpha)

updateTextureFilterModes

void updateTextureFilterModes(Context ctx,
                              int minFilter,
                              int magFilter)

updateTextureSharpenFunc

void updateTextureSharpenFunc(Context ctx,
                              int numSharpenTextureFuncPts,
                              float[] sharpenTextureFuncPts)

updateTextureFilter4Func

void updateTextureFilter4Func(Context ctx,
                              int numFilter4FuncPts,
                              float[] filter4FuncPts)

updateTextureAnisotropicFilter

void updateTextureAnisotropicFilter(Context ctx,
                                    float degree)

updateTextureLodRange

void updateTextureLodRange(Context ctx,
                           int baseLevel,
                           int maximumLevel,
                           float minimumLod,
                           float maximumLod)

updateTextureLodOffset

void updateTextureLodOffset(Context ctx,
                            float lodOffsetX,
                            float lodOffsetY,
                            float lodOffsetZ)

getTextureId

int getTextureId()

freeTextureId

void freeTextureId(int id)

isEnabled

private boolean isEnabled(Canvas3D cv)

bindTexture

void bindTexture(Canvas3D cv)

updateTextureDimensions

void updateTextureDimensions(Canvas3D cv)
load level 0 explicitly with null pointer to enable mipmapping when level 0 is not the base level


updateTextureLOD

void updateTextureLOD(Canvas3D cv)

updateTextureBoundary

void updateTextureBoundary(Canvas3D cv)

updateTextureFields

void updateTextureFields(Canvas3D cv)

updateTextureImage

void updateTextureImage(Canvas3D cv,
                        int face,
                        int numLevels,
                        int level,
                        int textureFormat,
                        int imageFormat,
                        int width,
                        int height,
                        int boundaryWidth,
                        int imageDataType,
                        java.lang.Object data)

updateTextureSubImage

void updateTextureSubImage(Canvas3D cv,
                           int face,
                           int level,
                           int xoffset,
                           int yoffset,
                           int textureFormat,
                           int imageFormat,
                           int imgXOffset,
                           int imgYOffset,
                           int tilew,
                           int width,
                           int height,
                           int imageDataType,
                           java.lang.Object data)

reloadTextureImage

void reloadTextureImage(Canvas3D cv,
                        int face,
                        int level,
                        ImageComponentRetained image,
                        int numLevels)
reloadTextureImage is used to load a particular level of image This method needs to take care of RenderedImage as well as BufferedImage


reloadTextureSubImage

void reloadTextureSubImage(Canvas3D cv,
                           int face,
                           int level,
                           ImageComponentUpdateInfo info,
                           ImageComponentRetained image)
update a subregion of the texture image This method needs to take care of RenderedImage as well as BufferedImage


reloadTexture

void reloadTexture(Canvas3D cv)

updateTexture

void updateTexture(Canvas3D cv,
                   int resourceBit)

reloadTextureSharedContext

void reloadTextureSharedContext(Canvas3D cv)
reloadTextureSharedContext is called to reload texture on a shared context. It is invoked from the Renderer before traversing the RenderBin. The idea is to reload all necessary textures up front for all shared contexts in order to minimize the context switching overhead.


updateNative

void updateNative(Canvas3D cv)
updateNative is called while traversing the RenderBin to update the texture state


createMirrorObject

void createMirrorObject()
Overrides:
createMirrorObject in class NodeComponentRetained

initMirrorObject

void initMirrorObject()
Initializes a mirror object, point the mirror object to the retained object if the object is not editable

Overrides:
initMirrorObject in class NodeComponentRetained

useAutoMipMapGeneration

boolean useAutoMipMapGeneration(Canvas3D cv)

pruneImageUpdateInfo

void pruneImageUpdateInfo()
Go through the image update info list and remove those that are already done by all the resources


addImageUpdateInfo

void addImageUpdateInfo(int level,
                        int face,
                        ImageComponentUpdateInfo arg)
addImageUpdateInfo(int level) is to update a particular level. In this case, it supercedes all the subImage update for this level, and all those update info can be removed from the update list. Note: this method is called from mirror only


validate

void validate()

updateMirrorObject

void updateMirrorObject(int component,
                        java.lang.Object value)
Update the "component" field of the mirror object with the given "value"

Overrides:
updateMirrorObject in class NodeComponentRetained

notifyImageComponentImageChanged

void notifyImageComponentImageChanged(ImageComponentRetained image,
                                      ImageComponentUpdateInfo value)

updateResourceCreationMask

void updateResourceCreationMask()

incTextureBinRefCount

void incTextureBinRefCount(TextureBin tb)

decTextureBinRefCount

void decTextureBinRefCount(TextureBin tb)

sendMessage

final void sendMessage(int attrMask,
                       java.lang.Object attr)

handleFrequencyChange

void handleFrequencyChange(int bit)
Overrides:
handleFrequencyChange in class SceneGraphObjectRetained

setUseAsRaster

void setUseAsRaster(boolean useAsRaster)

isUseAsRaster

boolean isUseAsRaster()

getTextureBinRefCount

int getTextureBinRefCount(TextureBin tb)

setTextureBinRefCount

private void setTextureBinRefCount(TextureBin tb,
                                   int refCount)


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.