Revision: 75507
          http://sourceforge.net/p/brlcad/code/75507
Author:   starseeker
Date:     2020-04-21 20:20:59 +0000 (Tue, 21 Apr 2020)
Log Message:
-----------
Add plugin hooks

Modified Paths:
--------------
    brlcad/branches/dm-fb-merge/src/libdm/X/if_X24.c
    brlcad/branches/dm-fb-merge/src/libdm/axes.c
    brlcad/branches/dm-fb-merge/src/libdm/osgl/if_osgl.cpp
    brlcad/branches/dm-fb-merge/src/libdm/qt/if_qt.cpp
    brlcad/branches/dm-fb-merge/src/libdm/tk/if_tk.c
    brlcad/branches/dm-fb-merge/src/libdm/txt/if_debug.c
    brlcad/branches/dm-fb-merge/src/libdm/wgl/if_wgl.c

Modified: brlcad/branches/dm-fb-merge/src/libdm/X/if_X24.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/X/if_X24.c    2020-04-21 19:59:48 UTC 
(rev 75506)
+++ brlcad/branches/dm-fb-merge/src/libdm/X/if_X24.c    2020-04-21 20:20:59 UTC 
(rev 75507)
@@ -3544,6 +3544,15 @@
 
 struct fb X24_interface =  { &X24_interface_impl };
 
+#ifdef DM_PLUGIN
+static const struct fb_plugin finfo = { &X24_interface };
+
+DM_EXPORT const struct fb_plugin *fb_plugin_info()
+{
+    return &finfo;
+}
+#endif
+
 /* Because class is actually used to access a struct
  * entry in this file, preserve our redefinition
  * of class for the benefit of avoiding C++ name

Modified: brlcad/branches/dm-fb-merge/src/libdm/axes.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/axes.c        2020-04-21 19:59:48 UTC 
(rev 75506)
+++ brlcad/branches/dm-fb-merge/src/libdm/axes.c        2020-04-21 20:20:59 UTC 
(rev 75507)
@@ -28,6 +28,11 @@
 #include "common.h"
 
 #include <math.h>
+
+#ifdef HAVE_GL_GL_H
+#  include <GL/gl.h>
+#endif
+
 #include "vmath.h"
 #include "bn.h"
 #include "raytrace.h"
@@ -35,13 +40,6 @@
 #include "dm/bview.h"
 #include "./include/private.h"
 
-
-#if defined(IF_OGL) || defined(IF_WGL)
-#  ifdef HAVE_GL_GL_H
-#    include <GL/gl.h>
-#  endif
-#endif
-
 void
 dm_draw_data_axes(struct dm *dmp,
                  fastf_t sf,

Modified: brlcad/branches/dm-fb-merge/src/libdm/osgl/if_osgl.cpp
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/osgl/if_osgl.cpp      2020-04-21 
19:59:48 UTC (rev 75506)
+++ brlcad/branches/dm-fb-merge/src/libdm/osgl/if_osgl.cpp      2020-04-21 
20:20:59 UTC (rev 75507)
@@ -1507,7 +1507,15 @@
 
 struct fb osgl_interface = { &osgl_interface_impl };
 
+#ifdef DM_PLUGIN
+static const struct fb_plugin finfo = { &osgl_interface };
 
+DM_EXPORT const struct fb_plugin *fb_plugin_info()
+{
+    return &finfo;
+}
+#endif
+
 /* Because class is actually used to access a struct
  * entry in this file, preserve our redefinition
  * of class for the benefit of avoiding C++ name

Modified: brlcad/branches/dm-fb-merge/src/libdm/qt/if_qt.cpp
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/qt/if_qt.cpp  2020-04-21 19:59:48 UTC 
(rev 75506)
+++ brlcad/branches/dm-fb-merge/src/libdm/qt/if_qt.cpp  2020-04-21 20:20:59 UTC 
(rev 75507)
@@ -1346,7 +1346,7 @@
 }
 
 
-struct fb qt_interface =  {
+struct fb_impl qt_interface_impl =  {
     0,
     FB_QT_MAGIC,
     qt_open,           /* device_open */
@@ -1403,7 +1403,18 @@
     {0}  /* u6 */
 };
 
+struct fb qt_interface =  { &qt_interface_impl };
 
+#ifdef DM_PLUGIN
+static const struct fb_plugin finfo = { &qt_interface };
+
+DM_EXPORT const struct fb_plugin *fb_plugin_info()
+{
+    return &finfo;
+}
+#endif
+
+
 /**
  * ===================================================== Main window class 
===============================================
  */

Modified: brlcad/branches/dm-fb-merge/src/libdm/tk/if_tk.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/tk/if_tk.c    2020-04-21 19:59:48 UTC 
(rev 75506)
+++ brlcad/branches/dm-fb-merge/src/libdm/tk/if_tk.c    2020-04-21 20:20:59 UTC 
(rev 75507)
@@ -637,7 +637,15 @@
 
 struct fb tk_interface = { &tk_interface_impl };
 
+#ifdef DM_PLUGIN
+static const struct fb_plugin finfo = { &tk_interface };
 
+DM_EXPORT const struct fb_plugin *fb_plugin_info()
+{
+    return &finfo;
+}
+#endif
+
 #else
 
 /* quell empty-compilation unit warnings */

Modified: brlcad/branches/dm-fb-merge/src/libdm/txt/if_debug.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/txt/if_debug.c        2020-04-21 
19:59:48 UTC (rev 75506)
+++ brlcad/branches/dm-fb-merge/src/libdm/txt/if_debug.c        2020-04-21 
20:20:59 UTC (rev 75507)
@@ -419,6 +419,15 @@
 
 struct fb debug_interface = { &debug_interface_impl };
 
+#ifdef DM_PLUGIN
+static const struct fb_plugin finfo = { &debug_interface };
+
+DM_EXPORT const struct fb_plugin *fb_plugin_info()
+{
+    return &finfo;
+}
+#endif
+
 /*
  * Local Variables:
  * mode: C

Modified: brlcad/branches/dm-fb-merge/src/libdm/wgl/if_wgl.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/wgl/if_wgl.c  2020-04-21 19:59:48 UTC 
(rev 75506)
+++ brlcad/branches/dm-fb-merge/src/libdm/wgl/if_wgl.c  2020-04-21 20:20:59 UTC 
(rev 75507)
@@ -2049,6 +2049,15 @@
 
 struct fb wgl_interface = { &wgl_interface_impl };
 
+#ifdef DM_PLUGIN
+static const struct fb_plugin finfo = { &wgl_interface };
+
+DM_EXPORT const struct fb_plugin *fb_plugin_info()
+{
+    return &finfo;
+}
+#endif
+
 #else
 
 /* quell empty-compilation unit warnings */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to