Revision: 76008
          http://sourceforge.net/p/brlcad/code/76008
Author:   starseeker
Date:     2020-06-03 14:59:45 +0000 (Wed, 03 Jun 2020)
Log Message:
-----------
Let libged know what libtclcad's display manager information is via the
to_view_func method as we do in MGED.

Although it is set up a bit differently than MGEDs (i.e. using fbserv_obj)
letting libged know about libtclcad's current display manager appears to
provide the refactored libged commands with the necessary information to
successfully run via the original invocation method Bob gave me:

master .archer0 component ged fb2pix image.pix
master .archer0 component ged pix2fb image.pix
master .archer0 component ged fbclear

png2fb is being refactored into a generic version that uses libicv to handle
image formats, but this form works:

master .archer0 component ged icv2fb image.png

Note that fb2pix (both in trunk and in the branch) will not default to writing
out the whole framebuffer per the current fb size.  That seems wrong as a
default, but rather than update fb2pix a new default will be attempted in the
fb2icv generic equivalent to match icv2fb.

Modified Paths:
--------------
    brlcad/branches/dm-fb-merge/src/libtclcad/tclcad_obj.c

Modified: brlcad/branches/dm-fb-merge/src/libtclcad/tclcad_obj.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libtclcad/tclcad_obj.c      2020-06-03 
14:06:35 UTC (rev 76007)
+++ brlcad/branches/dm-fb-merge/src/libtclcad/tclcad_obj.c      2020-06-03 
14:59:45 UTC (rev 76008)
@@ -14880,6 +14880,12 @@
     return to_view_func_common(gedp, argc, argv, func, usage, maxargs, 0, 1);
 }
 
+static void
+mged_dm_get_display_image(struct ged *gedp, unsigned char **idata)
+{
+    struct dm *dmp = (struct dm *)gedp->ged_dmp;
+    dm_get_display_image(dmp, idata);
+}
 
 HIDDEN int
 to_view_func_common(struct ged *gedp,
@@ -14922,6 +14928,12 @@
        return GED_ERROR;
     }
 
+    gedp->ged_dmp = gdvp->gdv_dmp;
+    gedp->ged_dm_width = dm_get_width(gdvp->gdv_dmp);
+    gedp->ged_dm_height = dm_get_height(gdvp->gdv_dmp);
+    gedp->ged_dmp_is_null = (gedp->ged_dmp == NULL);
+    gedp->ged_dm_get_display_image = mged_dm_get_display_image;
+
     /* Copy argv into av while skipping argv[1] (i.e. the view name) */
     gedp->ged_gvp = gdvp->gdv_view;
     gedp->ged_refresh_clientdata = (void *)gdvp;

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