Revision: 75407
http://sourceforge.net/p/brlcad/code/75407
Author: starseeker
Date: 2020-04-15 11:49:31 +0000 (Wed, 15 Apr 2020)
Log Message:
-----------
Move some logic around to help organize thinking...
Modified Paths:
--------------
brlcad/trunk/include/dm/CMakeLists.txt
brlcad/trunk/src/libdm/dm_private.h
Modified: brlcad/trunk/include/dm/CMakeLists.txt
===================================================================
--- brlcad/trunk/include/dm/CMakeLists.txt 2020-04-15 01:38:06 UTC (rev
75406)
+++ brlcad/trunk/include/dm/CMakeLists.txt 2020-04-15 11:49:31 UTC (rev
75407)
@@ -1,5 +1,6 @@
set(dm_headers
bview.h
+ calltable.h
defines.h
)
BRLCAD_MANAGE_FILES(dm_headers ${INCLUDE_DIR}/brlcad/dm)
Modified: brlcad/trunk/src/libdm/dm_private.h
===================================================================
--- brlcad/trunk/src/libdm/dm_private.h 2020-04-15 01:38:06 UTC (rev 75406)
+++ brlcad/trunk/src/libdm/dm_private.h 2020-04-15 11:49:31 UTC (rev 75407)
@@ -31,10 +31,7 @@
#include "vmath.h"
#include "dm.h"
-struct dm_vars {
- void *pub_vars;
- void *priv_vars;
-};
+#include "dm/calltable.h"
#if defined(DM_OGL) || defined(DM_WGL)
#define Ogl_MV_O(_m) offsetof(struct modifiable_ogl_vars, _m)
@@ -59,90 +56,6 @@
};
#endif
-/**
- * Interface to a specific Display Manager
- */
-struct dm_internal {
- int (*dm_close)(struct dm_internal *dmp);
- int (*dm_drawBegin)(struct dm_internal *dmp); /**< @brief formerly
dmr_prolog */
- int (*dm_drawEnd)(struct dm_internal *dmp); /**< @brief
formerly dmr_epilog */
- int (*dm_normal)(struct dm_internal *dmp);
- int (*dm_loadMatrix)(struct dm_internal *dmp, fastf_t *mat, int which_eye);
- int (*dm_loadPMatrix)(struct dm_internal *dmp, fastf_t *mat);
- int (*dm_drawString2D)(struct dm_internal *dmp, const char *str, fastf_t
x, fastf_t y, int size, int use_aspect); /**< @brief formerly dmr_puts */
- int (*dm_drawLine2D)(struct dm_internal *dmp, fastf_t x_1, fastf_t y_1,
fastf_t x_2, fastf_t y_2); /**< @brief formerly dmr_2d_line */
- int (*dm_drawLine3D)(struct dm_internal *dmp, point_t pt1, point_t pt2);
- int (*dm_drawLines3D)(struct dm_internal *dmp, int npoints, point_t
*points, int sflag);
- int (*dm_drawPoint2D)(struct dm_internal *dmp, fastf_t x, fastf_t y);
- int (*dm_drawPoint3D)(struct dm_internal *dmp, point_t point);
- int (*dm_drawPoints3D)(struct dm_internal *dmp, int npoints, point_t
*points);
- int (*dm_drawVList)(struct dm_internal *dmp, struct bn_vlist *vp);
- int (*dm_drawVListHiddenLine)(struct dm_internal *dmp, register struct
bn_vlist *vp);
- int (*dm_draw)(struct dm_internal *dmp, struct bn_vlist
*(*callback_function)(void *), void **data); /**< @brief formerly
dmr_object */
- int (*dm_setFGColor)(struct dm_internal *dmp, unsigned char r, unsigned
char g, unsigned char b, int strict, fastf_t transparency);
- int (*dm_setBGColor)(struct dm_internal *, unsigned char, unsigned char,
unsigned char);
- int (*dm_setLineAttr)(struct dm_internal *dmp, int width, int style);
/**< @brief currently - linewidth, (not-)dashed */
- int (*dm_configureWin)(struct dm_internal *dmp, int force);
- int (*dm_setWinBounds)(struct dm_internal *dmp, fastf_t *w);
- int (*dm_setLight)(struct dm_internal *dmp, int light_on);
- int (*dm_setTransparency)(struct dm_internal *dmp, int transparency_on);
- int (*dm_setDepthMask)(struct dm_internal *dmp, int depthMask_on);
- int (*dm_setZBuffer)(struct dm_internal *dmp, int zbuffer_on);
- int (*dm_debug)(struct dm_internal *dmp, int lvl); /**< @brief Set
DM debug level */
- int (*dm_logfile)(struct dm_internal *dmp, const char *filename); /**<
@brief Set DM log file */
- int (*dm_beginDList)(struct dm_internal *dmp, unsigned int list);
- int (*dm_endDList)(struct dm_internal *dmp);
- int (*dm_drawDList)(unsigned int list);
- int (*dm_freeDLists)(struct dm_internal *dmp, unsigned int list, int
range);
- int (*dm_genDLists)(struct dm_internal *dmp, size_t range);
- int (*dm_draw_obj)(struct dm_internal *dmp, struct display_list *obj);
- int (*dm_getDisplayImage)(struct dm_internal *dmp, unsigned char **image);
/**< @brief (0,0) is upper left pixel */
- int (*dm_reshape)(struct dm_internal *dmp, int width, int height);
- int (*dm_makeCurrent)(struct dm_internal *dmp);
- int (*dm_openFb)(struct dm_internal *dmp);
- int (*dm_get_internal)(struct dm_internal *dmp);
- int (*dm_put_internal)(struct dm_internal *dmp);
- unsigned long dm_id; /**< @brief window id */
- int dm_displaylist; /**< @brief !0 means device has
displaylist */
- int dm_stereo; /**< @brief stereo flag */
- double dm_bound; /**< @brief zoom-in limit */
- int dm_boundFlag;
- const char *dm_name; /**< @brief short name of device */
- const char *dm_lname; /**< @brief long name of device */
- int dm_type; /**< @brief display manager type */
- int dm_top; /**< @brief !0 means toplevel window */
- int dm_width;
- int dm_height;
- int dm_bytes_per_pixel;
- int dm_bits_per_channel; /* bits per color channel */
- int dm_lineWidth;
- int dm_lineStyle;
- fastf_t dm_aspect;
- fastf_t *dm_vp; /**< @brief (FIXME: ogl still depends on this)
Viewscale pointer */
- struct dm_vars dm_vars; /**< @brief display manager dependent variables
*/
- void *m_vars;
- void *p_vars;
- struct bu_vls dm_pathName; /**< @brief full Tcl/Tk name of drawing window
*/
- struct bu_vls dm_tkName; /**< @brief short Tcl/Tk name of drawing window
*/
- struct bu_vls dm_dName; /**< @brief Display name */
- unsigned char dm_bg[3]; /**< @brief background color */
- unsigned char dm_fg[3]; /**< @brief foreground color */
- vect_t dm_clipmin; /**< @brief minimum clipping vector */
- vect_t dm_clipmax; /**< @brief maximum clipping vector */
- int dm_debugLevel; /**< @brief !0 means debugging */
- struct bu_vls dm_log; /**< @brief !NULL && !empty means log debug output
to the file */
- int dm_perspective; /**< @brief !0 means perspective on */
- int dm_light; /**< @brief !0 means lighting on */
- int dm_transparency; /**< @brief !0 means transparency on */
- int dm_depthMask; /**< @brief !0 means depth buffer is writable */
- int dm_zbuffer; /**< @brief !0 means zbuffer on */
- int dm_zclip; /**< @brief !0 means zclipping */
- int dm_clearBufferAfter; /**< @brief 1 means clear back buffer after
drawing and swap */
- int dm_fontsize; /**< @brief !0 override's the auto font size */
- struct bu_structparse *vparse; /**< @brief Table listing settable
variables */
- fb *fbp; /**< @brief Framebuffer associated with this
display instance */
- void *dm_interp; /**< @brief interpreter */
-};
__BEGIN_DECLS
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