26.01.2015 Views

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Create a depth image file named picturename into a shadow map whose name is<br />

texturename. <strong>The</strong> storage format of the shadow map texture file and the precision of<br />

stored texture channels are implementation-dependent.<br />

RIB BINDING<br />

MakeShadow picturename texturename ...parameterlist...<br />

EXAMPLE<br />

MakeShadow ”shadow.pic” ”shadow.tex”<br />

SEE ALSO<br />

shadow() in the Shading Language<br />

7.2 Errors<br />

<strong>RenderMan</strong> <strong>Interface</strong> procedures do not return error status codes. Instead, the user may<br />

specify an error handling routine that will be called whenever an error is encountered.<br />

RiErrorHandler ( RtErrorHandler handler )<br />

This procedure sets the error handling procedure invoked by the renderer when an<br />

error is detected. Error handling procedures have the following form:<br />

RtVoid handler ( RtInt code, RtInt severity, char *message )<br />

code indicates the type of error, and severity indicates how serious the error is. Values<br />

for code and severity are defined in ”ri.h”. <strong>The</strong> message is a character string<br />

containing an error message formatted by the renderer which can be printed or displayed,<br />

as the handler desires.<br />

<strong>The</strong> following standard error handlers are defined:<br />

RtVoid RiErrorIgnore;<br />

RtVoid RiErrorPrint;<br />

RtVoid RiErrorAbort;<br />

RtInt RiLastError;<br />

If RiErrorIgnore is specified, all errors are ignored and no diagnostic messages are<br />

generated. If RiErrorPrint is specified, a diagnostic message is generated for each<br />

error. <strong>The</strong> rendering system will attempt to ignore the erroneous information and<br />

continue rendering. If RiErrorAbort is specified, the first error will cause a diagnostic<br />

message to be generated and the rendering system will immediately terminate.<br />

Each of the standard error handlers saves the last error code in the global variable<br />

RiLastError. This procedure can be called outside an RiBegin-RiEnd block.<br />

RIB BINDING<br />

103

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!