RenderManAPI  24.0
RixResourceResolver Class Referenceabstract

#include <RixInterfaces.h>

Inherits RixInterface.

Public Types

enum  ResourceType {
  k_Shader = 0, k_Texture, k_Archive, k_Display,
  k_Procedural, k_RifFilter, k_RixPlugin
}
 
enum  Type {
  k_Float, k_Integer, k_StringV, k_Color,
  k_Normal, k_Vector, k_Point, k_HPoint,
  k_MPoint, k_Matrix
}
 

Public Member Functions

virtual char const * GetResourcePaths (ResourceType)=0
 GetResourcePaths returns a ':' separated string representing filesystem directories to search for the requested resource type. More...
 
virtual int ResolveResource (ResourceType, char const *nm, char result[], int maxlen)=0
 ResolveResource searches for the specified resource and returns the fully qualified filename of the resource. More...
 
virtual int GetVersion () const
 Get the version number of this interface. More...
 

Protected Member Functions

 RixResourceResolver ()
 

Protected Attributes

int m_version
 Version number of this interface. More...
 

Member Enumeration Documentation

◆ ResourceType

Enumerator
k_Shader 
k_Texture 
k_Archive 
k_Display 
k_Procedural 
k_RifFilter 
k_RixPlugin 

◆ Type

enum RixInterface::Type
inherited
Enumerator
k_Float 
k_Integer 
k_StringV 
k_Color 
k_Normal 
k_Vector 
k_Point 
k_HPoint 
k_MPoint 
k_Matrix 

Constructor & Destructor Documentation

◆ RixResourceResolver()

RixResourceResolver::RixResourceResolver ( )
inlineprotected

Member Function Documentation

◆ GetResourcePaths()

virtual char const* RixResourceResolver::GetResourcePaths ( ResourceType  )
pure virtual

GetResourcePaths returns a ':' separated string representing filesystem directories to search for the requested resource type.

◆ GetVersion()

virtual int RixInterface::GetVersion ( ) const
inlinevirtualinherited

Get the version number of this interface.

Different interfaces might have different version numbers in a given release.

References RixInterface::m_version.

◆ ResolveResource()

virtual int RixResourceResolver::ResolveResource ( ResourceType  ,
char const *  nm,
char  result[],
int  maxlen 
)
pure virtual

ResolveResource searches for the specified resource and returns the fully qualified filename of the resource.

If the resource can't be found nonzero error code is returned. Note that we follow the same file extension inference rules as does the renderer. Thus nm can be a relative filepath and may or may not require a file extension according to standard RenderMan conventions. If it works in RIB it should work here. Result should be allocated large enough to contain a fully-qualified pathname... Should the resulting file be found but not fit in the provided buffer, we return a positive error code indicated the required length. We return a negative error code, if the file not be found.

Member Data Documentation

◆ m_version

int RixInterface::m_version
protectedinherited

Version number of this interface.

Referenced by RixInterface::GetVersion().


The documentation for this class was generated from the following file: