|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.TextureManager
public class TextureManager
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ogre4j.IResourceManager |
|---|
IResourceManager.IResourceCreateOrRetrieveResult, IResourceManager.IResourceHandleMap, IResourceManager.IResourceMap, IResourceManager.IResourceMapIterator |
| Field Summary |
|---|
| Fields inherited from class org.xbig.base.NativeObject |
|---|
deleted, object, remote |
| Constructor Summary | |
|---|---|
|
TextureManager(InstancePointer p)
This constructor is public for internal useage only! |
protected |
TextureManager(InstancePointer p,
boolean remote)
Creates a Java wrapper object for an existing C++ object. |
|
TextureManager(WithoutNativeObject val)
Allows creation of Java objects without C++ objects. |
| Method Summary | |
|---|---|
void |
_notifyResourceLoaded(IResource res)
Notify this manager that a resource which it manages has been loaded. |
void |
_notifyResourceTouched(IResource res)
Notify this manager that a resource which it manages has been 'touched', i.e. used. |
void |
_notifyResourceUnloaded(IResource res)
Notify this manager that a resource which it manages has been unloaded. |
void |
create(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams)
Creates a new blank resource, but does not immediately load it. |
void |
createManual(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
TextureType texType,
long width,
long height,
int num_mips,
PixelFormat format,
int usage,
IManualResourceLoader loader,
boolean hwGammaCorrection,
long fsaa)
Create a manual texture with a depth of 1 (not loaded from a file). |
void |
createManual(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
TextureType texType,
long width,
long height,
long depth,
int num_mips,
PixelFormat format,
int usage,
IManualResourceLoader loader,
boolean hwGammaCorrection,
long fsaa)
Create a manual texture with specified width, height and depth (not loaded from a file). |
void |
createOrRetrieve(IResourceManager.IResourceCreateOrRetrieveResult returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams)
Create a new resource, or retrieve an existing one with the same name if it already exists. |
void |
createOrRetrieve(IResourceManager.IResourceCreateOrRetrieveResult returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams,
TextureType texType,
int numMipmaps,
float gamma,
boolean isAlpha,
PixelFormat desiredFormat,
boolean hwGammaCorrection)
Create a new texture, or retrieve an existing one with the same name if it already exists. |
void |
delete()
Deletes the corresponding C++ object. |
void |
finalize()
|
void |
getByHandle(IResourcePtr returnValue,
long handle)
Retrieves a pointer to a resource by handle, or null if the resource does not exist. |
void |
getByName(IResourcePtr returnValue,
java.lang.String name)
Retrieves a pointer to a resource by name, or null if the resource does not exist. |
int |
getDefaultNumMipmaps()
Gets the default number of mipmaps to be used for loaded textures. |
float |
getLoadingOrder()
Gets the relative loading order of resources of this type. |
int |
getMemoryBudget()
Get the limit on the amount of memory this resource handler may use. |
int |
getMemoryUsage()
Gets the current memory usage, in bytes. |
PixelFormat |
getNativeFormat(TextureType ttype,
PixelFormat format,
int usage)
Gets the format which will be natively used for a requested format given the constraints of the current device. |
int |
getPreferredFloatBitDepth()
gets preferred bit depth for float pixel format textures. |
int |
getPreferredIntegerBitDepth()
gets preferred bit depth for integer pixel format textures. |
void |
getResourceIterator(IResourceManager.IResourceMapIterator returnValue)
Returns an iterator over all resources in this manager. |
java.lang.String |
getResourceType()
Gets a string identifying the type of resource this manager handles. |
IStringVector |
getScriptPatterns()
Gets the file patterns which should be used to find scripts for this . |
static ITextureManager |
getSingleton()
Override standard retrieval. |
static ITextureManager |
getSingletonPtr()
Override standard retrieval. |
boolean |
getVerbose()
Gets whether this manager and its resources habitually produce log output |
boolean |
isEquivalentFormatSupported(TextureType ttype,
PixelFormat format,
int usage)
Returns whether this render system can support the texture format requested with the given usage options, or another format with no quality reduction. |
boolean |
isFormatSupported(TextureType ttype,
PixelFormat format,
int usage)
Returns whether this render system can natively support the precise texture format requested with the given usage options. |
boolean |
isHardwareFilteringSupported(TextureType ttype,
PixelFormat format,
int usage,
boolean preciseFormatOnly)
Returns whether this render system has hardware filtering supported for the texture format requested with the given usage options. |
void |
load(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList loadParams)
Generic load method, used to create a specific to this without using one of the specialised 'load' methods (containing per-Resource-type parameters). |
void |
load(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
TextureType texType,
int numMipmaps,
float gamma,
boolean isAlpha,
PixelFormat desiredFormat,
boolean hwGammaCorrection)
Loads a texture from a file. |
void |
loadImage(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
IImage img,
TextureType texType,
int iNumMipmaps,
float gamma,
boolean isAlpha,
PixelFormat desiredFormat,
boolean hwGammaCorrection)
Loads a texture from an object. |
void |
loadRawData(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
IDataStreamPtr stream,
int uWidth,
int uHeight,
PixelFormat format,
TextureType texType,
int iNumMipmaps,
float gamma,
boolean hwGammaCorrection)
Loads a texture from a raw data stream. |
void |
parseScript(IDataStreamPtr stream,
java.lang.String groupName)
Parse the definition of a set of resources from a script file. |
void |
prepare(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList loadParams)
Generic prepare method, used to create a specific to this without using one of the specialised 'prepare' methods (containing per-Resource-type parameters). |
void |
prepare(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
TextureType texType,
int numMipmaps,
float gamma,
boolean isAlpha,
PixelFormat desiredFormat,
boolean hwGammaCorrection)
Prepares to loads a texture from a file. |
void |
reloadAll(boolean reloadableOnly)
Caused all currently loaded resources to be reloaded. |
void |
reloadUnreferencedResources(boolean reloadableOnly)
Caused all currently loaded but not referenced by any other object resources to be reloaded. |
void |
remove(IResourcePtr r)
Remove a single resource. |
void |
remove(long handle)
Remove a single resource by handle. |
void |
remove(java.lang.String name)
Remove a single resource by name. |
void |
removeAll()
Removes all resources. |
boolean |
resourceExists(long handle)
|
boolean |
resourceExists(java.lang.String name)
|
void |
setDefaultNumMipmaps(int num)
Sets the default number of mipmaps to be used for loaded textures, for when textures are loaded automatically (e.g. by class) or when 'load' is called with the default parameters by the application. |
void |
setMemoryBudget(int bytes)
Set a limit on the amount of memory this resource handler may use. |
void |
setPreferredBitDepths(int integerBits,
int floatBits,
boolean reloadTextures)
Sets preferred bit depth for integer and float pixel format. |
void |
setPreferredFloatBitDepth(int bits,
boolean reloadTextures)
Sets preferred bit depth for float pixel format textures. |
void |
setPreferredIntegerBitDepth(int bits,
boolean reloadTextures)
Sets preferred bit depth for integer pixel format textures. |
void |
setVerbose(boolean v)
Sets whether this manager and its resources habitually produce log output |
void |
unload(long handle)
Unloads a single resource by handle. |
void |
unload(java.lang.String name)
Unloads a single resource by name. |
void |
unloadAll(boolean reloadableOnly)
Unloads all resources. |
void |
unloadUnreferencedResources(boolean reloadableOnly)
Unload all resources which are not referenced by any other object. |
| 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 TextureManager(InstancePointer p)
protected TextureManager(InstancePointer p,
boolean remote)
public TextureManager(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 NativeObject
public void createOrRetrieve(IResourceManager.IResourceCreateOrRetrieveResult returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams,
TextureType texType,
int numMipmaps,
float gamma,
boolean isAlpha,
PixelFormat desiredFormat,
boolean hwGammaCorrection)
createOrRetrieve in interface ITextureManager
public void prepare(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
TextureType texType,
int numMipmaps,
float gamma,
boolean isAlpha,
PixelFormat desiredFormat,
boolean hwGammaCorrection)
prepare in interface ITextureManager
public void load(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
TextureType texType,
int numMipmaps,
float gamma,
boolean isAlpha,
PixelFormat desiredFormat,
boolean hwGammaCorrection)
load in interface ITextureManager
public void loadImage(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
IImage img,
TextureType texType,
int iNumMipmaps,
float gamma,
boolean isAlpha,
PixelFormat desiredFormat,
boolean hwGammaCorrection)
loadImage in interface ITextureManager
public void loadRawData(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
IDataStreamPtr stream,
int uWidth,
int uHeight,
PixelFormat format,
TextureType texType,
int iNumMipmaps,
float gamma,
boolean hwGammaCorrection)
loadRawData in interface ITextureManager
public void createManual(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
TextureType texType,
long width,
long height,
long depth,
int num_mips,
PixelFormat format,
int usage,
IManualResourceLoader loader,
boolean hwGammaCorrection,
long fsaa)
createManual in interface ITextureManager
public void createManual(ITexturePtr returnValue,
java.lang.String name,
java.lang.String group,
TextureType texType,
long width,
long height,
int num_mips,
PixelFormat format,
int usage,
IManualResourceLoader loader,
boolean hwGammaCorrection,
long fsaa)
createManual in interface ITextureManager
public void setPreferredIntegerBitDepth(int bits,
boolean reloadTextures)
setPreferredIntegerBitDepth in interface ITextureManagerpublic int getPreferredIntegerBitDepth()
getPreferredIntegerBitDepth in interface ITextureManager
public void setPreferredFloatBitDepth(int bits,
boolean reloadTextures)
setPreferredFloatBitDepth in interface ITextureManagerpublic int getPreferredFloatBitDepth()
getPreferredFloatBitDepth in interface ITextureManager
public void setPreferredBitDepths(int integerBits,
int floatBits,
boolean reloadTextures)
setPreferredBitDepths in interface ITextureManager
public boolean isFormatSupported(TextureType ttype,
PixelFormat format,
int usage)
isFormatSupported in interface ITextureManager
public boolean isEquivalentFormatSupported(TextureType ttype,
PixelFormat format,
int usage)
isEquivalentFormatSupported in interface ITextureManager
public PixelFormat getNativeFormat(TextureType ttype,
PixelFormat format,
int usage)
getNativeFormat in interface ITextureManager
public boolean isHardwareFilteringSupported(TextureType ttype,
PixelFormat format,
int usage,
boolean preciseFormatOnly)
isHardwareFilteringSupported in interface ITextureManagerpublic void setDefaultNumMipmaps(int num)
setDefaultNumMipmaps in interface ITextureManagerpublic int getDefaultNumMipmaps()
getDefaultNumMipmaps in interface ITextureManagerpublic static ITextureManager getSingleton()
public static ITextureManager getSingletonPtr()
public void create(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams)
create in interface IResourceManager
public void createOrRetrieve(IResourceManager.IResourceCreateOrRetrieveResult returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams)
createOrRetrieve in interface IResourceManagerpublic void setMemoryBudget(int bytes)
setMemoryBudget in interface IResourceManagerpublic int getMemoryBudget()
getMemoryBudget in interface IResourceManagerpublic int getMemoryUsage()
getMemoryUsage in interface IResourceManagerpublic void unload(java.lang.String name)
unload in interface IResourceManagerpublic void unload(long handle)
unload in interface IResourceManagerpublic void unloadAll(boolean reloadableOnly)
unloadAll in interface IResourceManagerpublic void reloadAll(boolean reloadableOnly)
reloadAll in interface IResourceManagerpublic void unloadUnreferencedResources(boolean reloadableOnly)
unloadUnreferencedResources in interface IResourceManagerpublic void reloadUnreferencedResources(boolean reloadableOnly)
reloadUnreferencedResources in interface IResourceManagerpublic void remove(IResourcePtr r)
remove in interface IResourceManagerpublic void remove(java.lang.String name)
remove in interface IResourceManagerpublic void remove(long handle)
remove in interface IResourceManagerpublic void removeAll()
removeAll in interface IResourceManager
public void getByName(IResourcePtr returnValue,
java.lang.String name)
getByName in interface IResourceManager
public void getByHandle(IResourcePtr returnValue,
long handle)
getByHandle in interface IResourceManagerpublic boolean resourceExists(java.lang.String name)
resourceExists in interface IResourceManagerpublic boolean resourceExists(long handle)
resourceExists in interface IResourceManagerpublic void _notifyResourceTouched(IResource res)
_notifyResourceTouched in interface IResourceManagerpublic void _notifyResourceLoaded(IResource res)
_notifyResourceLoaded in interface IResourceManagerpublic void _notifyResourceUnloaded(IResource res)
_notifyResourceUnloaded in interface IResourceManager
public void prepare(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList loadParams)
prepare in interface IResourceManager
public void load(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList loadParams)
load in interface IResourceManagerpublic IStringVector getScriptPatterns()
getScriptPatterns in interface IResourceManagergetScriptPatterns in interface IScriptLoader
public void parseScript(IDataStreamPtr stream,
java.lang.String groupName)
parseScript in interface IResourceManagerparseScript in interface IScriptLoaderpublic float getLoadingOrder()
getLoadingOrder in interface IResourceManagergetLoadingOrder in interface IScriptLoaderpublic java.lang.String getResourceType()
getResourceType in interface IResourceManagerpublic void setVerbose(boolean v)
setVerbose in interface IResourceManagerpublic boolean getVerbose()
getVerbose in interface IResourceManagerpublic void getResourceIterator(IResourceManager.IResourceMapIterator returnValue)
getResourceIterator in interface IResourceManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||