TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iDeviceResource Struct Referenceabstract
Inheritance diagram for iDeviceResource:
iUnknown iIndexArray iShader iSoundBuffer iSoundSource iTexture iVertexArray iD3D9IndexArray iD3D9ShaderPixel iD3D9ShaderVertex iD3D9Texture iGLTexture iD3D9VertexArray

Detailed Description

Device resource interface.

Public Member Functions

virtual iHStringGetDeviceResourceName () const =0
 Get the resource's name. More...
 
virtual tBool HasDeviceResourceBeenReset (tBool abClearFlag)=0
 Check whether the device resource has just been reset. More...
 
virtual tBool ResetDeviceResource ()=0
 Reset the device resource. More...
 
virtual iDeviceResourceBind (iUnknown *apDevice)=0
 Called when the resource is going to be used by the device. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual iHString* GetDeviceResourceName ( ) const
pure virtual

Get the resource's name.

Returns
NULL if the resource is not named. {Property}
virtual tBool HasDeviceResourceBeenReset ( tBool  abClearFlag)
pure virtual

Check whether the device resource has just been reset.

Parameters
abClearFlagif true the next call to HasDeviceResourceBeenReset will return false.
virtual tBool ResetDeviceResource ( )
pure virtual

Reset the device resource.

virtual iDeviceResource* Bind ( iUnknown apDevice)
pure virtual

Called when the resource is going to be used by the device.

Parameters
apDeviceis an implementation/device specific object passed to bind to support things such as virtual device resources.
Remarks
Should return a device-compatible resource to be used.
This allows resources to be virtual, proxy 'resources' can be created to mimic the device resource and return a valid device-compatible resource only when Bind is called.
Object that make use of this method documents it in the interface declaration with the remark "Bindable"