RenderMan  26.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RixRiCtl Class Referenceabstract

Access to Ri context. More...

#include <RixRiCtl.h>

Inherits RixInterface.

Public Types

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 Ri * GetRiCtx ()=0
 Ri methods Return a pointer to Ri generator, or NULL of there is an error. More...
 
virtual void Flush (RtString marker, RtBoolean synchronous, RtUString flushmode)=0
 Ric (Ri Control) methods These should be used ether to control an external rendering session. More...
 
virtual int GetProgress ()=0
 Return the percentage done of the current render. More...
 
virtual int SetWantsProgress (int wantsProgress)=0
 Set whether the renderer should return progress messages Returns the previous value. More...
 
virtual void ProcessCallbacks ()=0
 Process outstanding callback requests (display, exception) More...
 
virtual void Option (RtString name, RtPointer value)=0
 Configure Ric. More...
 
virtual void SetRifEditMode (RixRifEditMode m)=0
 Set Rif behavior. More...
 
virtual void RifInit (int argc, const char *argv[])=0
 Configure Rifs. Would only work in main thread. More...
 
virtual void InvalidateTexture (RtUString const name)=0
 
virtual int GetVersion () const
 Get the version number of this interface. More...
 
PRMan methods

RenderMan startup and shutdown.

Initiate a direct-linked prman session and intialize it with prman-standard command-line arguments. It is an error to invoke these methods in any other execution context.

In order to support iterative rendering the renderer startup and shutdown is split into two phases:

The system-level functions are intended to be called once at application start/end. These can be nested, however secondary calls will simply increment a reference counter. The per-render functions are intended to be called once at render start/end and cannot be nested.

PRManSystemBegin and PRManRenderBegin should be used instead of PRManBegin in DCCs that include both Hydra rendering and traditional rendering. PRManBegin is a convenience wrapper for PRManSystemBegin and PRManRenderEnd, likewise PRManEnd is a convenience wrapper for PRManRenderEnd and PRManSystemEnd.

virtual int PRManBegin (int argc, char *argv[])=0
 Initiate prman render session. More...
 
virtual int PRManGo ()=0
 RIB Render Invocation. More...
 
virtual int PRManEnd ()=0
 Terminate prman render session. More...
 
virtual int PRManSystemBegin (int argc, const char *argv[])=0
 Initialize RenderMan. More...
 
virtual int PRManRenderBegin (int argc, const char *argv[])=0
 Render-level initialization of RenderMan, called once per-render. More...
 
virtual int PRManSystemEnd ()=0
 System-level shutdown of RenderMan, called at prman termination. More...
 
virtual int PRManRenderEnd ()=0
 Render-level shut-down of RenderMan, called on render termination. More...
 

Protected Member Functions

 RixRiCtl ()
 
virtual ~RixRiCtl ()
 

Protected Attributes

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

Detailed Description

Access to Ri context.

The RixRiCtl interface provides access to the current thread's Ri context and is intended for use by procedural primitives as well as by applications that need to control a separate rendering or rerendering process using the Ric/Ri combination via libprman.so services. Standalone applications should prefer the RixRIB interface coupled with librix. When used in a procedural primitive context the usual Ri state constraints apply (i.e. don't call ri->Begin, ri->End, ri->WorldBegin, etc). When used to control separate rendering process the additional (Ric) interface methods may be used to syncronize state between applications.

Ri *ri = riInterface->GetRi();
if(ri)
ri->SphereV(1, -1, 1, 360, 0, NULL, NULL);

Member Enumeration Documentation

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

RixRiCtl::RixRiCtl ( )
inlineprotected
virtual RixRiCtl::~RixRiCtl ( )
inlineprotectedvirtual

Member Function Documentation

virtual void RixRiCtl::Flush ( RtString  marker,
RtBoolean  synchronous,
RtUString  flushmode 
)
pure virtual

Ric (Ri Control) methods These should be used ether to control an external rendering session.

Or to signal direct rendering abort. Flush the renderer to the given stream marker.

virtual int RixRiCtl::GetProgress ( )
pure virtual

Return the percentage done of the current render.

If there is no current render underway, this returns 100 (done).

virtual Ri* RixRiCtl::GetRiCtx ( )
pure virtual

Ri methods Return a pointer to Ri generator, or NULL of there is an error.

In direct-rendering situations these calls communicate directly with the renderer (albeit through the Rif layer). In external-render mode, these calls produce RIB which is written to stdin of the child prman process.

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.

virtual void RixRiCtl::InvalidateTexture ( RtUString const  name)
pure virtual
virtual void RixRiCtl::Option ( RtString  name,
RtPointer  value 
)
pure virtual

Configure Ric.

virtual int RixRiCtl::PRManBegin ( int  argc,
char *  argv[] 
)
pure virtual

Initiate prman render session.

This is a wrapper for PRManSystemBegin and PRManRenderBegin for use with single process renders (e.g. command line RIB renders). For DCC rendering see PRManSystemBegin and PRManRenderBegin.

Parameters
argcCommand-line argc
argvCommand-line argv
virtual int RixRiCtl::PRManEnd ( )
pure virtual

Terminate prman render session.

This is a wrapper for PRManSystemEnd and PRManRenderEnd for use with single process renders (command line RIB renders). For DCC rendering see PRManSystemBegin and PRManRenderBegin.

virtual int RixRiCtl::PRManGo ( )
pure virtual

RIB Render Invocation.

For use with single process renders, e.g. command line RIB renders. For DCC rendering see RixRileyManager or RixSGManager.

virtual int RixRiCtl::PRManRenderBegin ( int  argc,
const char *  argv[] 
)
pure virtual

Render-level initialization of RenderMan, called once per-render.

Parameters
argcCommand-line argc
argvCommand-line argv
virtual int RixRiCtl::PRManRenderEnd ( )
pure virtual

Render-level shut-down of RenderMan, called on render termination.

virtual int RixRiCtl::PRManSystemBegin ( int  argc,
const char *  argv[] 
)
pure virtual

Initialize RenderMan.

System-level initialization of RenderMan, called once per render invocation. That invocation could be for a stand-alone render, a DCC render, or an hdPrman render.

Parameters
argcCommand-line argc
argvCommand-line argv
virtual int RixRiCtl::PRManSystemEnd ( )
pure virtual

System-level shutdown of RenderMan, called at prman termination.

That termination could be after a stand-alone render, a DCC shutdown, or the end of an hdPrman render. For this reason the PRMan object is ref-counted and only torn down when there are no other references to the PRMan object in this process.

virtual void RixRiCtl::ProcessCallbacks ( )
pure virtual

Process outstanding callback requests (display, exception)

virtual void RixRiCtl::RifInit ( int  argc,
const char *  argv[] 
)
pure virtual

Configure Rifs. Would only work in main thread.

virtual void RixRiCtl::SetRifEditMode ( RixRifEditMode  m)
pure virtual

Set Rif behavior.

virtual int RixRiCtl::SetWantsProgress ( int  wantsProgress)
pure virtual

Set whether the renderer should return progress messages Returns the previous value.

Member Data Documentation

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: