BRL-CAD
material.c File Reference
#include "common.h"
#include <ctype.h>
#include <math.h>
#include <string.h>
#include "bio.h"
#include "vmath.h"
#include "raytrace.h"
#include "optical.h"
Include dependency graph for material.c:

Go to the source code of this file.

Functions

void mlib_add_shader (struct mfuncs **headp, struct mfuncs *mfp1)
 
struct mfuncs * load_dynamic_shader (const char *material)
 
int mlib_setup (struct mfuncs **headp, register struct region *rp, struct rt_i *rtip)
 
void mlib_free (register struct region *rp)
 

Detailed Description

Routines to coordinate the implementation of material properties

Definition in file material.c.

Function Documentation

void mlib_add_shader ( struct mfuncs **  headp,
struct mfuncs *  mfp1 
)

Routine to add an array of mfuncs structures to the linked list of material (shader) routines.

Definition at line 54 of file material.c.

Referenced by mlib_setup(), and sh_stk_dosetup().

struct mfuncs* load_dynamic_shader ( const char *  material)

Definition at line 130 of file material.c.

References bu_brlcad_root(), bu_log(), bu_strlcpy, MAXPATHLEN, R_DEBUG, and rdebug.

Referenced by mlib_setup(), and sh_stk_dosetup().

Here is the call graph for this function:

int mlib_setup ( struct mfuncs **  headp,
register struct region rp,
struct rt_i rtip 
)

Returns - -1 failed 0 indicates that this region should be dropped 1 success

Definition at line 204 of file material.c.

References bu_log(), BU_STR_EQUAL, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_strcpy(), bu_vls_strncpy(), bu_vls_trunc(), load_dynamic_shader(), mater_info::ma_shader, mlib_add_shader(), R_DEBUG, region::reg_mater, region::reg_mfuncs, region::reg_name, region::reg_udata, RT_CK_REGION, RT_CK_RTI, and strchr().

Referenced by envmap_setup().

Here is the call graph for this function:

void mlib_free ( register struct region rp)

Routine to free material-property specific data

Definition at line 315 of file material.c.

References bu_log(), if(), MF_MAGIC, region::reg_mfuncs, region::reg_name, and region::reg_udata.

Here is the call graph for this function: