|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.Texture
public class Texture
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ogre4j.IResource |
|---|
IResource.IListener, IResource.IListenerList |
| Field Summary |
|---|
| Fields inherited from class org.xbig.base.NativeObject |
|---|
deleted, object, remote |
| Constructor Summary | |
|---|---|
|
Texture(InstancePointer p)
This constructor is public for internal useage only! |
protected |
Texture(InstancePointer p,
boolean remote)
Creates a Java wrapper object for an existing C++ object. |
|
Texture(WithoutNativeObject val)
Allows creation of Java objects without C++ objects. |
| Method Summary | |
|---|---|
void |
_dirtyState()
Manually mark the state of this resource as having been changed. |
void |
_fireBackgroundLoadingComplete()
Firing of background loading complete event |
void |
_fireBackgroundPreparingComplete()
Firing of background preparing complete event |
void |
_loadImages(IConstImagePtrList images)
Internal method to load the texture from a set of images. |
void |
_notifyOrigin(java.lang.String origin)
|
void |
addListener(IResource.IListener lis)
Register a listener on this resource. |
void |
changeGroupOwnership(java.lang.String newGroup)
Change the resource group ownership of a . |
static void |
cleanupDictionary()
Cleans up the static 'msDictionary' required to reset , otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the implementers (e.g. ) initializes. |
void |
copyParametersTo(IStringInterface dest)
Method for copying this object's parameters to another object. |
void |
copyToTexture(ITexturePtr target)
Copies (and maybe scales to fit) the contents of this texture to another texture. |
void |
createInternalResources()
Creates the internal texture resources for this texture. |
void |
delete()
Deletes the corresponding C++ object. |
void |
escalateLoading()
Escalates the loading of a background loaded resource. |
void |
finalize()
|
void |
freeInternalResources()
Frees internal texture resources for this texture. |
void |
getBuffer(IHardwarePixelBufferSharedPtr returnValue,
int face,
int mipmap)
Return hardware pixel buffer for a surface. |
IResourceManager |
getCreator()
|
int |
getDepth()
Returns the depth of the texture (only applicable for 3D textures). |
int |
getDesiredFloatBitDepth()
gets desired bit depth for float pixel format textures. |
PixelFormat |
getDesiredFormat()
Returns the desired pixel format for the texture surface. |
int |
getDesiredIntegerBitDepth()
gets desired bit depth for integer pixel format textures. |
PixelFormat |
getFormat()
Returns the pixel format for the texture surface. |
long |
getFSAA()
Get the level of multisample AA to be used if this texture is a rendertarget. |
float |
getGamma()
Returns the gamma adjustment factor applied to this texture on loading. |
java.lang.String |
getGroup()
|
long |
getHandle()
|
int |
getHeight()
Returns the height of the texture. |
Resource.LoadingState |
getLoadingState()
Returns the current loading state. |
boolean |
getMipmapsHardwareGenerated()
Are mipmaps hardware generated? |
java.lang.String |
getName()
Gets resource name. |
int |
getNumFaces()
Return the number of faces this texture has. |
int |
getNumMipmaps()
Gets the number of mipmaps to be used for this texture. |
java.lang.String |
getOrigin()
Get the origin of this resource, e.g. a script file name. |
IParamDictionary |
getParamDictionary_const()
|
IParamDictionary |
getParamDictionary()
Retrieves the parameter dictionary for this class. |
java.lang.String |
getParameter(java.lang.String name)
Generic parameter retrieval method. |
IParameterList |
getParameters()
Retrieves a list of parameters valid for this object. |
int |
getSize()
Retrieves info about the size of the resource. |
int |
getSrcDepth()
Returns the original depth of the input texture (only applicable for 3D textures). |
PixelFormat |
getSrcFormat()
Returns the pixel format of the original input texture (may differ due to hardware requirements and pixel format convertion). |
int |
getSrcHeight()
Returns the height of the original input texture (may differ due to hardware requirements). |
int |
getSrcWidth()
Returns the width of the original input texture (may differ due to hardware requirements). |
int |
getStateCount()
Returns the number of times this resource has changed state, which generally means the number of times it has been loaded. |
TextureType |
getTextureType()
Gets the type of texture |
boolean |
getTreatLuminanceAsAlpha()
Gets whether luminace pixel format will treated as alpha format when load this texture. |
int |
getUsage()
Returns the TextureUsage indentifier for this |
int |
getWidth()
Returns the width of the texture. |
boolean |
hasAlpha()
Returns true if the texture has an alpha layer. |
boolean |
isBackgroundLoaded()
Returns whether this has been earmarked for background loading. |
boolean |
isHardwareGammaEnabled()
Gets whether this texture will be set up so that on sampling it, hardware gamma correction is applied. |
boolean |
isLoaded()
Returns true if the has been loaded, false otherwise. |
boolean |
isLoading()
Returns whether the resource is currently in the process of background loading. |
boolean |
isManuallyLoaded()
Is this resource manually loaded? |
boolean |
isPrepared()
Returns true if the has been prepared, false otherwise. |
boolean |
isReloadable()
Returns true if the is reloadable, false otherwise. |
void |
load(boolean backgroundThread)
Loads the resource, if it is not already. |
void |
loadImage(IImage img)
Loads the data from an image. |
void |
loadRawData(IDataStreamPtr stream,
int uWidth,
int uHeight,
PixelFormat eFormat)
Loads the data from a raw stream. |
void |
prepare()
Prepares the resource for load, if it is not already. |
void |
reload()
Reloads the resource, if it is already loaded. |
void |
removeListener(IResource.IListener lis)
Remove a listener on this resource. |
void |
setBackgroundLoaded(boolean bl)
Tells the resource whether it is background loaded or not. |
void |
setDepth(int d)
Set the depth of the texture (only applicable for 3D textures); ; can only do this before ; |
void |
setDesiredBitDepths(int integerBits,
int floatBits)
Sets desired bit depth for integer and float pixel format. |
void |
setDesiredFloatBitDepth(int bits)
Sets desired bit depth for float pixel format textures. |
void |
setDesiredIntegerBitDepth(int bits)
Sets desired bit depth for integer pixel format textures. |
void |
setFormat(PixelFormat pf)
Sets the pixel format for the texture surface; can only be set before . |
void |
setFSAA(long fsaa)
Set the level of multisample AA to be used if this texture is a rendertarget. |
void |
setGamma(float g)
Sets the gamma adjustment factor applied to this texture on loading the data. |
void |
setHardwareGammaEnabled(boolean enabled)
Sets whether this texture will be set up so that on sampling it, hardware gamma correction is applied. |
void |
setHeight(int h)
Set the height of the texture; can only do this before ; |
void |
setNumMipmaps(int num)
Sets the number of mipmaps to be used for this texture. |
boolean |
setParameter(java.lang.String name,
java.lang.String value)
Generic parameter setting method. |
void |
setParameterList(INameValuePairList paramList)
Generic multiple parameter setting method. |
void |
setTextureType(TextureType ttype)
Sets the type of texture; can only be changed before |
void |
setTreatLuminanceAsAlpha(boolean asAlpha)
Sets whether luminace pixel format will treated as alpha format when load this texture. |
void |
setUsage(int u)
Sets the TextureUsage indentifier for this ; only useful before |
void |
setWidth(int w)
Set the width of the texture; can only do this before ; |
void |
touch()
'Touches' the resource to indicate it has been used. |
void |
unload()
Unloads the resource; this is not permanent, the resource can be reloaded later if required. |
| Methods inherited from class org.xbig.base.NativeObject |
|---|
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xbig.base.INativeObject |
|---|
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer |
| Constructor Detail |
|---|
public Texture(InstancePointer p)
protected Texture(InstancePointer p,
boolean remote)
public Texture(WithoutNativeObject val)
WithoutNativeObject,
INativeObject.disconnectFromNativeObject()| Method Detail |
|---|
public void delete()
INativeObjectSubclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!
delete in interface INativeObjectdelete in class NativeObject#remotepublic void finalize()
finalize in class NativeObjectpublic void setTextureType(TextureType ttype)
setTextureType in interface ITexturepublic TextureType getTextureType()
getTextureType in interface ITexturepublic int getNumMipmaps()
getNumMipmaps in interface ITexturepublic void setNumMipmaps(int num)
setNumMipmaps in interface ITexturepublic boolean getMipmapsHardwareGenerated()
getMipmapsHardwareGenerated in interface ITexturepublic float getGamma()
getGamma in interface ITexturepublic void setGamma(float g)
setGamma in interface ITexturepublic void setHardwareGammaEnabled(boolean enabled)
setHardwareGammaEnabled in interface ITexturepublic boolean isHardwareGammaEnabled()
isHardwareGammaEnabled in interface ITexturepublic void setFSAA(long fsaa)
setFSAA in interface ITexturepublic long getFSAA()
getFSAA in interface ITexturepublic int getHeight()
getHeight in interface ITexturepublic int getWidth()
getWidth in interface ITexturepublic int getDepth()
getDepth in interface ITexturepublic int getSrcHeight()
getSrcHeight in interface ITexturepublic int getSrcWidth()
getSrcWidth in interface ITexturepublic int getSrcDepth()
getSrcDepth in interface ITexturepublic void setHeight(int h)
setHeight in interface ITexturepublic void setWidth(int w)
setWidth in interface ITexturepublic void setDepth(int d)
setDepth in interface ITexturepublic int getUsage()
getUsage in interface ITexturepublic void setUsage(int u)
setUsage in interface ITexturepublic void createInternalResources()
createInternalResources in interface ITexturepublic void freeInternalResources()
freeInternalResources in interface ITexturepublic void copyToTexture(ITexturePtr target)
copyToTexture in interface ITexturepublic void loadImage(IImage img)
loadImage in interface ITexture
public void loadRawData(IDataStreamPtr stream,
int uWidth,
int uHeight,
PixelFormat eFormat)
loadRawData in interface ITexturepublic void _loadImages(IConstImagePtrList images)
_loadImages in interface ITexturepublic PixelFormat getFormat()
getFormat in interface ITexturepublic PixelFormat getDesiredFormat()
getDesiredFormat in interface ITexturepublic PixelFormat getSrcFormat()
getSrcFormat in interface ITexturepublic void setFormat(PixelFormat pf)
setFormat in interface ITexturepublic boolean hasAlpha()
hasAlpha in interface ITexturepublic void setDesiredIntegerBitDepth(int bits)
setDesiredIntegerBitDepth in interface ITexturepublic int getDesiredIntegerBitDepth()
getDesiredIntegerBitDepth in interface ITexturepublic void setDesiredFloatBitDepth(int bits)
setDesiredFloatBitDepth in interface ITexturepublic int getDesiredFloatBitDepth()
getDesiredFloatBitDepth in interface ITexture
public void setDesiredBitDepths(int integerBits,
int floatBits)
setDesiredBitDepths in interface ITexturepublic void setTreatLuminanceAsAlpha(boolean asAlpha)
setTreatLuminanceAsAlpha in interface ITexturepublic boolean getTreatLuminanceAsAlpha()
getTreatLuminanceAsAlpha in interface ITexturepublic int getNumFaces()
getNumFaces in interface ITexture
public void getBuffer(IHardwarePixelBufferSharedPtr returnValue,
int face,
int mipmap)
getBuffer in interface ITexturepublic void prepare()
prepare in interface IResourcepublic void load(boolean backgroundThread)
load in interface IResourcepublic void reload()
reload in interface IResourcepublic boolean isReloadable()
isReloadable in interface IResourcepublic boolean isManuallyLoaded()
isManuallyLoaded in interface IResourcepublic void unload()
unload in interface IResourcepublic int getSize()
getSize in interface IResourcepublic void touch()
touch in interface IResourcepublic java.lang.String getName()
getName in interface IResourcepublic long getHandle()
getHandle in interface IResourcepublic boolean isPrepared()
isPrepared in interface IResourcepublic boolean isLoaded()
isLoaded in interface IResourcepublic boolean isLoading()
isLoading in interface IResourcepublic Resource.LoadingState getLoadingState()
getLoadingState in interface IResourcepublic boolean isBackgroundLoaded()
isBackgroundLoaded in interface IResourcepublic void setBackgroundLoaded(boolean bl)
setBackgroundLoaded in interface IResourcepublic void escalateLoading()
escalateLoading in interface IResourcepublic void addListener(IResource.IListener lis)
addListener in interface IResourcepublic void removeListener(IResource.IListener lis)
removeListener in interface IResourcepublic java.lang.String getGroup()
getGroup in interface IResourcepublic void changeGroupOwnership(java.lang.String newGroup)
changeGroupOwnership in interface IResourcepublic IResourceManager getCreator()
getCreator in interface IResourcepublic java.lang.String getOrigin()
getOrigin in interface IResourcepublic void _notifyOrigin(java.lang.String origin)
_notifyOrigin in interface IResourcepublic int getStateCount()
getStateCount in interface IResourcepublic void _dirtyState()
_dirtyState in interface IResourcepublic void _fireBackgroundLoadingComplete()
_fireBackgroundLoadingComplete in interface IResourcepublic void _fireBackgroundPreparingComplete()
_fireBackgroundPreparingComplete in interface IResourcepublic IParamDictionary getParamDictionary()
getParamDictionary in interface IStringInterfacepublic IParamDictionary getParamDictionary_const()
getParamDictionary_const in interface IStringInterfacepublic IParameterList getParameters()
getParameters in interface IStringInterface
public boolean setParameter(java.lang.String name,
java.lang.String value)
setParameter in interface IStringInterfacepublic void setParameterList(INameValuePairList paramList)
setParameterList in interface IStringInterfacepublic java.lang.String getParameter(java.lang.String name)
getParameter in interface IStringInterfacepublic void copyParametersTo(IStringInterface dest)
copyParametersTo in interface IStringInterfacepublic static void cleanupDictionary()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||