Revision: 45512
http://brlcad.svn.sourceforge.net/brlcad/?rev=45512&view=rev
Author: starseeker
Date: 2011-07-15 22:01:54 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Some of these MFUNCS are declared in the header for libmultispectral - for
those, don't do the extern struct part of the original MFUNCS macro. Add a
DMFUNCS macro for both the extern and the mlib_add shader call, and make MFUNCS
just do the mlib_add_shader bit.
Modified Paths:
--------------
brlcad/trunk/src/liboptical/init.c
Modified: brlcad/trunk/src/liboptical/init.c
===================================================================
--- brlcad/trunk/src/liboptical/init.c 2011-07-15 21:54:52 UTC (rev 45511)
+++ brlcad/trunk/src/liboptical/init.c 2011-07-15 22:01:54 UTC (rev 45512)
@@ -48,9 +48,13 @@
#endif
#define MFUNCS(_name) \
+ { mlib_add_shader(headp, _name); }
+
+#define DMFUNCS(_name) \
{ extern struct mfuncs _name[]; mlib_add_shader(headp, _name); }
+
void
optical_shader_init(struct mfuncs **headp)
{
@@ -59,31 +63,31 @@
* Note that sh_plastic.c defines the required "default" entry.
*/
MFUNCS(phg_mfuncs);
- MFUNCS(null_mfuncs); /* null test shader */
+ DMFUNCS(null_mfuncs); /* null test shader */
MFUNCS(light_mfuncs);
- MFUNCS(cloud_mfuncs);
- MFUNCS(spm_mfuncs);
- MFUNCS(txt_mfuncs);
+ DMFUNCS(cloud_mfuncs);
+ DMFUNCS(spm_mfuncs);
+ DMFUNCS(txt_mfuncs);
MFUNCS(stk_mfuncs);
- MFUNCS(cook_mfuncs);
- MFUNCS(stxt_mfuncs);
- MFUNCS(points_mfuncs);
- MFUNCS(toyota_mfuncs);
- MFUNCS(wood_mfuncs);
+ DMFUNCS(cook_mfuncs);
+ DMFUNCS(stxt_mfuncs);
+ DMFUNCS(points_mfuncs);
+ DMFUNCS(toyota_mfuncs);
+ DMFUNCS(wood_mfuncs);
MFUNCS(camo_mfuncs);
- MFUNCS(scloud_mfuncs);
- MFUNCS(air_mfuncs);
- MFUNCS(rtrans_mfuncs);
- MFUNCS(fire_mfuncs);
- MFUNCS(brdf_mfuncs);
- MFUNCS(gauss_mfuncs);
+ DMFUNCS(scloud_mfuncs);
+ DMFUNCS(air_mfuncs);
+ DMFUNCS(rtrans_mfuncs);
+ DMFUNCS(fire_mfuncs);
+ DMFUNCS(brdf_mfuncs);
+ DMFUNCS(gauss_mfuncs);
MFUNCS(noise_mfuncs);
- MFUNCS(prj_mfuncs);
- MFUNCS(grass_mfuncs);
- MFUNCS(tthrm_mfuncs);
- MFUNCS(flat_mfuncs);
- MFUNCS(bbd_mfuncs);
- MFUNCS(toon_mfuncs);
+ DMFUNCS(prj_mfuncs);
+ DMFUNCS(grass_mfuncs);
+ DMFUNCS(tthrm_mfuncs);
+ DMFUNCS(flat_mfuncs);
+ DMFUNCS(bbd_mfuncs);
+ DMFUNCS(toon_mfuncs);
#ifdef OSL_ENABLED
/* This shader requires OSL, so it won't be compiled if this library was
not enabled */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits