RMimage
typedef struct RMimage
{
/* configuration */
int ndims; /* 2 or 3, set implicitly by user */
int w, h, d; /* set by user */
RMenum image_format; /* set by user: RM_IMAGE_RGB, etc. */
RMenum image_type; /* set by user: RM_IMAGE_BYTE, etc. */
float xzoom, yzoom; /* for 2d images only, user supplied, default 1.0, 1.0 */
/* pixel data */
RMenum copy_flag; /* set by user */
void *pixeldata; /* set by user */
void (*appfreefunc)(void *); /* set by user */
/* colormap */
RMvisMap *vismap; /* set by user, default NULL */
/* scale & bias */
float scale, bias;
/* internals, private */
int bytes_per_component; /* computed by RM */
int bytes_per_scanline; /* computed by RM */
int elements; /* computed by RM */
#if 0
/* display list stuff removed 10/5/2000 */
int d1;
RMenum dirty_flag;
#endif
unsigned int pbsize;
/* internal, component manager */
int compListIndx;
/* internal, context cache key */
RMcacheKey cacheKey;
} RMimage;
librm library source file: rmtypes.h
RMtextProps
typedef struct RMtextProps
{
int fontEnum; /* one of RM_FONT_SERIF,RM_FONT_SANS, RM_FONT_MONO, RM_FONT_SYMBOL */
int italicEnum; /* RM_TRUE or RM_FALSE */
int boldEnum; /* RM_TRUE or RM_FALSE */
int sizeEnum; /* enum of RM_FONT_XXS, RM_FONT_XS, RM_FONT_S, RM_FONT_M, RM_FONT_L, RM_FONT_XL, RM_FONT_XXL */
RMenum hJustify, vJustify;
int listbase; /* OpenGL dislay list base (computed by RM at runtime) */
int listoffset; /* OpenGL display list stuff (computed by RM at runtime) */
void *fontinfo;
int compListIndx;
} RMtextProps;
librm library source file: rmtypes.h
RMlight
typedef struct RMlight
{
/* individual light ala OpenGL Light (see glLight) */
RMenum ltype; /* RM_LIGHT_POINT, RM_LIGHT_DIRECTIONAL, RM_SPOT */
RMcolor4D ambientLightColor;
RMcolor4D diffuseLightColor;
RMcolor4D specularLightColor;
RMvertex3D lightXYZ; /* position for point and spot lights, direction for directional light sources */
float spotCutoff; /* [0.0, 90.0] degrees */
float spotExponent; /* default = 0.0, higher numbers produce more focused spots */
RMvertex3D spotDirection;
float constantAttenuation;
float linearAttenuation;
float quadraticAttenuation;
RMenum enabled; /* RM_TRUE or RM_FALSE */
} RMlight;
librm library source file: rmtypes.h
RMtexture
typedef struct RMtexture
{
RMimage *images[RM_MAX_MIPMAPS];
int dims; /* 1, 2 or 3d texture */
int nmipmaps; /* number of mipmaps associated w/this texture */
#if 0
GLuint tname; /* generated by glGenTextures */
#endif
/* flags for OpenGL */
GLenum mag_filter_mode; /* for GL_TEXTURE_MAG_FILTER */
GLenum min_filter_mode; /* for GL_TEXTURE_MIN_FILTER */
GLenum wrap_mode; /* applied to each of u, v, w */
/* OpenGL has extra options for texel storage modes */
GLenum *oglTexelFormat; /* GL_RGBA, GL_RGB, etc. default is GL_RGBA */
/* environment modes */
GLenum envMode; /* see man glTexEnv */
RMcolor4D *blendColor; /* see man glTexEnv */
int borderWidth; /* texture border */
/* residency status currently not used. */
RMenum residency_status; /* internal: RM_TRUE or RM_FALSE */
/* for the component manager */
int compListIndx;
/* internal, context cache keys for texture IDs and texture data */
RMcacheKey cacheKeyID;
RMcacheKey cacheKeyData;
} RMtexture;
librm library source file: rmtypes.h
RMstate
typedef struct RMstate
{
RMmatrix model; /* model transformations */
RMmatrix view; /* viewing transformations */
RMmatrix modelView; /* combined model & view (OGL style) */
RMmatrix projection; /* projection matrix */
RMmatrix composite; /* model*view*projection */
RMmatrix pick; /* pick matrix */
RMmatrix textureMatrix; /* texture matrix */
RMmatrix projection_inverse; /* inverse of the concatenated view & projection matrices (?) */
RMmatrix vpm; /* viewport matrix - from NDC to window */
float vp[4]; /* (x, y) VP location + (w, h) VP width & height */
float aspect_ratio;
float focal_length;
int w, h; /* window width & height */
RMenum rendermode;
RMenum renderpass;
RMenum which_channel; /* used */
RMtexture *texture; /* current texture */
int texture_mode; /* if current texture, GL_TEXTURE_2D, etc. */
int attrib_stack_depth; /* current attribute stack depth */
/* material properties */
RMcolor4D ambient;
RMcolor4D diffuse;
RMcolor4D specular;
RMcolor4D emissive;
RMcolor4D unlit_color;
float specular_exponent;
float opacity;
/* line & point style */
float pointsize;
RMenum linewidth;
RMenum linestyle;
/* render mode parms */
RMenum shademodel;
/* polygon face properties */
RMenum poly_mode_face;
RMenum poly_mode_drawstyle;
RMenum cull_mode; /* cull faces? [RM_CULL_NONE, RM_CULL_FRONT, RM_CULL_BACK, RM_CULL_FRONT_AND_BACK] */
RMenum front_face; /* vertex winding? [RM_CCW, RM_CW] */
/* clip planes */
RMclipPlane *cp0;
RMclipPlane *cp1;
RMclipPlane *cp2;
RMclipPlane *cp3;
RMclipPlane *cp4;
RMclipPlane *cp5;
/* fog */
RMenum fogActive; /* RM_TRUE if fog is active */
RMfog fog; /* rather than creating copies */
/* lighting */
RMlightModel *lmodel;
RMlight *lightSources[RM_MAX_LIGHTS];
/* text */
RMtextProps *textProps;
int frameNumber;
/* internal use only */
RMenum colorMaterialActive;
RMenum lightingActive;
} RMstate;
librm library source file: rmtypes.h
RMnode
typedef struct RMnode
{
/* scene graph topology */
struct RMnode *parent;
int nchildren;
struct RMnode **children;
/* here's the geometry */
int nprims;
void **prims;
/* properties */
_surface_properties *sprops;
_rendermode_properties *rprops;
internals_RMsceneParms *scene_parms;
/* fb clear control */
internals_RMfbClear *fbClear;
/* bounding box info */
_bounding_box bbox;
RMvertex3D center;
/* transformation info */
internals_RMtransformationStruct *transforms;
/* misc scheduling info about the object */
_object_info object_info;
/* callbacks */
int (*viewPretraverseCallback) (const struct RMnode *, const RMstate *);
int (*viewPosttraverseCallback) (const struct RMnode *, const RMstate *);
int (*renderPretraverseCallback) (const struct RMnode *, const RMstate *);
int (*renderPosttraverseCallback) (const struct RMnode *, const RMstate *);
int (*viewSwitchCallback) (const struct RMnode *, const RMstate *);
/*
* 7/22/02. added view (stage) render order callback. note that the
* switch callback and renderOrder callbacks are (or should be)
* mutually-exclusive. such mutual-exclusivity is not reflected in
* the data structure or in the API at this time.
*/
int (*viewRenderOrderCallback) (const struct RMnode *, const RMstate *, int *orderIndices, int nChildren);
/* client data stuff - not multistage safe! (1/2001) */
void *clientData;
void (*clientDataFreeFunc) (struct RMnode *, void *);
int refcount;
/* attribute mask */
GLuint attribMask;
/* optional mutex */
RMmutex *nodeMutex;
/* internal, component manager */
int compListIndx;
} RMnode;
librm library source file: rmtypes.h
RMpipe
typedef struct RMpipe
{
Display *xdisplay;
XVisualInfo *xvisual;
Window xdrawable;
GLXContext glxcontext;
Colormap xcolormap;
RMenum offscreen;
RMenum processingMode;
RMenum channel_format;
int xwindow_width, xwindow_height;
int xflags;
RMenum opaque3DEnable, transparent3DEnable, opaque2DEnable;
RMenum initMatrixStack; /* RM_TRUE or RM_FALSE */
int frameNumber;
/* render function */
void (*channel_render_func)(RMnode *t, struct RMpipe *p);
/*
* optional app callback invoked after rendering, but before
* the "swapbuffers" call. can be used to perform synchronization
* between multiple rendering engines.
*/
void (*postRenderBarrierFunc)(struct RMpipe *p);
/* color and depth buffer acquisition, swap buffer function */
void (*postrenderfunc)(const RMimage *, RMenum whichBufferEnum);
void (*postrender_depthbufferfunc)(const RMimage *, RMenum whichBufferEnum);
void (*swapbuffunc)(struct RMpipe *);
char name[32]; /* temp hack */
/* the context cache */
RMcontextCache *contextCache;
/* multistage rendering buffers */
void *displayLists;
/* multistage process/thread control structure */
void *mtControl;
} RMpipe;
librm library source file: rmtypes.h
RMpipe
typedef struct RMpipe
{
RMenum channel_format;
int xwindow_width, xwindow_height;
int xflags;
RMenum opaque3DEnable, transparent3DEnable, opaque2DEnable;
RMenum initMatrixStack; /* RM_TRUE or RM_FALSE */
RMenum offscreen;
int frameNumber;
RMenum processingMode;
/* render function */
void (*channel_render_func)(RMnode *t, struct RMpipe *p);
/*
* optional app callback invoked after rendering, but before
* the "swapbuffers" call. can be used to perform synchronization
* between multiple rendering engines.
*/
void (*postRenderBarrierFunc)(struct RMpipe *p);
/* color and depth buffer acquisition */
void (*postrenderfunc)(RMimage *, int rm_buff_enum);
void (*postrender_depthbufferfunc)(RMimage *, int rm_buff_enum);
void (*swapbuffunc)(struct RMpipe *);
HDC hdc;
HWND hwnd;
HGLRC hRC;
/* the context cache */
RMcontextCache *contextCache;
/* multistage rendering buffers */
void *displayLists;
/* multistage process/thread control structure */
void *mtControl;
} RMpipe;
librm library source file: rmtypes.h
RMprimitive
typedef struct RMprimitive
{
RMenum type;
RMprimitiveDataBlob *blobs;
/* methods, data, flags */
void (*renderfunc) OGLPRIMPARMLIST(); /* RMprimitive stores a pointer to the primitive draw method */
void *clientData;
void (*clientDataFreeFunc) (struct RMprimitive *p, void *cd);
void *p1; /* stuff that doesn't really fit into blobs */
/* misc stuff - usage depends upon app */
unsigned int flags1;
unsigned int model_flag;
int display_list_enable;
/* old stuff for compatibility */
int utility;
/* internal, component manager */
int compListIndx;
/* internal, context cache key */
RMcacheKey cacheKey;
} RMprimitive;
librm library source file: rmtypes.h