/*
 *     RenderMan Interface Standard Include File
 *          (for ANSI Standard C)
 */


#ifndef RI_H
#define RI_H 1

#ifdef WIN32
  #define RI_IMPORT __declspec(dllimport)
  #define RI_EXPORT __declspec(dllexport)
  #ifdef RI_EXPORTS
	#define RI_API RI_EXPORT
  #else
	#define RI_API RI_IMPORT
  #endif
#else
  #define RI_API
#endif

#ifdef __cplusplus
extern "C" {
#endif
           /* Definitions of Abstract Types used in RI */

typedef short       RtBoolean;
typedef int         RtInt;
typedef float       RtFloat;
typedef const char* RtToken;
typedef RtFloat RtColor[3];
typedef RtFloat RtPoint[3];
typedef RtFloat RtVector[3];
typedef RtFloat RtNormal[3];
typedef RtFloat Hpoint[4];
typedef RtFloat RtMatrix[4][4];
typedef RtFloat RtBasis[4][4];
typedef RtFloat RtBound[6];
typedef char    *RtString;
typedef void    *RtPointer;
typedef void    RtVoid;
typedef RtFloat (*RtFilterFunc)(RtFloat, RtFloat, RtFloat, RtFloat);
typedef RtVoid  (*RtErrorHandler)(RtInt, RtInt, RtToken );
typedef RtVoid  (*RtProcSubdivFunc)(RtPointer, RtFloat);
typedef RtVoid  (*RtProcFreeFunc)(RtPointer);
typedef RtVoid  (*RtArchiveCallback)(RtToken, RtToken , ...);
typedef RtPointer RtObjectHandle;
typedef RtPointer RtLightHandle;
typedef RtPointer RtContextHandle;
typedef RtPointer RtArchiveHandle;
typedef RtPointer RtVolumeHandle;

     /* Extern Declarations for Predefined RI Data Structures */

#define RI_FALSE     0
#define RI_TRUE      (!RI_FALSE)
#define RI_INFINITY  1.0e38
#define RI_EPSILON   1.0e-10
#define RI_NULL      ((RtToken)0)

extern RI_API RtToken  RI_FRAMEBUFFER, RI_FILE;
extern RI_API RtToken  RI_RGB, RI_RGBA, RI_RGBZ, RI_RGBAZ, RI_A, RI_Z, RI_AZ;
extern RI_API RtToken  RI_PERSPECTIVE, RI_ORTHOGRAPHIC;
extern RI_API RtToken  RI_HIDDEN, RI_PAINT;
extern RI_API RtToken  RI_CONSTANT, RI_SMOOTH;
extern RI_API RtToken  RI_FLATNESS, RI_FOV;

extern RI_API RtToken  RI_AMBIENTLIGHT, RI_POINTLIGHT, RI_DISTANTLIGHT,
                RI_SPOTLIGHT;

extern RI_API RtToken  RI_INTENSITY, RI_LIGHTCOLOR, RI_FROM, RI_TO, RI_CONEANGLE,
                RI_CONEDELTAANGLE, RI_BEAMDISTRIBUTION;

extern RI_API RtToken  RI_MATTE, RI_METAL, RI_SHINYMETAL,
                RI_PLASTIC, RI_PAINTEDPLASTIC;

extern RI_API RtToken  RI_KA, RI_KD, RI_KS, RI_ROUGHNESS, RI_KR,
                RI_TEXTURENAME, RI_SPECULARCOLOR;
extern RI_API RtToken  RI_DEPTHCUE, RI_FOG, RI_BUMPY;

extern RI_API RtToken  RI_MINDISTANCE, RI_MAXDISTANCE, RI_BACKGROUND,
                RI_DISTANCE, RI_AMPLITUDE;

extern RI_API RtToken  RI_RASTER, RI_SCREEN, RI_CAMERA, RI_WORLD, RI_OBJECT;
extern RI_API RtToken  RI_INSIDE, RI_OUTSIDE, RI_LH, RI_RH;
extern RI_API RtToken  RI_P, RI_PZ, RI_PW, RI_N, RI_NP, RI_CS, RI_OS, RI_S, RI_T, RI_ST;
extern RI_API RtToken  RI_BILINEAR, RI_BICUBIC;
extern RI_API RtToken  RI_PRIMITIVE, RI_INTERSECTION, RI_UNION, RI_DIFFERENCE;
extern RI_API RtToken  RI_PERIODIC, RI_NONPERIODIC, RI_CLAMP, RI_BLACK;
extern RI_API RtToken  RI_IGNORE, RI_PRINT, RI_ABORT, RI_HANDLER;
extern RI_API RtToken  RI_ORIGIN, RI_IDENTIFIER, RI_NAME;
extern RI_API RtToken  RI_COMMENT, RI_STRUCTURE, RI_VERBATIM;
extern RI_API RtToken  RI_LINEAR, RI_CUBIC, RI_WIDTH, RI_CONSTANTWIDTH;

extern RI_API RtToken  RI_CURRENT, RI_WORLD, RI_OBJECT, RI_SHADER;
extern RI_API RtToken  RI_RASTER, RI_NDC, RI_SCREEN, RI_CAMERA, RI_EYE;

extern RI_API RtToken  RI_HOLE, RI_CREASE, RI_CORNER, RI_INTERPOLATEBOUNDARY;

extern RI_API RtToken  RI_BOX, RI_TRIANGLE, RI_CATMULLROM, RI_BESSEL, RI_GAUSSIAN, RI_SINC, RI_BLACKMANHARRIS, RI_MITCHELL;
extern RI_API RtToken  RI_BEZIER, RI_BSPLINE, RI_HERMITE, RI_POWER;

extern RI_API RtToken  RI_USER, RI_HANDLEID, RI_RENDER;

extern RI_API RtBasis  RiBezierBasis, RiBSplineBasis, RiCatmullRomBasis,
                RiHermiteBasis, RiPowerBasis;

#define RI_BEZIERSTEP         ((RtInt)3)
#define RI_BSPLINESTEP        ((RtInt)1)
#define RI_CATMULLROMSTEP     ((RtInt)1)
#define RI_HERMITESTEP        ((RtInt)2)
#define RI_POWERSTEP          ((RtInt)4)

extern RI_API RtInt     RiLastError;


     /* Declarations of All the RenderMan Interface Subroutines */

/* Filters */
extern RI_API RtFloat  RiGaussianFilter(RtFloat x, RtFloat y,
                  RtFloat xwidth, RtFloat ywidth);
extern RI_API RtFloat  RiBoxFilter(RtFloat x, RtFloat y,
                  RtFloat xwidth, RtFloat ywidth);
extern RI_API RtFloat  RiTriangleFilter(RtFloat x, RtFloat y,
                  RtFloat xwidth, RtFloat ywidth);
extern RI_API RtFloat  RiCatmullRomFilter(RtFloat x, RtFloat y,
                  RtFloat xwidth, RtFloat ywidth);
extern RI_API RtFloat  RiSincFilter(RtFloat x, RtFloat y,
                  RtFloat xwidth, RtFloat ywidth);
extern RI_API RtFloat  RiBlackmanHarrisFilter(RtFloat x, RtFloat y,
                  RtFloat xwidth, RtFloat ywidth);
extern RI_API RtFloat  RiMitchellFilter(RtFloat x, RtFloat y, 
                  RtFloat xwidth, RtFloat ywidth);
extern RI_API RtFloat  RiBesselFilter(RtFloat x, RtFloat y, 
                  RtFloat xwidth, RtFloat ywidth);
				  
/* Error Handlers */

extern RI_API RtVoid   RiErrorIgnore(RtInt code, RtInt severity, RtToken msg);
extern RI_API RtVoid   RiErrorPrint(RtInt code, RtInt severity, RtToken msg);
extern RI_API RtVoid   RiErrorAbort(RtInt code, RtInt severity, RtToken msg);

/* Basic control flow, scoping, stacks */
extern RI_API RtContextHandle 
      RiGetContext (void);
	  
extern RI_API RtVoid 
      RiContext (RtContextHandle handle);
	  
extern RI_API RtVoid
     RiBegin(RtToken name),
     RiEnd(),
     RiFrameBegin(RtInt frame),
     RiFrameEnd(),
     RiWorldBegin(),
     RiWorldEnd(),
     RiAttributeBegin(),
     RiAttributeEnd(),
     RiTransformBegin(),
     RiTransformEnd();

extern RI_API RtVoid
     RiSolidBegin(RtToken operation),
     RiSolidEnd(),
     RiMotionBegin(RtInt n, ...),
     RiMotionBeginV(RtInt n, RtFloat times[]),
     RiMotionEnd(void) ;

extern RI_API RtToken
     RiDeclare(RtToken name, RtToken declaration);

/* Resources */
extern RI_API RtVoid 
     RiResource(RtToken handle, RtToken type, ...),
     RiResourceV(RtToken handle, RtToken type, RtInt n, RtToken tokens[], RtPointer params[]),
     RiResourceBegin(void),
     RiResourceEnd(void);

/* Options */
extern RI_API RtVoid
     RiFormat(RtInt xres, RtInt yres, RtFloat aspect),
     RiFrameAspectRatio(RtFloat aspect),
     RiScreenWindow(RtFloat left, RtFloat right, RtFloat bot, RtFloat top),
     RiCropWindow(RtFloat xmin, RtFloat xmax, RtFloat ymin, RtFloat ymax),
     RiDepthOfField (RtFloat fstop, RtFloat focallength, RtFloat focaldistance),
     RiProjection(RtToken name, ...),
     RiProjectionV(RtToken name, RtInt n,RtToken tokens[], RtPointer parameters[]),
     RiClipping(RtFloat hither, RtFloat yon),
     RiClippingPlane(RtFloat Nx, RtFloat Ny, RtFloat Nz, RtFloat Px,
                     RtFloat Py, RtFloat Pz),
     RiShutter(RtFloat min, RtFloat max);

extern RI_API RtVoid
     RiPixelVariance(RtFloat variation),
     RiPixelSamples(RtFloat xsamples, RtFloat ysamples),
     RiPixelSampleImager(RtToken name, ...),
     RiPixelSampleImagerV(RtToken name, RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiPixelFilter(RtFilterFunc filterfunc, RtFloat xwidth, RtFloat ywidth),
     RiExposure(RtFloat gain, RtFloat gamma),
     RiImager(RtToken name, ...),
     RiImagerV(RtToken name, RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiQuantize(RtToken type, RtInt one, RtInt min, RtInt max, RtFloat ampl),
     RiDisplay(RtToken name, RtToken type, RtToken mode, ...),
     RiDisplayV(RtToken name, RtToken type, RtToken mode,
             RtInt n, RtToken tokens[], RtPointer parameters[]);

extern RI_API RtVoid
     RiDisplayChannel(RtToken channel, ...),
     RiDisplayChannelV(RtToken channel, RtInt n, RtToken tokens[], RtPointer parameters[]);

extern RI_API RtVoid
     RiHider(RtToken type, ...),
     RiHiderV(RtToken type, RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiColorSamples(RtInt n, RtFloat nRGB[], RtFloat RGBn[]),
     RiRelativeDetail(RtFloat relativedetail),
     RiOption(RtToken name, ...),
     RiOptionV(RtToken name, RtInt n, RtToken tokens[], RtPointer parameters[]);

/* Attributes */
extern RI_API RtVoid
     RiAttribute(RtToken name, ...),
     RiAttributeV(RtToken name, RtInt n, RtToken tokens[], RtPointer parameters[]);

extern RI_API RtVoid
     RiColor(RtColor color),
     RiOpacity(RtColor color),
     RiTextureCoordinates(RtFloat s1, RtFloat t1, RtFloat s2, RtFloat t2,
             RtFloat s3, RtFloat t3, RtFloat s4, RtFloat t4);

extern RI_API RtVoid
     RiBound(RtBound bound),
     RiDetail(RtBound bound),
     RiDetailRange(RtFloat minvis, RtFloat lowtran, RtFloat uptran, RtFloat
             maxvis),
     RiGeometricApproximation(RtToken type, RtFloat value),
     RiOrientation(RtToken orientation),
     RiReverseOrientation(void),
     RiSides(RtInt sides);
	 
extern RI_API RtVoid
     RiShadingRate(RtFloat size),
     RiShadingInterpolation(RtToken type),
     RiMatte(RtBoolean onoff);

/* Shaders */
extern RI_API RtLightHandle
     RiLightSource(RtToken name, ...),
     RiLightSourceV(RtToken name,RtInt n,RtToken tokens[],RtPointer parameters[]),
     RiAreaLightSource(RtToken name, ...),
     RiAreaLightSourceV(RtToken name,
             RtInt n, RtToken tokens[], RtPointer parameters[]);
extern RI_API RtVoid
     RiIlluminate(RtLightHandle light, RtBoolean onoff),
     RiSurface(RtToken name, ...),
     RiSurfaceV(RtToken name, RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiAtmosphere(RtToken name, ...),
     RiAtmosphereV(RtToken name,RtInt n,RtToken tokens[],RtPointer parameters[]),
     RiInterior(RtToken name, ...),
     RiInteriorV(RtToken name,RtInt n,RtToken tokens[],RtPointer parameters[]),
     RiExterior(RtToken name, ...),
     RiExteriorV(RtToken name,RtInt n,RtToken tokens[],RtPointer parameters[]),
     RiDisplacement(RtToken name, ...),
     RiDisplacementV(RtToken name,RtInt n,RtToken tokens[],RtPointer parameters[]);

/* Transformations */
extern RI_API RtVoid
     RiIdentity(void),
     RiTransform(RtMatrix transform),
     RiConcatTransform(RtMatrix transform),
     RiPerspective(RtFloat fov),
     RiTranslate(RtFloat dx, RtFloat dy, RtFloat dz),
     RiRotate(RtFloat angle, RtFloat dx, RtFloat dy, RtFloat dz),
     RiScale(RtFloat sx, RtFloat sy, RtFloat sz),
     RiSkew(RtFloat angle, RtFloat dx1, RtFloat dy1, RtFloat dz1,
            RtFloat dx2, RtFloat dy2, RtFloat dz2),
     RiCoordinateSystem(RtToken space),
     RiCoordSysTransform(RtToken space);

extern RI_API RtPoint *
     RiTransformPoints(RtToken fromspace, RtToken tospace, RtInt n,
             RtPoint points[]);

/* Geometric Primitives (and a couple gprim-specific attributes) */
extern RI_API RtVoid
     RiPolygon(RtInt nverts, ...),
     RiPolygonV(RtInt nverts, RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiGeneralPolygon(RtInt nloops, RtInt nverts[], ...),
     RiGeneralPolygonV(RtInt nloops, RtInt nverts[],
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiPointsPolygons(RtInt npolys, RtInt nverts[], RtInt verts[], ...),
     RiPointsPolygonsV(RtInt npolys, RtInt nverts[], RtInt verts[],
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiPointsGeneralPolygons(RtInt npolys, RtInt nloops[], RtInt nverts[],
             RtInt verts[], ...),
     RiPointsGeneralPolygonsV(RtInt npolys, RtInt nloops[], RtInt nverts[],
             RtInt verts[], RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiBasis(RtBasis ubasis, RtInt ustep, RtBasis vbasis, RtInt vstep),
     RiPatch(RtToken type, ...),
     RiPatchV(RtToken type, RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiPatchMesh(RtToken type, RtInt nu, RtToken uwrap,
             RtInt nv, RtToken vwrap, ...),
     RiPatchMeshV(RtToken type, RtInt nu, RtToken uwrap,
             RtInt nv, RtToken vwrap,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiNuPatch(RtInt nu, RtInt uorder, RtFloat uknot[], RtFloat umin,
             RtFloat umax, RtInt nv, RtInt vorder, RtFloat vknot[],
             RtFloat vmin, RtFloat vmax, ...),
     RiNuPatchV(RtInt nu, RtInt uorder, RtFloat uknot[], RtFloat umin,
             RtFloat umax, RtInt nv, RtInt vorder, RtFloat vknot[],
             RtFloat vmin, RtFloat vmax,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiTrimCurve(RtInt nloops, RtInt ncurves[], RtInt order[],
             RtFloat knot[], RtFloat min[], RtFloat max[], RtInt n[],
             RtFloat u[], RtFloat v[], RtFloat w[]);

extern RI_API RtVoid
     RiSphere(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax, ...),
     RiSphereV(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiCone(RtFloat height, RtFloat radius, RtFloat tmax, ...),
     RiConeV(RtFloat height, RtFloat radius, RtFloat tmax,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiCylinder(RtFloat radius,RtFloat zmin,RtFloat zmax,RtFloat tmax, ...),
     RiCylinderV(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiHyperboloid(RtPoint point1, RtPoint point2, RtFloat tmax, ...),
     RiHyperboloidV(RtPoint point1, RtPoint point2, RtFloat tmax,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiParaboloid(RtFloat rmax,RtFloat zmin,RtFloat zmax,RtFloat tmax, ...),
     RiParaboloidV(RtFloat rmax, RtFloat zmin, RtFloat zmax, RtFloat tmax,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiDisk(RtFloat height, RtFloat radius, RtFloat tmax, ...),
     RiDiskV(RtFloat height, RtFloat radius, RtFloat tmax,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiTorus(RtFloat majrad, RtFloat minrad, RtFloat phimin, RtFloat phimax,
             RtFloat tmax, ...),
     RiTorusV(RtFloat majrad,RtFloat minrad,RtFloat phimin,RtFloat phimax,
             RtFloat tmax, RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiGeometry(RtToken type, ...),
     RiGeometryV(RtToken type, RtInt n, RtToken tokens[], RtPointer parameters[]);

extern RI_API RtVoid
     RiBlobby(RtInt nleaf, RtInt ncode, RtInt code[],
             RtInt nflt, RtFloat flt[],
             RtInt nstr, RtToken str[], ...),
     RiBlobbyV(RtInt nleaf, RtInt ncode, RtInt code[],
             RtInt nflt, RtFloat flt[],
             RtInt nstr, RtToken str[],
             RtInt n, RtToken tokens[], RtPointer parameters[] ),
     RiCurves(RtToken type, RtInt ncurves,
             RtInt nvertices[], RtToken wrap, ...),
     RiCurvesV(RtToken type, RtInt ncurves,
             RtInt nvertices[], RtToken wrap,
             RtInt n, RtToken tokens[], RtPointer parameters[] ),
     RiPoints(RtInt nverts, ...),
     RiPointsV(RtInt nverts,
             RtInt n, RtToken tokens[], RtPointer parameters[] ),
     RiSubdivisionMesh(RtToken scheme, RtInt nfaces,
			 RtInt nvertices[], RtInt vertices[],
             RtInt ntags, RtToken tags[], RtInt numargs[],
             RtInt intargs[], RtFloat floatargs[], ...),
     RiSubdivisionMeshV(RtToken scheme, RtInt nfaces,
			 RtInt nvertices[], RtInt vertices[],
             RtInt ntags, RtToken tags[], RtInt numargs[],
             RtInt intargs[], RtFloat floatargs[],
             RtInt n, RtToken tokens[], RtPointer parameters[] ),
     RiHierarchicalSubdivisionMesh(RtToken scheme, RtInt nfaces,
			 RtInt nvertices[], RtInt vertices[],
             RtInt ntags, RtToken tags[], RtInt numargs[],
             RtInt intargs[], RtFloat floatargs[], RtString stringargs[], ...),
     RiHierarchicalSubdivisionMeshV(RtToken scheme, RtInt nfaces,
			 RtInt nvertices[], RtInt vertices[],
             RtInt ntags, RtToken tags[], RtInt numargs[],
             RtInt intargs[], RtFloat floatargs[], RtString stringargs[],
             RtInt n, RtToken tokens[], RtPointer parameters[] );
/* Procedural primitives */
extern RI_API RtVoid
     RiProcedural(RtPointer data, RtBound bound,
             RtVoid (*subdivfunc)(RtPointer, RtFloat),
             RtVoid (*freefunc)(RtPointer)),
     RiProcDelayedReadArchive (RtPointer data, RtFloat detail),
     RiProcRunProgram (RtPointer data, RtFloat detail),
     RiProcDynamicLoad (RtPointer data, RtFloat detail),
     RiProcFree (RtPointer data);

/* Object Instancing */
extern RI_API RtObjectHandle
     RiObjectBegin(),
     RiObjectBeginV(RtInt n, RtToken tokens[], RtPointer parameters[] );

extern RI_API RtVoid
     RiObjectEnd(),
     RiObjectInstance(RtObjectHandle handle);
	 
/* Texture map creation */
extern RI_API RtVoid
     RiMakeTexture(RtString pic, RtString tex, RtToken swrap, RtToken twrap,
             RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, ...),
     RiMakeTextureV(RtString pic, RtString tex, RtToken swrap, RtToken twrap,
             RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth,
             RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiMakeLatLongEnvironment(RtString pic, RtString tex, RtFilterFunc filterfunc,
            RtFloat swidth, RtFloat twidth, ...),
     RiMakeLatLongEnvironmentV(RtString pic, RtString tex, RtFilterFunc filterfunc,
            RtFloat swidth, RtFloat twidth,
            RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiMakeCubeFaceEnvironment(RtString px, RtString nx, RtString py, RtString ny,
            RtString pz, RtString nz, RtString tex, RtFloat fov,
            RtFilterFunc filterfunc, RtFloat swidth, RtFloat ywidth, ...),
     RiMakeCubeFaceEnvironmentV(RtString px, RtString nx, RtString py, RtString ny,
            RtString pz, RtString nz, RtString tex, RtFloat fov,
            RtFilterFunc filterfunc, RtFloat swidth, RtFloat ywidth,
            RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiMakeShadow(RtString pic, RtString tex, ...),
     RiMakeShadowV(RtString pic, RtString tex,
            RtInt n, RtToken tokens[], RtPointer parameters[]),
     RiMakeBrickMap(RtInt nptc, RtString ptcnames[], RtString bkmname, ...),
     RiMakeBrickMapV(RtInt nptc, RtString ptcnames[], RtString bkmname,
		   RtInt n, RtToken tokens[], RtPointer params[]);

/* Reading and writing archive files */
extern RI_API RtVoid
     RiArchiveRecord(RtToken type, RtString format, ...),
     RiReadArchive(RtToken name, RtArchiveCallback callback, ...),
     RiReadArchiveV(RtToken name, RtArchiveCallback callback,
             RtInt n, RtToken tokens[], RtPointer parameters[]);

/* Inline archives */
extern RI_API RtArchiveHandle
     RiArchiveBegin(RtToken name, ...),
     RiArchiveBeginV(RtToken name, 
           RtInt n, RtToken tokens[], RtPointer parameters[]);

extern RI_API RtVoid
     RiArchiveEnd();

/* Conditional execution */
extern RI_API RtVoid
     RiIfBegin(RtToken), RiIfEnd(), RiElseIf(RtToken ), RiElse();

/* Error Handling */
extern RI_API RtVoid   RiErrorHandler(RtErrorHandler handler);

/*
     Error Codes
      1 - 10          System and File Errors
     11 - 20          Program Limitations
     21 - 40          State Errors
     41 - 60          Parameter and Protocol Errors
     61 - 80          Execution Errors
*/
#define RIE_NOERROR     ((RtInt)0)
#define RIE_NOMEM       ((RtInt)1)     /* Out of memory */
#define RIE_SYSTEM      ((RtInt)2)     /* Miscellaneous system error */
#define RIE_NOFILE      ((RtInt)3)     /* File nonexistent */
#define RIE_BADFILE     ((RtInt)4)     /* Bad file format */
#define RIE_VERSION     ((RtInt)5)     /* File version mismatch */
#define RIE_DISKFULL    ((RtInt)6)     /* Target disk is full */
#define RIE_INCAPABLE   ((RtInt)11)    /* Optional RI feature */
#define RIE_UNIMPLEMENT ((RtInt)12)    /* Unimplemented feature */
#define RIE_LIMIT       ((RtInt)13)    /* Arbitrary program limit */
#define RIE_BUG         ((RtInt)14)    /* Probably a bug in renderer */
#define RIE_NOTSTARTED  ((RtInt)23)    /* RiBegin not called */
#define RIE_NESTING     ((RtInt)24)    /* Bad begin-end nesting */
#define RIE_NOTOPTIONS  ((RtInt)25)    /* Invalid state for options */
#define RIE_NOTATTRIBS  ((RtInt)26)    /* Invalid state for attribs */
#define RIE_NOTPRIMS    ((RtInt)27)    /* Invalid state for primitives */
#define RIE_ILLSTATE    ((RtInt)28)    /* Other invalid state */
#define RIE_BADMOTION   ((RtInt)29)    /* Badly formed motion block */
#define RIE_BADSOLID    ((RtInt)30)    /* Badly formed solid block */
#define RIE_BADTOKEN    ((RtInt)41)    /* Invalid token for request */
#define RIE_RANGE       ((RtInt)42)    /* Parameter out of range */
#define RIE_CONSISTENCY ((RtInt)43)    /* Parameters inconsistent */
#define RIE_BADHANDLE   ((RtInt)44)    /* Bad object/light handle */
#define RIE_NOSHADER    ((RtInt)45)    /* Can't load requested shader */
#define RIE_MISSINGDATA ((RtInt)46)    /* Required parameters not provided */
#define RIE_SYNTAX      ((RtInt)47)    /* Declare type syntax error */
#define RIE_MATH        ((RtInt)61)    /* Zerodivide, noninvert matrix, etc. */
#define RIE_MISC        ((RtInt)101)   /* Uncategorized error */

     /* Error severity levels */
#define RIE_INFO        ((RtInt)0)     /* Rendering stats and other info */
#define RIE_WARNING     ((RtInt)1)     /* Something seems wrong, maybe okay */
#define RIE_ERROR       ((RtInt)2)     /* Problem. Results may be wrong */
#define RIE_SEVERE      ((RtInt)3)     /* So bad you should probably abort */

#ifdef __cplusplus
}
#endif


#endif  /* RI_H */

