Revision: 75410
http://sourceforge.net/p/brlcad/code/75410
Author: starseeker
Date: 2020-04-15 18:41:12 +0000 (Wed, 15 Apr 2020)
Log Message:
-----------
switch the typedef out for just a struct dm declaration
Modified Paths:
--------------
brlcad/trunk/include/dm/calltable.h
brlcad/trunk/include/dm.h
brlcad/trunk/include/tclcad.h
brlcad/trunk/src/adrt/isst.c
brlcad/trunk/src/libdm/adc.c
brlcad/trunk/src/libdm/axes.c
brlcad/trunk/src/libdm/dm-Null.c
brlcad/trunk/src/libdm/dm-Null.h
brlcad/trunk/src/libdm/dm-X.c
brlcad/trunk/src/libdm/dm-X.h
brlcad/trunk/src/libdm/dm-generic.c
brlcad/trunk/src/libdm/dm-glx.h
brlcad/trunk/src/libdm/dm-ogl.c
brlcad/trunk/src/libdm/dm-ogl.h
brlcad/trunk/src/libdm/dm-osgl.cpp
brlcad/trunk/src/libdm/dm-osgl.h
brlcad/trunk/src/libdm/dm-plot.c
brlcad/trunk/src/libdm/dm-plot.h
brlcad/trunk/src/libdm/dm-ps.c
brlcad/trunk/src/libdm/dm-ps.h
brlcad/trunk/src/libdm/dm-qt.cpp
brlcad/trunk/src/libdm/dm-qt.h
brlcad/trunk/src/libdm/dm-tk.c
brlcad/trunk/src/libdm/dm-tk.h
brlcad/trunk/src/libdm/dm-txt.c
brlcad/trunk/src/libdm/dm-wgl.c
brlcad/trunk/src/libdm/dm-wgl.h
brlcad/trunk/src/libdm/dm_obj.c
brlcad/trunk/src/libdm/dm_private.h
brlcad/trunk/src/libdm/dm_util.c
brlcad/trunk/src/libdm/dm_xvars.h
brlcad/trunk/src/libdm/grid.c
brlcad/trunk/src/libdm/labels.c
brlcad/trunk/src/libdm/options.c
brlcad/trunk/src/libdm/osg_bob.cpp
brlcad/trunk/src/libdm/rect.c
brlcad/trunk/src/libdm/scale.c
brlcad/trunk/src/libtclcad/tclcad.c
brlcad/trunk/src/libtclcad/tclcad_init.c
brlcad/trunk/src/libtclcad/tclcad_obj.c
brlcad/trunk/src/mged/attach.c
brlcad/trunk/src/mged/cmd.c
brlcad/trunk/src/mged/mged_dm.h
brlcad/trunk/src/mged/share.c
brlcad/trunk/src/util/plot3-dm.c
Modified: brlcad/trunk/include/dm/calltable.h
===================================================================
--- brlcad/trunk/include/dm/calltable.h 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/include/dm/calltable.h 2020-04-15 18:41:12 UTC (rev 75410)
@@ -52,46 +52,46 @@
* variables behind the vparse. The txt backend, for example, doesn't need
* Tk information...
*/
-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);
+struct dm {
+ int (*dm_close)(struct dm *dmp);
+ int (*dm_drawBegin)(struct dm *dmp); /**< @brief formerly dmr_prolog
*/
+ int (*dm_drawEnd)(struct dm *dmp); /**< @brief formerly dmr_epilog
*/
+ int (*dm_normal)(struct dm *dmp);
+ int (*dm_loadMatrix)(struct dm *dmp, fastf_t *mat, int which_eye);
+ int (*dm_loadPMatrix)(struct dm *dmp, fastf_t *mat);
+ int (*dm_drawString2D)(struct dm *dmp, const char *str, fastf_t x, fastf_t
y, int size, int use_aspect); /**< @brief formerly dmr_puts */
+ int (*dm_drawLine2D)(struct dm *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 *dmp, point_t pt1, point_t pt2);
+ int (*dm_drawLines3D)(struct dm *dmp, int npoints, point_t *points, int
sflag);
+ int (*dm_drawPoint2D)(struct dm *dmp, fastf_t x, fastf_t y);
+ int (*dm_drawPoint3D)(struct dm *dmp, point_t point);
+ int (*dm_drawPoints3D)(struct dm *dmp, int npoints, point_t *points);
+ int (*dm_drawVList)(struct dm *dmp, struct bn_vlist *vp);
+ int (*dm_drawVListHiddenLine)(struct dm *dmp, register struct bn_vlist
*vp);
+ int (*dm_draw)(struct dm *dmp, struct bn_vlist *(*callback_function)(void
*), void **data); /**< @brief formerly dmr_object */
+ int (*dm_setFGColor)(struct dm *dmp, unsigned char r, unsigned char g,
unsigned char b, int strict, fastf_t transparency);
+ int (*dm_setBGColor)(struct dm *, unsigned char, unsigned char, unsigned
char);
+ int (*dm_setLineAttr)(struct dm *dmp, int width, int style); /**<
@brief currently - linewidth, (not-)dashed */
+ int (*dm_configureWin)(struct dm *dmp, int force);
+ int (*dm_setWinBounds)(struct dm *dmp, fastf_t *w);
+ int (*dm_setLight)(struct dm *dmp, int light_on);
+ int (*dm_setTransparency)(struct dm *dmp, int transparency_on);
+ int (*dm_setDepthMask)(struct dm *dmp, int depthMask_on);
+ int (*dm_setZBuffer)(struct dm *dmp, int zbuffer_on);
+ int (*dm_debug)(struct dm *dmp, int lvl); /**< @brief Set DM
debug level */
+ int (*dm_logfile)(struct dm *dmp, const char *filename); /**< @brief Set
DM log file */
+ int (*dm_beginDList)(struct dm *dmp, unsigned int list);
+ int (*dm_endDList)(struct dm *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);
+ int (*dm_freeDLists)(struct dm *dmp, unsigned int list, int range);
+ int (*dm_genDLists)(struct dm *dmp, size_t range);
+ int (*dm_draw_obj)(struct dm *dmp, struct display_list *obj);
+ int (*dm_getDisplayImage)(struct dm *dmp, unsigned char **image); /**<
@brief (0,0) is upper left pixel */
+ int (*dm_reshape)(struct dm *dmp, int width, int height);
+ int (*dm_makeCurrent)(struct dm *dmp);
+ int (*dm_openFb)(struct dm *dmp);
+ int (*dm_get_internal)(struct dm *dmp);
+ int (*dm_put_internal)(struct dm *dmp);
unsigned long dm_id; /**< @brief window id */
int dm_displaylist; /**< @brief !0 means device has
displaylist */
int dm_stereo; /**< @brief stereo flag */
Modified: brlcad/trunk/include/dm.h
===================================================================
--- brlcad/trunk/include/dm.h 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/include/dm.h 2020-04-15 18:41:12 UTC (rev 75410)
@@ -38,11 +38,11 @@
/* Use fbserv */
#define USE_FBSERV 1
-#define DM_NULL (dm *)NULL
+#define DM_NULL (struct dm *)NULL
#define DM_MIN (-2048)
#define DM_MAX (2047)
-#define DM_O(_m) offsetof(dm, _m)
+#define DM_O(_m) offsetof(struct dm, _m)
#define GED_MAX 2047.0
#define GED_MIN -2048.0
@@ -221,58 +221,58 @@
};
/* Hide the dm structure behind a typedef */
-typedef struct dm_internal dm;
+struct dm;
#define DM_OPEN(_interp, _type, _argc, _argv) dm_open(_interp, _type, _argc,
_argv)
__BEGIN_DECLS
-DM_EXPORT extern dm dm_ogl;
-DM_EXPORT extern dm dm_plot;
-DM_EXPORT extern dm dm_ps;
-DM_EXPORT extern dm dm_rtgl;
-DM_EXPORT extern dm dm_tk;
-DM_EXPORT extern dm dm_wgl;
-DM_EXPORT extern dm dm_X;
-DM_EXPORT extern dm dm_txt;
-DM_EXPORT extern dm dm_qt;
-DM_EXPORT extern dm dm_osgl;
+DM_EXPORT extern struct dm dm_ogl;
+DM_EXPORT extern struct dm dm_plot;
+DM_EXPORT extern struct dm dm_ps;
+DM_EXPORT extern struct dm dm_rtgl;
+DM_EXPORT extern struct dm dm_tk;
+DM_EXPORT extern struct dm dm_wgl;
+DM_EXPORT extern struct dm dm_X;
+DM_EXPORT extern struct dm dm_txt;
+DM_EXPORT extern struct dm dm_qt;
+DM_EXPORT extern struct dm dm_osgl;
DM_EXPORT extern int Dm_Init(void *interp);
-DM_EXPORT extern dm *dm_open(void *interp,
+DM_EXPORT extern struct dm *dm_open(void *interp,
int type,
int argc,
const char *argv[]);
-DM_EXPORT extern void *dm_interp(dm *dmp);
-DM_EXPORT extern int dm_share_dlist(dm *dmp1,
- dm *dmp2);
-DM_EXPORT extern fastf_t dm_Xx2Normal(dm *dmp,
+DM_EXPORT extern void *dm_interp(struct dm *dmp);
+DM_EXPORT extern int dm_share_dlist(struct dm *dmp1,
+ struct dm *dmp2);
+DM_EXPORT extern fastf_t dm_Xx2Normal(struct dm *dmp,
int x);
-DM_EXPORT extern int dm_Normal2Xx(dm *dmp,
+DM_EXPORT extern int dm_Normal2Xx(struct dm *dmp,
fastf_t f);
-DM_EXPORT extern fastf_t dm_Xy2Normal(dm *dmp,
+DM_EXPORT extern fastf_t dm_Xy2Normal(struct dm *dmp,
int y,
int use_aspect);
-DM_EXPORT extern int dm_Normal2Xy(dm *dmp,
+DM_EXPORT extern int dm_Normal2Xy(struct dm *dmp,
fastf_t f,
int use_aspect);
-DM_EXPORT extern void dm_fogHint(dm *dmp,
+DM_EXPORT extern void dm_fogHint(struct dm *dmp,
int fastfog);
-DM_EXPORT extern int dm_processOptions(dm *dmp, struct bu_vls *init_proc_vls,
int argc, char **argv);
+DM_EXPORT extern int dm_processOptions(struct dm *dmp, struct bu_vls
*init_proc_vls, int argc, char **argv);
DM_EXPORT extern int dm_limit(int i);
DM_EXPORT extern int dm_unlimit(int i);
DM_EXPORT extern fastf_t dm_wrap(fastf_t f);
/* adc.c */
-DM_EXPORT extern void dm_draw_adc(dm *dmp,
+DM_EXPORT extern void dm_draw_adc(struct dm *dmp,
struct bview_adc_state *adcp, mat_t
view2model, mat_t model2view);
/* axes.c */
-DM_EXPORT extern void dm_draw_data_axes(dm *dmp,
+DM_EXPORT extern void dm_draw_data_axes(struct dm *dmp,
fastf_t viewSize,
struct bview_data_axes_state *bndasp);
-DM_EXPORT extern void dm_draw_axes(dm *dmp,
+DM_EXPORT extern void dm_draw_axes(struct dm *dmp,
fastf_t viewSize,
const mat_t rmat,
struct bview_axes_state *bnasp);
@@ -288,7 +288,7 @@
fastf_t *);
/* grid.c */
-DM_EXPORT extern void dm_draw_grid(dm *dmp,
+DM_EXPORT extern void dm_draw_grid(struct dm *dmp,
struct bview_grid_state *ggsp,
fastf_t scale,
mat_t model2view,
@@ -295,22 +295,22 @@
fastf_t base2local);
/* labels.c */
-DM_EXPORT extern int dm_draw_labels(dm *dmp,
+DM_EXPORT extern int dm_draw_labels(struct dm *dmp,
struct rt_wdb *wdbp,
const char *name,
mat_t viewmat,
int *labelsColor,
- int (*labelsHook)(dm *dmp_arg, struct
rt_wdb *wdbp_arg,
+ int (*labelsHook)(struct dm *dmp_arg,
struct rt_wdb *wdbp_arg,
const char *name_arg,
mat_t viewmat_arg,
int *labelsColor_arg,
ClientData labelsHookClientdata_arg),
ClientData labelsHookClientdata);
/* rect.c */
-DM_EXPORT extern void dm_draw_rect(dm *dmp,
+DM_EXPORT extern void dm_draw_rect(struct dm *dmp,
struct bview_interactive_rect_state *grsp);
/* scale.c */
-DM_EXPORT extern void dm_draw_scale(dm *dmp,
+DM_EXPORT extern void dm_draw_scale(struct dm *dmp,
fastf_t viewSize,
int *lineColor,
int *textColor);
@@ -323,99 +323,99 @@
/* functions to make a dm struct hideable - will need to
* sort these out later */
-DM_EXPORT extern dm *dm_get();
-DM_EXPORT extern void dm_put(dm *dmp);
-DM_EXPORT extern void dm_set_null(dm *dmp); /* TODO - HACK, need general set
mechanism */
-DM_EXPORT extern const char *dm_get_dm_name(dm *dmp);
-DM_EXPORT extern const char *dm_get_dm_lname(dm *dmp);
-DM_EXPORT extern int dm_get_width(dm *dmp);
-DM_EXPORT extern int dm_get_height(dm *dmp);
-DM_EXPORT extern void dm_set_width(dm *dmp, int width);
-DM_EXPORT extern void dm_set_height(dm *dmp, int height);
-DM_EXPORT extern void dm_geometry_request(dm *dmp, int width, int height);
-DM_EXPORT extern void dm_internal_var(struct bu_vls *result, dm *dmp, const
char *key); // ick
-DM_EXPORT extern fastf_t dm_get_aspect(dm *dmp);
-DM_EXPORT extern int dm_get_type(dm *dmp);
+DM_EXPORT extern struct dm *dm_get();
+DM_EXPORT extern void dm_put(struct dm *dmp);
+DM_EXPORT extern void dm_set_null(struct dm *dmp); /* TODO - HACK, need
general set mechanism */
+DM_EXPORT extern const char *dm_get_dm_name(struct dm *dmp);
+DM_EXPORT extern const char *dm_get_dm_lname(struct dm *dmp);
+DM_EXPORT extern int dm_get_width(struct dm *dmp);
+DM_EXPORT extern int dm_get_height(struct dm *dmp);
+DM_EXPORT extern void dm_set_width(struct dm *dmp, int width);
+DM_EXPORT extern void dm_set_height(struct dm *dmp, int height);
+DM_EXPORT extern void dm_geometry_request(struct dm *dmp, int width, int
height);
+DM_EXPORT extern void dm_internal_var(struct bu_vls *result, struct dm *dmp,
const char *key); // ick
+DM_EXPORT extern fastf_t dm_get_aspect(struct dm *dmp);
+DM_EXPORT extern int dm_get_type(struct dm *dmp);
DM_EXPORT extern struct bu_vls *dm_list_types(const char separator); /* free
return list with bu_vls_free(list); BU_PUT(list, struct bu_vls); */
-DM_EXPORT extern unsigned long dm_get_id(dm *dmp);
-DM_EXPORT extern void dm_set_id(dm *dmp, unsigned long new_id);
-DM_EXPORT extern int dm_get_displaylist(dm *dmp);
-DM_EXPORT extern int dm_close(dm *dmp);
-DM_EXPORT extern unsigned char *dm_get_bg(dm *dmp);
-DM_EXPORT extern int dm_set_bg(dm *dmp, unsigned char r, unsigned char g,
unsigned char b);
-DM_EXPORT extern unsigned char *dm_get_fg(dm *dmp);
-DM_EXPORT extern int dm_set_fg(dm *dmp, unsigned char r, unsigned char g,
unsigned char b, int strict, fastf_t transparency);
-DM_EXPORT extern int dm_reshape(dm *dmp, int width, int height);
-DM_EXPORT extern int dm_make_current(dm *dmp);
-DM_EXPORT extern vect_t *dm_get_clipmin(dm *dmp);
-DM_EXPORT extern vect_t *dm_get_clipmax(dm *dmp);
-DM_EXPORT extern int dm_get_bound_flag(dm *dmp);
-DM_EXPORT extern void dm_set_bound(dm *dmp, fastf_t val);
-DM_EXPORT extern int dm_get_stereo(dm *dmp);
-DM_EXPORT extern int dm_set_win_bounds(dm *dmp, fastf_t *w);
-DM_EXPORT extern int dm_configure_win(dm *dmp, int force);
-DM_EXPORT extern struct bu_vls *dm_get_pathname(dm *dmp);
-DM_EXPORT extern struct bu_vls *dm_get_dname(dm *dmp);
-DM_EXPORT extern struct bu_vls *dm_get_tkname(dm *dmp);
-DM_EXPORT extern int dm_get_fontsize(dm *dmp);
-DM_EXPORT extern void dm_set_fontsize(dm *dmp, int size);
-DM_EXPORT extern int dm_get_light_flag(dm *dmp);
-DM_EXPORT extern void dm_set_light_flag(dm *dmp, int size);
-DM_EXPORT extern int dm_set_light(dm *dmp, int light);
-DM_EXPORT extern int dm_get_transparency(dm *dmp);
-DM_EXPORT extern int dm_set_transparency(dm *dmp, int transparency);
-DM_EXPORT extern int dm_get_zbuffer(dm *dmp);
-DM_EXPORT extern int dm_set_zbuffer(dm *dmp, int zbuffer);
-DM_EXPORT extern int dm_get_linewidth(dm *dmp);
-DM_EXPORT extern void dm_set_linewidth(dm *dmp, int linewidth);
-DM_EXPORT extern int dm_get_linestyle(dm *dmp);
-DM_EXPORT extern void dm_set_linestyle(dm *dmp, int linestyle);
-DM_EXPORT extern int dm_get_zclip(dm *dmp);
-DM_EXPORT extern void dm_set_zclip(dm *dmp, int zclip);
-DM_EXPORT extern int dm_get_perspective(dm *dmp);
-DM_EXPORT extern void dm_set_perspective(dm *dmp, fastf_t perspective);
-DM_EXPORT extern int dm_get_display_image(dm *dmp, unsigned char **image);
-DM_EXPORT extern int dm_gen_dlists(dm *dmp, size_t range);
-DM_EXPORT extern int dm_begin_dlist(dm *dmp, unsigned int list);
-DM_EXPORT extern int dm_draw_dlist(dm *dmp, unsigned int list);
-DM_EXPORT extern int dm_end_dlist(dm *dmp);
-DM_EXPORT extern int dm_free_dlists(dm *dmp, unsigned int list, int range);
-DM_EXPORT extern int dm_draw_vlist(dm *dmp, struct bn_vlist *vp);
-DM_EXPORT extern int dm_draw_vlist_hidden_line(dm *dmp, struct bn_vlist *vp);
-DM_EXPORT extern int dm_set_line_attr(dm *dmp, int width, int style);
-DM_EXPORT extern int dm_draw_begin(dm *dmp);
-DM_EXPORT extern int dm_draw_end(dm *dmp);
-DM_EXPORT extern int dm_normal(dm *dmp);
-DM_EXPORT extern int dm_loadmatrix(dm *dmp, fastf_t *mat, int eye);
-DM_EXPORT extern int dm_loadpmatrix(dm *dmp, fastf_t *mat);
-DM_EXPORT extern int dm_draw_string_2d(dm *dmp, const char *str, fastf_t x,
fastf_t y, int size, int use_aspect);
-DM_EXPORT extern int dm_draw_line_2d(dm *dmp, fastf_t x1, fastf_t y1_2d,
fastf_t x2, fastf_t y2);
-DM_EXPORT extern int dm_draw_line_3d(dm *dmp, point_t pt1, point_t pt2);
-DM_EXPORT extern int dm_draw_lines_3d(dm *dmp, int npoints, point_t *points,
int sflag);
-DM_EXPORT extern int dm_draw_point_2d(dm *dmp, fastf_t x, fastf_t y);
-DM_EXPORT extern int dm_draw_point_3d(dm *dmp, point_t pt);
-DM_EXPORT extern int dm_draw_points_3d(dm *dmp, int npoints, point_t *points);
-DM_EXPORT extern int dm_draw(dm *dmp, struct bn_vlist *(*callback)(void *),
void **data);
-DM_EXPORT extern int dm_draw_obj(dm *dmp, struct display_list *obj);
-DM_EXPORT extern int dm_set_depth_mask(dm *dmp, int d_on);
-DM_EXPORT extern int dm_debug(dm *dmp, int lvl);
-DM_EXPORT extern int dm_logfile(dm *dmp, const char *filename);
-DM_EXPORT extern fb *dm_get_fb(dm *dmp);
-DM_EXPORT extern int dm_get_fb_visible(dm *dmp);
-DM_EXPORT extern int dm_set_fb_visible(dm *dmp, int is_fb_visible);
+DM_EXPORT extern unsigned long dm_get_id(struct dm *dmp);
+DM_EXPORT extern void dm_set_id(struct dm *dmp, unsigned long new_id);
+DM_EXPORT extern int dm_get_displaylist(struct dm *dmp);
+DM_EXPORT extern int dm_close(struct dm *dmp);
+DM_EXPORT extern unsigned char *dm_get_bg(struct dm *dmp);
+DM_EXPORT extern int dm_set_bg(struct dm *dmp, unsigned char r, unsigned char
g, unsigned char b);
+DM_EXPORT extern unsigned char *dm_get_fg(struct dm *dmp);
+DM_EXPORT extern int dm_set_fg(struct dm *dmp, unsigned char r, unsigned char
g, unsigned char b, int strict, fastf_t transparency);
+DM_EXPORT extern int dm_reshape(struct dm *dmp, int width, int height);
+DM_EXPORT extern int dm_make_current(struct dm *dmp);
+DM_EXPORT extern vect_t *dm_get_clipmin(struct dm *dmp);
+DM_EXPORT extern vect_t *dm_get_clipmax(struct dm *dmp);
+DM_EXPORT extern int dm_get_bound_flag(struct dm *dmp);
+DM_EXPORT extern void dm_set_bound(struct dm *dmp, fastf_t val);
+DM_EXPORT extern int dm_get_stereo(struct dm *dmp);
+DM_EXPORT extern int dm_set_win_bounds(struct dm *dmp, fastf_t *w);
+DM_EXPORT extern int dm_configure_win(struct dm *dmp, int force);
+DM_EXPORT extern struct bu_vls *dm_get_pathname(struct dm *dmp);
+DM_EXPORT extern struct bu_vls *dm_get_dname(struct dm *dmp);
+DM_EXPORT extern struct bu_vls *dm_get_tkname(struct dm *dmp);
+DM_EXPORT extern int dm_get_fontsize(struct dm *dmp);
+DM_EXPORT extern void dm_set_fontsize(struct dm *dmp, int size);
+DM_EXPORT extern int dm_get_light_flag(struct dm *dmp);
+DM_EXPORT extern void dm_set_light_flag(struct dm *dmp, int size);
+DM_EXPORT extern int dm_set_light(struct dm *dmp, int light);
+DM_EXPORT extern int dm_get_transparency(struct dm *dmp);
+DM_EXPORT extern int dm_set_transparency(struct dm *dmp, int transparency);
+DM_EXPORT extern int dm_get_zbuffer(struct dm *dmp);
+DM_EXPORT extern int dm_set_zbuffer(struct dm *dmp, int zbuffer);
+DM_EXPORT extern int dm_get_linewidth(struct dm *dmp);
+DM_EXPORT extern void dm_set_linewidth(struct dm *dmp, int linewidth);
+DM_EXPORT extern int dm_get_linestyle(struct dm *dmp);
+DM_EXPORT extern void dm_set_linestyle(struct dm *dmp, int linestyle);
+DM_EXPORT extern int dm_get_zclip(struct dm *dmp);
+DM_EXPORT extern void dm_set_zclip(struct dm *dmp, int zclip);
+DM_EXPORT extern int dm_get_perspective(struct dm *dmp);
+DM_EXPORT extern void dm_set_perspective(struct dm *dmp, fastf_t perspective);
+DM_EXPORT extern int dm_get_display_image(struct dm *dmp, unsigned char
**image);
+DM_EXPORT extern int dm_gen_dlists(struct dm *dmp, size_t range);
+DM_EXPORT extern int dm_begin_dlist(struct dm *dmp, unsigned int list);
+DM_EXPORT extern int dm_draw_dlist(struct dm *dmp, unsigned int list);
+DM_EXPORT extern int dm_end_dlist(struct dm *dmp);
+DM_EXPORT extern int dm_free_dlists(struct dm *dmp, unsigned int list, int
range);
+DM_EXPORT extern int dm_draw_vlist(struct dm *dmp, struct bn_vlist *vp);
+DM_EXPORT extern int dm_draw_vlist_hidden_line(struct dm *dmp, struct bn_vlist
*vp);
+DM_EXPORT extern int dm_set_line_attr(struct dm *dmp, int width, int style);
+DM_EXPORT extern int dm_draw_begin(struct dm *dmp);
+DM_EXPORT extern int dm_draw_end(struct dm *dmp);
+DM_EXPORT extern int dm_normal(struct dm *dmp);
+DM_EXPORT extern int dm_loadmatrix(struct dm *dmp, fastf_t *mat, int eye);
+DM_EXPORT extern int dm_loadpmatrix(struct dm *dmp, fastf_t *mat);
+DM_EXPORT extern int dm_draw_string_2d(struct dm *dmp, const char *str,
fastf_t x, fastf_t y, int size, int use_aspect);
+DM_EXPORT extern int dm_draw_line_2d(struct dm *dmp, fastf_t x1, fastf_t
y1_2d, fastf_t x2, fastf_t y2);
+DM_EXPORT extern int dm_draw_line_3d(struct dm *dmp, point_t pt1, point_t pt2);
+DM_EXPORT extern int dm_draw_lines_3d(struct dm *dmp, int npoints, point_t
*points, int sflag);
+DM_EXPORT extern int dm_draw_point_2d(struct dm *dmp, fastf_t x, fastf_t y);
+DM_EXPORT extern int dm_draw_point_3d(struct dm *dmp, point_t pt);
+DM_EXPORT extern int dm_draw_points_3d(struct dm *dmp, int npoints, point_t
*points);
+DM_EXPORT extern int dm_draw(struct dm *dmp, struct bn_vlist *(*callback)(void
*), void **data);
+DM_EXPORT extern int dm_draw_obj(struct dm *dmp, struct display_list *obj);
+DM_EXPORT extern int dm_set_depth_mask(struct dm *dmp, int d_on);
+DM_EXPORT extern int dm_debug(struct dm *dmp, int lvl);
+DM_EXPORT extern int dm_logfile(struct dm *dmp, const char *filename);
+DM_EXPORT extern fb *dm_get_fb(struct dm *dmp);
+DM_EXPORT extern int dm_get_fb_visible(struct dm *dmp);
+DM_EXPORT extern int dm_set_fb_visible(struct dm *dmp, int is_fb_visible);
/* TODO - dm_vp is supposed to go away, but until we figure it out
* expose it here to allow dm hiding */
-DM_EXPORT extern fastf_t *dm_get_vp(dm *dmp);
-DM_EXPORT extern void dm_set_vp(dm *dmp, fastf_t *vp);
+DM_EXPORT extern fastf_t *dm_get_vp(struct dm *dmp);
+DM_EXPORT extern void dm_set_vp(struct dm *dmp, fastf_t *vp);
DM_EXPORT extern int dm_set_hook(const struct bu_structparse_map *map,
const char *key, void *data, struct
dm_hook_data *hook);
-DM_EXPORT extern struct bu_structparse *dm_get_vparse(dm *dmp);
-DM_EXPORT extern void *dm_get_mvars(dm *dmp);
+DM_EXPORT extern struct bu_structparse *dm_get_vparse(struct dm *dmp);
+DM_EXPORT extern void *dm_get_mvars(struct dm *dmp);
-DM_EXPORT extern int dm_draw_display_list(dm *dmp,
+DM_EXPORT extern int dm_draw_display_list(struct dm *dmp,
struct bu_list *dl,
fastf_t transparency_threshold,
fastf_t inv_viewsize,
@@ -430,7 +430,7 @@
DM_EXPORT extern int dm_default_type();
-/* For backwards compatibility, define macros and expose struct dm */
+/* For backwards compatibility, define macros and expose struct struct dm */
#ifdef EXPOSE_DM_HEADER
# include "../src/libdm/dm_private.h"
#endif
Modified: brlcad/trunk/include/tclcad.h
===================================================================
--- brlcad/trunk/include/tclcad.h 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/include/tclcad.h 2020-04-15 18:41:12 UTC (rev 75410)
@@ -94,7 +94,7 @@
struct bu_vls gdv_edit_motion_delta_callback;
struct bu_vls gdv_name;
struct bview *gdv_view;
- dm *gdv_dmp;
+ struct dm *gdv_dmp;
struct fbserv_obj gdv_fbs;
struct ged_obj *gdv_gop;
int gdv_hide_view;
Modified: brlcad/trunk/src/adrt/isst.c
===================================================================
--- brlcad/trunk/src/adrt/isst.c 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/adrt/isst.c 2020-04-15 18:41:12 UTC (rev 75410)
@@ -49,7 +49,7 @@
#include <string.h>
#endif
-static dm *dmp;
+static struct dm *dmp;
struct isst_s {
struct tie_s *tie;
Modified: brlcad/trunk/src/libdm/adc.c
===================================================================
--- brlcad/trunk/src/libdm/adc.c 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/adc.c 2020-04-15 18:41:12 UTC (rev 75410)
@@ -34,7 +34,7 @@
#include "dm_private.h"
static void
-dm_draw_ticks(dm *dmp, struct bview_adc_state *adcp, fastf_t angle)
+dm_draw_ticks(struct dm *dmp, struct bview_adc_state *adcp, fastf_t angle)
{
fastf_t c_tdist;
fastf_t d1, d2;
@@ -104,7 +104,7 @@
* Compute and display the angle/distance cursor.
*/
void
-dm_draw_adc(dm *dmp, struct bview_adc_state *adcp, mat_t view2model, mat_t
model2view)
+dm_draw_adc(struct dm *dmp, struct bview_adc_state *adcp, mat_t view2model,
mat_t model2view)
{
fastf_t x1, Y1; /* not "y1", due to conflict with math lib */
fastf_t x2, y2;
Modified: brlcad/trunk/src/libdm/axes.c
===================================================================
--- brlcad/trunk/src/libdm/axes.c 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/axes.c 2020-04-15 18:41:12 UTC (rev 75410)
@@ -43,7 +43,7 @@
#endif
void
-dm_draw_data_axes(dm *dmp,
+dm_draw_data_axes(struct dm *dmp,
fastf_t sf,
struct bview_data_axes_state *bndasp)
{
@@ -118,7 +118,7 @@
}
void
-dm_draw_axes(dm *dmp,
+dm_draw_axes(struct dm *dmp,
fastf_t viewSize, /* in mm */
const mat_t rmat, /* view rotation matrix */
struct bview_axes_state *bnasp)
Modified: brlcad/trunk/src/libdm/dm-Null.c
===================================================================
--- brlcad/trunk/src/libdm/dm-Null.c 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-Null.c 2020-04-15 18:41:12 UTC (rev 75410)
@@ -35,7 +35,7 @@
int
-null_close(struct dm_internal *UNUSED(dmp))
+null_close(struct dm *UNUSED(dmp))
{
return 0;
}
@@ -42,7 +42,7 @@
int
-null_drawBegin(struct dm_internal *UNUSED(dmp))
+null_drawBegin(struct dm *UNUSED(dmp))
{
return 0;
}
@@ -49,7 +49,7 @@
int
-null_drawEnd(struct dm_internal *UNUSED(dmp))
+null_drawEnd(struct dm *UNUSED(dmp))
{
return 0;
}
@@ -56,7 +56,7 @@
int
-null_normal(struct dm_internal *UNUSED(dmp))
+null_normal(struct dm *UNUSED(dmp))
{
return 0;
}
@@ -63,7 +63,7 @@
int
-null_loadMatrix(struct dm_internal *UNUSED(dmp), fastf_t *UNUSED(mat), int
UNUSED(which_eye))
+null_loadMatrix(struct dm *UNUSED(dmp), fastf_t *UNUSED(mat), int
UNUSED(which_eye))
{
return 0;
}
@@ -70,7 +70,7 @@
int
-null_loadPMatrix(struct dm_internal *UNUSED(dmp), fastf_t *UNUSED(mat))
+null_loadPMatrix(struct dm *UNUSED(dmp), fastf_t *UNUSED(mat))
{
return 0;
}
@@ -77,7 +77,7 @@
int
-null_drawString2D(struct dm_internal *UNUSED(dmp), const char *UNUSED(str),
fastf_t UNUSED(x), fastf_t UNUSED(y), int UNUSED(size), int UNUSED(use_aspect))
+null_drawString2D(struct dm *UNUSED(dmp), const char *UNUSED(str), fastf_t
UNUSED(x), fastf_t UNUSED(y), int UNUSED(size), int UNUSED(use_aspect))
{
return 0;
}
@@ -84,7 +84,7 @@
int
-null_drawLine2D(struct dm_internal *UNUSED(dmp), fastf_t UNUSED(x_1), fastf_t
UNUSED(y_1), fastf_t UNUSED(x_2), fastf_t UNUSED(y_2))
+null_drawLine2D(struct dm *UNUSED(dmp), fastf_t UNUSED(x_1), fastf_t
UNUSED(y_1), fastf_t UNUSED(x_2), fastf_t UNUSED(y_2))
{
return 0;
}
@@ -91,7 +91,7 @@
int
-null_drawLine3D(struct dm_internal *UNUSED(dmp), point_t UNUSED(pt1), point_t
UNUSED(pt2))
+null_drawLine3D(struct dm *UNUSED(dmp), point_t UNUSED(pt1), point_t
UNUSED(pt2))
{
return 0;
}
@@ -98,7 +98,7 @@
int
-null_drawLines3D(struct dm_internal *UNUSED(dmp), int UNUSED(npoints), point_t
*UNUSED(points), int UNUSED(sflag))
+null_drawLines3D(struct dm *UNUSED(dmp), int UNUSED(npoints), point_t
*UNUSED(points), int UNUSED(sflag))
{
return 0;
}
@@ -105,7 +105,7 @@
int
-null_drawPoint2D(struct dm_internal *UNUSED(dmp), fastf_t UNUSED(x), fastf_t
UNUSED(y))
+null_drawPoint2D(struct dm *UNUSED(dmp), fastf_t UNUSED(x), fastf_t UNUSED(y))
{
return 0;
}
@@ -112,7 +112,7 @@
int
-null_drawPoint3D(struct dm_internal *UNUSED(dmp), point_t UNUSED(point))
+null_drawPoint3D(struct dm *UNUSED(dmp), point_t UNUSED(point))
{
return 0;
}
@@ -119,7 +119,7 @@
int
-null_drawPoints3D(struct dm_internal *UNUSED(dmp), int UNUSED(npoints),
point_t *UNUSED(points))
+null_drawPoints3D(struct dm *UNUSED(dmp), int UNUSED(npoints), point_t
*UNUSED(points))
{
return 0;
}
@@ -126,7 +126,7 @@
int
-null_drawVList(struct dm_internal *UNUSED(dmp), struct bn_vlist *UNUSED(vp))
+null_drawVList(struct dm *UNUSED(dmp), struct bn_vlist *UNUSED(vp))
{
return 0;
}
@@ -133,7 +133,7 @@
int
-null_drawVListHiddenLine(struct dm_internal *UNUSED(dmp), struct bn_vlist
*UNUSED(vp))
+null_drawVListHiddenLine(struct dm *UNUSED(dmp), struct bn_vlist *UNUSED(vp))
{
return 0;
}
@@ -140,7 +140,7 @@
int
-null_draw(struct dm_internal *dmp, struct bn_vlist *(*callback_function)(void
*), void **data)
+null_draw(struct dm *dmp, struct bn_vlist *(*callback_function)(void *), void
**data)
{
return dmp == NULL && callback_function == NULL && data == NULL;
}
@@ -147,7 +147,7 @@
int
-null_setFGColor(struct dm_internal *UNUSED(dmp), unsigned char UNUSED(r),
unsigned char UNUSED(g), unsigned char UNUSED(b), int UNUSED(strict), fastf_t
UNUSED(transparency))
+null_setFGColor(struct dm *UNUSED(dmp), unsigned char UNUSED(r), unsigned char
UNUSED(g), unsigned char UNUSED(b), int UNUSED(strict), fastf_t
UNUSED(transparency))
{
return 0;
}
@@ -154,7 +154,7 @@
int
-null_setBGColor(struct dm_internal *UNUSED(dmp), unsigned char UNUSED(r),
unsigned char UNUSED(g), unsigned char UNUSED(b))
+null_setBGColor(struct dm *UNUSED(dmp), unsigned char UNUSED(r), unsigned char
UNUSED(g), unsigned char UNUSED(b))
{
return 0;
}
@@ -161,7 +161,7 @@
int
-null_setLineAttr(struct dm_internal *UNUSED(dmp), int UNUSED(width), int
UNUSED(style))
+null_setLineAttr(struct dm *UNUSED(dmp), int UNUSED(width), int UNUSED(style))
{
return 0;
}
@@ -168,7 +168,7 @@
int
-null_configureWin(struct dm_internal *UNUSED(dmp), int UNUSED(force))
+null_configureWin(struct dm *UNUSED(dmp), int UNUSED(force))
{
return 0;
}
@@ -175,7 +175,7 @@
int
-null_setWinBounds(struct dm_internal *UNUSED(dmp), fastf_t *UNUSED(w))
+null_setWinBounds(struct dm *UNUSED(dmp), fastf_t *UNUSED(w))
{
return 0;
}
@@ -182,7 +182,7 @@
int
-null_setLight(struct dm_internal *UNUSED(dmp), int UNUSED(light_on))
+null_setLight(struct dm *UNUSED(dmp), int UNUSED(light_on))
{
return 0;
}
@@ -189,7 +189,7 @@
int
-null_setTransparency(struct dm_internal *UNUSED(dmp), int UNUSED(transparency))
+null_setTransparency(struct dm *UNUSED(dmp), int UNUSED(transparency))
{
return 0;
}
@@ -196,7 +196,7 @@
int
-null_setDepthMask(struct dm_internal *UNUSED(dmp), int UNUSED(mask))
+null_setDepthMask(struct dm *UNUSED(dmp), int UNUSED(mask))
{
return 0;
}
@@ -203,7 +203,7 @@
int
-null_setZBuffer(struct dm_internal *UNUSED(dmp), int UNUSED(zbuffer_on))
+null_setZBuffer(struct dm *UNUSED(dmp), int UNUSED(zbuffer_on))
{
return 0;
}
@@ -210,19 +210,19 @@
int
-null_debug(struct dm_internal *UNUSED(dmp), int UNUSED(lvl))
+null_debug(struct dm *UNUSED(dmp), int UNUSED(lvl))
{
return 0;
}
int
-null_logfile(struct dm_internal *UNUSED(dmp), const char *UNUSED(filename))
+null_logfile(struct dm *UNUSED(dmp), const char *UNUSED(filename))
{
return 0;
}
int
-null_beginDList(struct dm_internal *UNUSED(dmp), unsigned int UNUSED(list))
+null_beginDList(struct dm *UNUSED(dmp), unsigned int UNUSED(list))
{
return 0;
}
@@ -229,7 +229,7 @@
int
-null_endDList(struct dm_internal *UNUSED(dmp))
+null_endDList(struct dm *UNUSED(dmp))
{
return 0;
}
@@ -243,7 +243,7 @@
int
-null_freeDLists(struct dm_internal *UNUSED(dmp), unsigned int UNUSED(list),
int UNUSED(range))
+null_freeDLists(struct dm *UNUSED(dmp), unsigned int UNUSED(list), int
UNUSED(range))
{
return 0;
}
@@ -250,7 +250,7 @@
int
-null_genDLists(struct dm_internal *UNUSED(dmp), size_t UNUSED(range))
+null_genDLists(struct dm *UNUSED(dmp), size_t UNUSED(range))
{
return 0;
}
@@ -257,7 +257,7 @@
int
-null_getDisplayImage(struct dm_internal *UNUSED(dmp), unsigned char
**UNUSED(image))
+null_getDisplayImage(struct dm *UNUSED(dmp), unsigned char **UNUSED(image))
{
return 0;
}
@@ -264,7 +264,7 @@
int
-null_reshape(struct dm_internal *UNUSED(dmp), int UNUSED(width), int
UNUSED(height))
+null_reshape(struct dm *UNUSED(dmp), int UNUSED(width), int UNUSED(height))
{
return 0;
}
@@ -271,7 +271,7 @@
int
-null_makeCurrent(struct dm_internal *UNUSED(dmp))
+null_makeCurrent(struct dm *UNUSED(dmp))
{
return 0;
}
@@ -278,13 +278,13 @@
int
-null_openFb(struct dm_internal *UNUSED(dmp))
+null_openFb(struct dm *UNUSED(dmp))
{
return 0;
}
-struct dm_internal dm_null = {
+struct dm dm_null = {
null_close,
null_drawBegin,
null_drawEnd,
Modified: brlcad/trunk/src/libdm/dm-Null.h
===================================================================
--- brlcad/trunk/src/libdm/dm-Null.h 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-Null.h 2020-04-15 18:41:12 UTC (rev 75410)
@@ -17,7 +17,7 @@
* License along with this file; see the file named COPYING for more
* information.
*/
-/** @addtogroup libdm */
+/** @addtogroup libstruct dm */
/** @{ */
/** @file dm-Null.h
*
@@ -31,119 +31,119 @@
__BEGIN_DECLS
-DM_EXPORT extern dm dm_null;
+DM_EXPORT extern struct dm dm_null;
DM_EXPORT extern int
-null_close(dm *dmp);
+null_close(struct dm *dmp);
DM_EXPORT extern int
-null_drawBegin(dm *dmp);
+null_drawBegin(struct dm *dmp);
DM_EXPORT extern int
-null_drawEnd(dm *dmp);
+null_drawEnd(struct dm *dmp);
DM_EXPORT extern int
-null_normal(dm *dmp);
+null_normal(struct dm *dmp);
DM_EXPORT extern int
-null_loadMatrix(dm *dmp, fastf_t *mat, int which_eye);
+null_loadMatrix(struct dm *dmp, fastf_t *mat, int which_eye);
DM_EXPORT extern int
-null_loadPMatrix(dm *dmp, fastf_t *mat);
+null_loadPMatrix(struct dm *dmp, fastf_t *mat);
DM_EXPORT extern int
-null_drawString2D(dm *dmp, const char *str, fastf_t x, fastf_t y, int size,
int use_aspect);
+null_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int
size, int use_aspect);
DM_EXPORT extern int
-null_drawLine2D(dm *dmp, fastf_t x_1, fastf_t y_1, fastf_t x_2, fastf_t y_2);
+null_drawLine2D(struct dm *dmp, fastf_t x_1, fastf_t y_1, fastf_t x_2, fastf_t
y_2);
DM_EXPORT extern int
-null_drawLine3D(dm *dmp, point_t pt1, point_t pt2);
+null_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2);
DM_EXPORT extern int
-null_drawLines3D(dm *dmp, int npoints, point_t *points, int sflag);
+null_drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag);
DM_EXPORT extern int
-null_drawPoint2D(dm *dmp, fastf_t x, fastf_t y);
+null_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y);
DM_EXPORT extern int
-null_drawPoint3D(dm *dmp, point_t point);
+null_drawPoint3D(struct dm *dmp, point_t point);
DM_EXPORT extern int
-null_drawPoints3D(dm *dmp, int npoints, point_t *points);
+null_drawPoints3D(struct dm *dmp, int npoints, point_t *points);
DM_EXPORT extern int
-null_drawVList(dm *dmp, struct bn_vlist *vp);
+null_drawVList(struct dm *dmp, struct bn_vlist *vp);
DM_EXPORT extern int
-null_drawVListHiddenLine(dm *dmp, struct bn_vlist *vp);
+null_drawVListHiddenLine(struct dm *dmp, struct bn_vlist *vp);
DM_EXPORT extern int
-null_draw(dm *dmp, struct bn_vlist *(*callback_function)(void *), void **data);
+null_draw(struct dm *dmp, struct bn_vlist *(*callback_function)(void *), void
**data);
DM_EXPORT extern int
-null_setFGColor(dm *dmp, unsigned char r, unsigned char g, unsigned char b,
int strict, fastf_t transparency);
+null_setFGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned
char b, int strict, fastf_t transparency);
DM_EXPORT extern int
-null_setBGColor(dm *dmp, unsigned char r, unsigned char g, unsigned char b);
+null_setBGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned
char b);
DM_EXPORT extern int
-null_setLineAttr(dm *dmp, int width, int style);
+null_setLineAttr(struct dm *dmp, int width, int style);
DM_EXPORT extern int
-null_configureWin(dm *dmp, int force);
+null_configureWin(struct dm *dmp, int force);
DM_EXPORT extern int
-null_setWinBounds(dm *dmp, fastf_t *w);
+null_setWinBounds(struct dm *dmp, fastf_t *w);
DM_EXPORT extern int
-null_setLight(dm *dmp, int light_on);
+null_setLight(struct dm *dmp, int light_on);
DM_EXPORT extern int
-null_setTransparency(dm *dmp, int transparency);
+null_setTransparency(struct dm *dmp, int transparency);
DM_EXPORT extern int
-null_setDepthMask(dm *dmp, int mask);
+null_setDepthMask(struct dm *dmp, int mask);
DM_EXPORT extern int
-null_setZBuffer(dm *dmp, int zbuffer_on);
+null_setZBuffer(struct dm *dmp, int zbuffer_on);
DM_EXPORT extern int
-null_debug(dm *dmp, int lvl);
+null_debug(struct dm *dmp, int lvl);
DM_EXPORT extern int
-null_beginDList(dm *dmp, unsigned int list);
+null_beginDList(struct dm *dmp, unsigned int list);
DM_EXPORT extern int
-null_endDList(dm *dmp);
+null_endDList(struct dm *dmp);
DM_EXPORT extern int
@@ -151,43 +151,43 @@
DM_EXPORT extern int
-null_freeDLists(dm *dmp, unsigned int list, int range);
+null_freeDLists(struct dm *dmp, unsigned int list, int range);
DM_EXPORT extern int
-null_genDLists(dm *dmp, size_t range);
+null_genDLists(struct dm *dmp, size_t range);
DM_EXPORT extern int
-null_getDisplayImage(dm *dmp, unsigned char **image);
+null_getDisplayImage(struct dm *dmp, unsigned char **image);
DM_EXPORT extern int
-null_draw(dm *dmp, struct bn_vlist *(*callback_function)(void *), void **data);
+null_draw(struct dm *dmp, struct bn_vlist *(*callback_function)(void *), void
**data);
DM_EXPORT extern int
-null_fg(dm *dmp, unsigned char r, unsigned char g, unsigned char b, int
strict, fastf_t transparency);
+null_fg(struct dm *dmp, unsigned char r, unsigned char g, unsigned char b, int
strict, fastf_t transparency);
DM_EXPORT extern int
-null_bg(dm *dmp, unsigned char r, unsigned char g, unsigned char b);
+null_bg(struct dm *dmp, unsigned char r, unsigned char g, unsigned char b);
DM_EXPORT extern int
-null_reshape(dm *dmp, int width, int height);
+null_reshape(struct dm *dmp, int width, int height);
DM_EXPORT extern int
-null_makeCurrent(dm *dmp);
+null_makeCurrent(struct dm *dmp);
DM_EXPORT extern void
-null_processEvents(dm *dmp);
+null_processEvents(struct dm *dmp);
DM_EXPORT extern int
-null_openFb(dm *dmp);
+null_openFb(struct dm *dmp);
__END_DECLS
Modified: brlcad/trunk/src/libdm/dm-X.c
===================================================================
--- brlcad/trunk/src/libdm/dm-X.c 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-X.c 2020-04-15 18:41:12 UTC (rev 75410)
@@ -142,7 +142,7 @@
HIDDEN int
-X_reshape(struct dm_internal *dmp, int width, int height)
+X_reshape(struct dm *dmp, int width, int height)
{
struct x_vars *privars = (struct x_vars *)dmp->dm_vars.priv_vars;
@@ -158,7 +158,7 @@
HIDDEN int
-X_configureWin_guts(struct dm_internal *dmp, int force)
+X_configureWin_guts(struct dm *dmp, int force)
{
XWindowAttributes xwa;
XFontStruct *newfontstruct;
@@ -280,7 +280,7 @@
HIDDEN XVisualInfo *
-X_choose_visual(struct dm_internal *dmp)
+X_choose_visual(struct dm *dmp)
{
XVisualInfo *vip, vitemp, *vibase, *maxvip;
int num, i, j;
@@ -376,7 +376,7 @@
* Gracefully release the display.
*/
HIDDEN int
-X_close(struct dm_internal *dmp)
+X_close(struct dm *dmp)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct x_vars *privars = (struct x_vars *)dmp->dm_vars.priv_vars;
@@ -419,7 +419,7 @@
* Fire up the display manager, and the display processor.
*
*/
-struct dm_internal *
+struct dm *
X_open_dm(Tcl_Interp *interp, int argc, char **argv)
{
static int count = 0;
@@ -437,7 +437,7 @@
#endif
struct bu_vls str = BU_VLS_INIT_ZERO;
struct bu_vls init_proc_vls = BU_VLS_INIT_ZERO;
- struct dm_internal *dmp = (struct dm_internal *)NULL;
+ struct dm *dmp = (struct dm *)NULL;
Tk_Window tkwin = (Tk_Window)NULL;
Screen *screen = (Screen *)NULL;
@@ -450,7 +450,7 @@
}
#endif
- BU_ALLOC(dmp, struct dm_internal);
+ BU_ALLOC(dmp, struct dm);
*dmp = dm_X; /* struct copy */
dmp->dm_interp = interp;
@@ -762,7 +762,7 @@
HIDDEN int
-X_drawBegin(struct dm_internal *dmp)
+X_drawBegin(struct dm *dmp)
{
XGCValues gcv;
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
@@ -793,7 +793,7 @@
HIDDEN int
-X_drawEnd(struct dm_internal *dmp)
+X_drawEnd(struct dm *dmp)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct x_vars *privars = (struct x_vars *)dmp->dm_vars.priv_vars;
@@ -820,7 +820,7 @@
* calls to X_draw().
*/
HIDDEN int
-X_loadMatrix(struct dm_internal *dmp, fastf_t *mat, int which_eye)
+X_loadMatrix(struct dm *dmp, fastf_t *mat, int which_eye)
{
struct x_vars *privars = (struct x_vars *)dmp->dm_vars.priv_vars;
@@ -843,7 +843,7 @@
HIDDEN int
-X_drawVList(struct dm_internal *dmp, struct bn_vlist *vp)
+X_drawVList(struct dm *dmp, struct bn_vlist *vp)
{
extern int vectorThreshold; /* defined in libdm/tcl.c */
@@ -1156,7 +1156,7 @@
HIDDEN int
-X_draw(struct dm_internal *dmp, struct bn_vlist *(*callback_function)(void *),
void **data)
+X_draw(struct dm *dmp, struct bn_vlist *(*callback_function)(void *), void
**data)
{
struct bn_vlist *vp;
if (!callback_function) {
@@ -1180,7 +1180,7 @@
* not scaled, rotated, displaced, etc.).
*/
HIDDEN int
-X_normal(struct dm_internal *dmp)
+X_normal(struct dm *dmp)
{
if (dmp->dm_debugLevel)
bu_log("X_normal()\n");
@@ -1194,7 +1194,7 @@
* beam is as specified.
*/
HIDDEN int
-X_drawString2D(struct dm_internal *dmp, const char *str, fastf_t x, fastf_t y,
int size, int use_aspect)
+X_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int
size, int use_aspect)
{
int sx, sy;
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
@@ -1225,7 +1225,7 @@
HIDDEN int
-X_drawLine2D(struct dm_internal *dmp, fastf_t x_1, fastf_t y_1, fastf_t x_2,
fastf_t y_2)
+X_drawLine2D(struct dm *dmp, fastf_t x_1, fastf_t y_1, fastf_t x_2, fastf_t
y_2)
{
int sx1, sy1, sx2, sy2;
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
@@ -1254,7 +1254,7 @@
HIDDEN int
-X_drawLine3D(struct dm_internal *dmp, point_t pt1, point_t pt2)
+X_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2)
{
return draw_Line3D(dmp, pt1, pt2);
}
@@ -1261,7 +1261,7 @@
HIDDEN int
-X_drawLines3D(struct dm_internal *dmp, int npoints, point_t *points, int
UNUSED(sflag))
+X_drawLines3D(struct dm *dmp, int npoints, point_t *points, int UNUSED(sflag))
{
if (!dmp || npoints < 0 || !points)
return BRLCAD_ERROR;
@@ -1271,7 +1271,7 @@
HIDDEN int
-X_drawPoint2D(struct dm_internal *dmp, fastf_t x, fastf_t y)
+X_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y)
{
int sx, sy;
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
@@ -1295,7 +1295,7 @@
HIDDEN int
-X_setFGColor(struct dm_internal *dmp, unsigned char r, unsigned char g,
unsigned char b, int strict, fastf_t transparency)
+X_setFGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned char
b, int strict, fastf_t transparency)
{
XGCValues gcv;
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
@@ -1337,7 +1337,7 @@
HIDDEN int
-X_setBGColor(struct dm_internal *dmp, unsigned char r, unsigned char g,
unsigned char b)
+X_setBGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned char b)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct x_vars *privars = (struct x_vars *)dmp->dm_vars.priv_vars;
@@ -1372,7 +1372,7 @@
HIDDEN int
-X_setLineAttr(struct dm_internal *dmp, int width, int style)
+X_setLineAttr(struct dm *dmp, int width, int style)
{
int linestyle;
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
@@ -1401,7 +1401,7 @@
HIDDEN int
-X_debug(struct dm_internal *dmp, int lvl)
+X_debug(struct dm *dmp, int lvl)
{
dmp->dm_debugLevel = lvl;
@@ -1410,7 +1410,7 @@
HIDDEN int
-X_logfile(struct dm_internal *dmp, const char *filename)
+X_logfile(struct dm *dmp, const char *filename)
{
bu_vls_sprintf(&dmp->dm_log, "%s", filename);
@@ -1419,7 +1419,7 @@
HIDDEN int
-X_setWinBounds(struct dm_internal *dmp, fastf_t *w)
+X_setWinBounds(struct dm *dmp, fastf_t *w)
{
if (dmp->dm_debugLevel)
bu_log("X_setWinBounds()\n");
@@ -1436,7 +1436,7 @@
HIDDEN int
-X_configureWin(struct dm_internal *dmp, int force)
+X_configureWin(struct dm *dmp, int force)
{
/* don't force */
return X_configureWin_guts(dmp, force);
@@ -1444,7 +1444,7 @@
HIDDEN int
-X_setLight(struct dm_internal *dmp, int light_on)
+X_setLight(struct dm *dmp, int light_on)
{
if (dmp->dm_debugLevel)
bu_log("X_setLight:\n");
@@ -1456,7 +1456,7 @@
HIDDEN int
-X_setZBuffer(struct dm_internal *dmp, int zbuffer_on)
+X_setZBuffer(struct dm *dmp, int zbuffer_on)
{
if (dmp->dm_debugLevel)
bu_log("X_setZBuffer:\n");
@@ -1468,7 +1468,7 @@
HIDDEN int
-X_getDisplayImage(struct dm_internal *dmp, unsigned char **image)
+X_getDisplayImage(struct dm *dmp, unsigned char **image)
{
XImage *ximage_p;
unsigned char **rows;
@@ -1682,7 +1682,7 @@
}
int
-X_openFb(struct dm_internal *dmp)
+X_openFb(struct dm *dmp)
{
struct fb_platform_specific *fb_ps;
struct X24_fb_info *xfb_ps;
@@ -1712,7 +1712,7 @@
};
/* Display Manager package interface */
-struct dm_internal dm_X = {
+struct dm dm_X = {
X_close,
X_drawBegin,
X_drawEnd,
Modified: brlcad/trunk/src/libdm/dm-X.h
===================================================================
--- brlcad/trunk/src/libdm/dm-X.h 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-X.h 2020-04-15 18:41:12 UTC (rev 75410)
@@ -17,7 +17,7 @@
* License along with this file; see the file named COPYING for more
* information.
*/
-/** @addtogroup libdm */
+/** @addtogroup libstruct dm */
/** @{ */
/** @file dm-X.h
*
Modified: brlcad/trunk/src/libdm/dm-generic.c
===================================================================
--- brlcad/trunk/src/libdm/dm-generic.c 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-generic.c 2020-04-15 18:41:12 UTC (rev 75410)
@@ -40,59 +40,59 @@
#include "dm-Null.h"
#include "rt/solid.h"
-extern dm *plot_open(void *interp, int argc, const char *argv[]);
-extern dm *ps_open(void *interp, int argc, const char *argv[]);
-extern dm *txt_open(void *interp, int argc, const char **argv);
+extern struct dm *plot_open(void *interp, int argc, const char *argv[]);
+extern struct dm *ps_open(void *interp, int argc, const char *argv[]);
+extern struct dm *txt_open(void *interp, int argc, const char **argv);
#ifdef DM_X
# if defined(HAVE_TK)
-extern dm *X_open_dm(void *interp, int argc, const char **argv);
+extern struct dm *X_open_dm(void *interp, int argc, const char **argv);
# endif
#endif /* DM_X */
#ifdef DM_TK
-extern dm *tk_open_dm(void *interp, int argc, const char **argv);
+extern struct dm *tk_open_dm(void *interp, int argc, const char **argv);
#endif /* DM_TK */
#ifdef DM_OGL
# if defined(HAVE_TK)
-extern dm *ogl_open(void *interp, int argc, const char **argv);
-extern void ogl_fogHint(dm *dmp, int fastfog);
-extern int ogl_share_dlist(dm *dmp1, dm *dmp2);
+extern struct dm *ogl_open(void *interp, int argc, const char **argv);
+extern void ogl_fogHint(struct dm *dmp, int fastfog);
+extern int ogl_share_dlist(struct dm *dmp1, struct dm *dmp2);
# endif
#endif /* DM_OGL */
#ifdef DM_OSGL
-extern dm *osgl_open(void *interp, int argc, const char **argv);
-extern void osgl_fogHint(dm *dmp, int fastfog);
-extern int osgl_share_dlist(dm *dmp1, dm *dmp2);
+extern struct dm *osgl_open(void *interp, int argc, const char **argv);
+extern void osgl_fogHint(struct dm *dmp, int fastfog);
+extern int osgl_share_dlist(struct dm *dmp1, struct dm *dmp2);
#endif /* DM_OSGL*/
#ifdef DM_RTGL
-extern dm *rtgl_open(void *interp, int argc, const char **argv);
-extern void rtgl_fogHint(dm *dmp, int fastfog);
-extern int rtgl_share_dlist(dm *dmp1, dm *dmp2);
+extern struct dm *rtgl_open(void *interp, int argc, const char **argv);
+extern void rtgl_fogHint(struct dm *dmp, int fastfog);
+extern int rtgl_share_dlist(struct dm *dmp1, struct dm *dmp2);
#endif /* DM_RTGL */
#ifdef DM_WGL
-extern dm *wgl_open(void *interp, int argc, const char **argv);
-extern void wgl_fogHint(dm *dmp, int fastfog);
-extern int wgl_share_dlist(dm *dmp1, dm *dmp2);
+extern struct dm *wgl_open(void *interp, int argc, const char **argv);
+extern void wgl_fogHint(struct dm *dmp, int fastfog);
+extern int wgl_share_dlist(struct dm *dmp1, struct dm *dmp2);
#endif /* DM_WGL */
#ifdef DM_QT
-extern dm *qt_open(void *interp, int argc, const char **argv);
+extern struct dm *qt_open(void *interp, int argc, const char **argv);
#endif /* DM_QT */
-HIDDEN dm *
+HIDDEN struct dm *
null_dm_open(void *interp, int argc, const char *argv[])
{
- dm *dmp = DM_NULL;
+ struct dm *dmp = DM_NULL;
if (argc < 0 || !argv)
return DM_NULL;
- BU_ALLOC(dmp, struct dm_internal);
+ BU_ALLOC(dmp, struct dm);
*dmp = dm_null;
dmp->dm_interp = interp;
@@ -101,7 +101,7 @@
}
-dm *
+struct dm *
dm_open(void *interp, int type, int argc, const char *argv[])
{
switch (type) {
@@ -157,7 +157,7 @@
}
void *
-dm_interp(dm *dmp)
+dm_interp(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return (void *)dmp->dm_interp;
@@ -168,7 +168,7 @@
* NULL, then dmp1 will no longer share its display lists.
*/
int
-dm_share_dlist(dm *dmp1, dm *dmp2)
+dm_share_dlist(struct dm *dmp1, struct dm *dmp2)
{
if (UNLIKELY(!dmp1) || UNLIKELY(!dmp2)) return BRLCAD_ERROR;
@@ -209,9 +209,9 @@
void
#if (defined HAVE_TK)
-dm_geometry_request(dm *dmp, int width, int height)
+dm_geometry_request(struct dm *dmp, int width, int height)
#else
-dm_geometry_request(dm *dmp, int UNUSED(width), int UNUSED(height))
+dm_geometry_request(struct dm *dmp, int UNUSED(width), int UNUSED(height))
#endif
{
if (!dmp) return;
@@ -238,7 +238,7 @@
};
void
-dm_internal_var(struct bu_vls *result, dm *dmp, const char *key)
+dm_internal_var(struct bu_vls *result, struct dm *dmp, const char *key)
{
if (!dmp || !result) return;
if (!key) {
@@ -253,7 +253,7 @@
/* Properly generic function */
fastf_t
-dm_Xx2Normal(dm *dmp, int x)
+dm_Xx2Normal(struct dm *dmp, int x)
{
if (UNLIKELY(!dmp)) return 0.0;
return ((x / (fastf_t)dmp->dm_width - 0.5) * 2.0);
@@ -260,7 +260,7 @@
}
int
-dm_Normal2Xx(dm *dmp, fastf_t f)
+dm_Normal2Xx(struct dm *dmp, fastf_t f)
{
if (UNLIKELY(!dmp)) return 0.0;
return (f * 0.5 + 0.5) * dmp->dm_width;
@@ -267,7 +267,7 @@
}
fastf_t
-dm_Xy2Normal(dm *dmp, int y, int use_aspect)
+dm_Xy2Normal(struct dm *dmp, int y, int use_aspect)
{
if (UNLIKELY(!dmp)) return 0.0;
if (use_aspect)
@@ -277,7 +277,7 @@
}
int
-dm_Normal2Xy(dm *dmp, fastf_t f, int use_aspect)
+dm_Normal2Xy(struct dm *dmp, fastf_t f, int use_aspect)
{
if (UNLIKELY(!dmp)) return 0.0;
if (use_aspect)
@@ -287,7 +287,7 @@
}
void
-dm_fogHint(dm *dmp, int fastfog)
+dm_fogHint(struct dm *dmp, int fastfog)
{
if (UNLIKELY(!dmp)) {
bu_log("WARNING: NULL display (fastfog => %d)\n", fastfog);
@@ -317,11 +317,11 @@
}
}
-dm *
+struct dm *
dm_get()
{
- struct dm_internal *new_dm = DM_NULL;
- BU_GET(new_dm, struct dm_internal);
+ struct dm *new_dm = DM_NULL;
+ BU_GET(new_dm, struct dm);
bu_vls_init(&new_dm->dm_pathName);
bu_vls_init(&new_dm->dm_dName);
@@ -329,7 +329,7 @@
}
void
-dm_put(dm *dmp)
+dm_put(struct dm *dmp)
{
if (dmp && dmp != DM_NULL) {
bu_vls_free(&dmp->dm_pathName);
@@ -337,12 +337,12 @@
if (dmp->fbp) fb_put(dmp->fbp);
if (dmp->dm_put_internal)
dmp->dm_put_internal(dmp);
- BU_PUT(dmp, struct dm_internal);
+ BU_PUT(dmp, struct dm);
}
}
void
-dm_set_null(dm *dmp)
+dm_set_null(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return;
*dmp = dm_null;
@@ -349,7 +349,7 @@
}
fb *
-dm_get_fb(dm *dmp)
+dm_get_fb(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
if (dmp->fbp == FB_NULL)
@@ -358,7 +358,7 @@
}
const char *
-dm_get_dm_name(dm *dmp)
+dm_get_dm_name(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return dmp->dm_name;
@@ -365,7 +365,7 @@
}
const char *
-dm_get_dm_lname(dm *dmp)
+dm_get_dm_lname(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return dmp->dm_lname;
@@ -372,7 +372,7 @@
}
int
-dm_get_width(dm *dmp)
+dm_get_width(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_width;
@@ -379,7 +379,7 @@
}
int
-dm_get_height(dm *dmp)
+dm_get_height(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_height;
@@ -386,7 +386,7 @@
}
void
-dm_set_width(dm *dmp, int width)
+dm_set_width(struct dm *dmp, int width)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_width = width;
@@ -393,7 +393,7 @@
}
void
-dm_set_height(dm *dmp, int height)
+dm_set_height(struct dm *dmp, int height)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_height = height;
@@ -401,7 +401,7 @@
int
-dm_get_type(dm *dmp)
+dm_get_type(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_type;
@@ -408,7 +408,7 @@
}
int
-dm_get_displaylist(dm *dmp)
+dm_get_displaylist(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_displaylist;
@@ -415,7 +415,7 @@
}
fastf_t
-dm_get_aspect(dm *dmp)
+dm_get_aspect(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_aspect;
@@ -422,7 +422,7 @@
}
int
-dm_get_fontsize(dm *dmp)
+dm_get_fontsize(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_fontsize;
@@ -429,7 +429,7 @@
}
void
-dm_set_fontsize(dm *dmp, int size)
+dm_set_fontsize(struct dm *dmp, int size)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_fontsize = size;
@@ -436,7 +436,7 @@
}
int
-dm_get_light_flag(dm *dmp)
+dm_get_light_flag(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_light;
@@ -443,7 +443,7 @@
}
void
-dm_set_light_flag(dm *dmp, int val)
+dm_set_light_flag(struct dm *dmp, int val)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_light = val;
@@ -450,7 +450,7 @@
}
int
-dm_close(dm *dmp)
+dm_close(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_close(dmp);
@@ -457,7 +457,7 @@
}
unsigned char *
-dm_get_bg(dm *dmp)
+dm_get_bg(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return dmp->dm_bg;
@@ -464,7 +464,7 @@
}
int
-dm_set_bg(dm *dmp, unsigned char r, unsigned char g, unsigned char b)
+dm_set_bg(struct dm *dmp, unsigned char r, unsigned char g, unsigned char b)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_setBGColor(dmp, r, g, b);
@@ -471,7 +471,7 @@
}
unsigned char *
-dm_get_fg(dm *dmp)
+dm_get_fg(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return dmp->dm_fg;
@@ -478,7 +478,7 @@
}
int
-dm_set_fg(dm *dmp, unsigned char r, unsigned char g, unsigned char b, int
strict, fastf_t transparency)
+dm_set_fg(struct dm *dmp, unsigned char r, unsigned char g, unsigned char b,
int strict, fastf_t transparency)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_setFGColor(dmp, r, g, b, strict, transparency);
@@ -485,7 +485,7 @@
}
int
-dm_reshape(dm *dmp, int width, int height)
+dm_reshape(struct dm *dmp, int width, int height)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_reshape(dmp, width, height);
@@ -492,7 +492,7 @@
}
int
-dm_make_current(dm *dmp)
+dm_make_current(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_makeCurrent(dmp);
@@ -499,7 +499,7 @@
}
vect_t *
-dm_get_clipmin(dm *dmp)
+dm_get_clipmin(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return &(dmp->dm_clipmin);
@@ -507,7 +507,7 @@
vect_t *
-dm_get_clipmax(dm *dmp)
+dm_get_clipmax(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return &(dmp->dm_clipmax);
@@ -514,7 +514,7 @@
}
int
-dm_get_bound_flag(dm *dmp)
+dm_get_bound_flag(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_boundFlag;
@@ -521,7 +521,7 @@
}
void
-dm_set_bound(dm *dmp, fastf_t val)
+dm_set_bound(struct dm *dmp, fastf_t val)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_bound = val;
@@ -528,7 +528,7 @@
}
int
-dm_set_win_bounds(dm *dmp, fastf_t *w)
+dm_set_win_bounds(struct dm *dmp, fastf_t *w)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_setWinBounds(dmp, w);
@@ -535,13 +535,13 @@
}
int
-dm_get_stereo(dm *dmp)
+dm_get_stereo(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_stereo;
}
int
-dm_configure_win(dm *dmp, int force)
+dm_configure_win(struct dm *dmp, int force)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_configureWin(dmp, force);
@@ -548,7 +548,7 @@
}
struct bu_vls *
-dm_get_pathname(dm *dmp)
+dm_get_pathname(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return &(dmp->dm_pathName);
@@ -556,7 +556,7 @@
struct bu_vls *
-dm_get_dname(dm *dmp)
+dm_get_dname(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return &(dmp->dm_dName);
@@ -563,7 +563,7 @@
}
struct bu_vls *
-dm_get_tkname(dm *dmp)
+dm_get_tkname(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return &(dmp->dm_tkName);
@@ -570,7 +570,7 @@
}
unsigned long
-dm_get_id(dm *dmp)
+dm_get_id(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_id;
@@ -577,7 +577,7 @@
}
void
-dm_set_id(dm *dmp, unsigned long new_id)
+dm_set_id(struct dm *dmp, unsigned long new_id)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_id = new_id;
@@ -584,7 +584,7 @@
}
int
-dm_set_light(dm *dmp, int light)
+dm_set_light(struct dm *dmp, int light)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_setLight(dmp, light);
@@ -591,7 +591,7 @@
}
int
-dm_get_transparency(dm *dmp)
+dm_get_transparency(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_transparency;
@@ -598,7 +598,7 @@
}
int
-dm_set_transparency(dm *dmp, int transparency)
+dm_set_transparency(struct dm *dmp, int transparency)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_setTransparency(dmp, transparency);
@@ -605,7 +605,7 @@
}
int
-dm_get_zbuffer(dm *dmp)
+dm_get_zbuffer(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_zbuffer;
@@ -612,7 +612,7 @@
}
int
-dm_set_zbuffer(dm *dmp, int zbuffer)
+dm_set_zbuffer(struct dm *dmp, int zbuffer)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_setZBuffer(dmp, zbuffer);
@@ -619,7 +619,7 @@
}
int
-dm_get_linewidth(dm *dmp)
+dm_get_linewidth(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_lineWidth;
@@ -626,7 +626,7 @@
}
void
-dm_set_linewidth(dm *dmp, int linewidth)
+dm_set_linewidth(struct dm *dmp, int linewidth)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_lineWidth = linewidth;
@@ -633,7 +633,7 @@
}
int
-dm_get_linestyle(dm *dmp)
+dm_get_linestyle(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_lineStyle;
@@ -640,7 +640,7 @@
}
void
-dm_set_linestyle(dm *dmp, int linestyle)
+dm_set_linestyle(struct dm *dmp, int linestyle)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_lineStyle = linestyle;
@@ -647,7 +647,7 @@
}
int
-dm_set_line_attr(dm *dmp, int width, int style)
+dm_set_line_attr(struct dm *dmp, int width, int style)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_setLineAttr(dmp, width, style);
@@ -655,7 +655,7 @@
int
-dm_get_zclip(dm *dmp)
+dm_get_zclip(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_zclip;
@@ -662,7 +662,7 @@
}
void
-dm_set_zclip(dm *dmp, int zclip)
+dm_set_zclip(struct dm *dmp, int zclip)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_zclip = zclip;
@@ -669,7 +669,7 @@
}
int
-dm_get_perspective(dm *dmp)
+dm_get_perspective(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_perspective;
@@ -676,7 +676,7 @@
}
void
-dm_set_perspective(dm *dmp, fastf_t perspective)
+dm_set_perspective(struct dm *dmp, fastf_t perspective)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_perspective = perspective;
@@ -683,7 +683,7 @@
}
int
-dm_get_display_image(struct dm_internal *dmp, unsigned char **image)
+dm_get_display_image(struct dm *dmp, unsigned char **image)
{
if (!dmp || !image) return 0;
return dmp->dm_getDisplayImage(dmp, image);
@@ -690,7 +690,7 @@
}
int
-dm_gen_dlists(struct dm_internal *dmp, size_t range)
+dm_gen_dlists(struct dm *dmp, size_t range)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_genDLists(dmp, range);
@@ -697,25 +697,25 @@
}
int
-dm_begin_dlist(struct dm_internal *dmp, unsigned int list)
+dm_begin_dlist(struct dm *dmp, unsigned int list)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_beginDList(dmp, list);
}
int
-dm_draw_dlist(struct dm_internal *dmp, unsigned int list)
+dm_draw_dlist(struct dm *dmp, unsigned int list)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawDList(list);
}
int
-dm_end_dlist(struct dm_internal *dmp)
+dm_end_dlist(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_endDList(dmp);
}
int
-dm_free_dlists(struct dm_internal *dmp, unsigned int list, int range)
+dm_free_dlists(struct dm *dmp, unsigned int list, int range)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_freeDLists(dmp, list, range);
@@ -722,7 +722,7 @@
}
int
-dm_draw_vlist(struct dm_internal *dmp, struct bn_vlist *vp)
+dm_draw_vlist(struct dm *dmp, struct bn_vlist *vp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawVList(dmp, vp);
@@ -729,55 +729,55 @@
}
int
-dm_draw_vlist_hidden_line(struct dm_internal *dmp, struct bn_vlist *vp)
+dm_draw_vlist_hidden_line(struct dm *dmp, struct bn_vlist *vp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawVListHiddenLine(dmp, vp);
}
int
-dm_draw_begin(dm *dmp)
+dm_draw_begin(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawBegin(dmp);
}
int
-dm_draw_end(dm *dmp)
+dm_draw_end(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawEnd(dmp);
}
int
-dm_normal(dm *dmp)
+dm_normal(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_normal(dmp);
}
int
-dm_loadmatrix(dm *dmp, fastf_t *mat, int eye)
+dm_loadmatrix(struct dm *dmp, fastf_t *mat, int eye)
{
if (!dmp || !mat) return 0;
return dmp->dm_loadMatrix(dmp, mat, eye);
}
int
-dm_loadpmatrix(dm *dmp, fastf_t *mat)
+dm_loadpmatrix(struct dm *dmp, fastf_t *mat)
{
if (!dmp || !mat) return 0;
return dmp->dm_loadPMatrix(dmp, mat);
}
int
-dm_draw_string_2d(dm *dmp, const char *str, fastf_t x, fastf_t y, int size,
int use_aspect)
+dm_draw_string_2d(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int
size, int use_aspect)
{
if (!dmp || !str) return 0;
return dmp->dm_drawString2D(dmp, str, x, y, size, use_aspect);
}
int
-dm_draw_line_2d(dm *dmp, fastf_t x1, fastf_t y1_2d, fastf_t x2, fastf_t y2)
+dm_draw_line_2d(struct dm *dmp, fastf_t x1, fastf_t y1_2d, fastf_t x2, fastf_t
y2)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawLine2D(dmp, x1, y1_2d, x2, y2);
}
int
-dm_draw_line_3d(dm *dmp, point_t pt1, point_t pt2)
+dm_draw_line_3d(struct dm *dmp, point_t pt1, point_t pt2)
{
if (UNLIKELY(!dmp)) return 0;
if (!!pt1 || !pt2) return 0;
@@ -784,55 +784,55 @@
return dmp->dm_drawLine3D(dmp, pt1, pt2);
}
int
-dm_draw_lines_3d(dm *dmp, int npoints, point_t *points, int sflag)
+dm_draw_lines_3d(struct dm *dmp, int npoints, point_t *points, int sflag)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawLines3D(dmp, npoints, points, sflag);
}
int
-dm_draw_point_2d(dm *dmp, fastf_t x, fastf_t y)
+dm_draw_point_2d(struct dm *dmp, fastf_t x, fastf_t y)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawPoint2D(dmp, x, y);
}
int
-dm_draw_point_3d(dm *dmp, point_t pt)
+dm_draw_point_3d(struct dm *dmp, point_t pt)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawPoint3D(dmp, pt);
}
int
-dm_draw_points_3d(dm *dmp, int npoints, point_t *points)
+dm_draw_points_3d(struct dm *dmp, int npoints, point_t *points)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_drawPoints3D(dmp, npoints, points);
}
int
-dm_draw(dm *dmp, struct bn_vlist *(*callback)(void *), void **data)
+dm_draw(struct dm *dmp, struct bn_vlist *(*callback)(void *), void **data)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_draw(dmp, callback, data);
}
int
-dm_draw_obj(dm *dmp, struct display_list *obj)
+dm_draw_obj(struct dm *dmp, struct display_list *obj)
{
if (!dmp || !obj) return 0;
return dmp->dm_draw_obj(dmp, obj);
}
int
-dm_set_depth_mask(dm *dmp, int d_on)
+dm_set_depth_mask(struct dm *dmp, int d_on)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_setDepthMask(dmp, d_on);
}
int
-dm_debug(dm *dmp, int lvl)
+dm_debug(struct dm *dmp, int lvl)
{
if (UNLIKELY(!dmp)) return 0;
return dmp->dm_debug(dmp, lvl);
}
int
-dm_logfile(dm *dmp, const char *filename)
+dm_logfile(struct dm *dmp, const char *filename)
{
if (!dmp || !filename) return 0;
return dmp->dm_logfile(dmp, filename);
@@ -839,7 +839,7 @@
}
fastf_t *
-dm_get_vp(dm *dmp)
+dm_get_vp(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return dmp->dm_vp;
@@ -846,7 +846,7 @@
}
void
-dm_set_vp(dm *dmp, fastf_t *vp)
+dm_set_vp(struct dm *dmp, fastf_t *vp)
{
if (UNLIKELY(!dmp)) return;
dmp->dm_vp = vp;
@@ -893,7 +893,7 @@
}
struct bu_structparse *
-dm_get_vparse(dm *dmp)
+dm_get_vparse(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
return dmp->vparse;
@@ -900,7 +900,7 @@
}
void *
-dm_get_mvars(dm *dmp)
+dm_get_mvars(struct dm *dmp)
{
if (UNLIKELY(!dmp)) return NULL;
if (!dmp->m_vars) return (void *)dmp;
@@ -914,7 +914,7 @@
* backends, but as a first step get it out of MGED
* and into libdm. */
static int
-dm_drawSolid(dm *dmp,
+dm_drawSolid(struct dm *dmp,
struct solid *sp,
short r,
short g,
@@ -952,7 +952,7 @@
int
-dm_draw_display_list(dm *dmp,
+dm_draw_display_list(struct dm *dmp,
struct bu_list *dl,
fastf_t transparency_threshold,
fastf_t inv_viewsize,
Modified: brlcad/trunk/src/libdm/dm-glx.h
===================================================================
--- brlcad/trunk/src/libdm/dm-glx.h 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-glx.h 2020-04-15 18:41:12 UTC (rev 75410)
@@ -17,7 +17,7 @@
* License along with this file; see the file named COPYING for more
* information.
*/
-/** @addtogroup libdm */
+/** @addtogroup libstruct dm */
/** @{ */
/** @file dm-glx.h
*
Modified: brlcad/trunk/src/libdm/dm-ogl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-ogl.c 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-ogl.c 2020-04-15 18:41:12 UTC (rev 75410)
@@ -96,49 +96,49 @@
#define YSTEREO 491 /* subfield height, in scanlines */
#define YOFFSET_LEFT 532 /* YSTEREO + YBLANK ? */
-HIDDEN XVisualInfo *ogl_choose_visual(struct dm_internal *dmp, Tk_Window
tkwin);
+HIDDEN XVisualInfo *ogl_choose_visual(struct dm *dmp, Tk_Window tkwin);
/* Display Manager package interface */
#define IRBOUND 4095.9 /* Max magnification in Rot matrix */
#define PLOTBOUND 1000.0 /* Max magnification in Rot matrix */
-struct dm_internal *ogl_open(Tcl_Interp *vinterp, int argc, char **argv);
-HIDDEN int ogl_close(struct dm_internal *dmp);
-HIDDEN int ogl_drawBegin(struct dm_internal *dmp);
-HIDDEN int ogl_drawEnd(struct dm_internal *dmp);
-HIDDEN int ogl_normal(struct dm_internal *dmp);
-HIDDEN int ogl_loadMatrix(struct dm_internal *dmp, fastf_t *mat, int
which_eye);
-HIDDEN int ogl_loadPMatrix(struct dm_internal *dmp, fastf_t *mat);
-HIDDEN int ogl_drawString2D(struct dm_internal *dmp, const char *str, fastf_t
x, fastf_t y, int size, int use_aspect);
-HIDDEN int ogl_drawLine2D(struct dm_internal *dmp, fastf_t X1, fastf_t Y1,
fastf_t X2, fastf_t Y2);
-HIDDEN int ogl_drawLine3D(struct dm_internal *dmp, point_t pt1, point_t pt2);
-HIDDEN int ogl_drawLines3D(struct dm_internal *dmp, int npoints, point_t
*points, int sflag);
-HIDDEN int ogl_drawPoint2D(struct dm_internal *dmp, fastf_t x, fastf_t y);
-HIDDEN int ogl_drawPoint3D(struct dm_internal *dmp, point_t point);
-HIDDEN int ogl_drawPoints3D(struct dm_internal *dmp, int npoints, point_t
*points);
-HIDDEN int ogl_drawVList(struct dm_internal *dmp, register struct bn_vlist
*vp);
-HIDDEN int ogl_drawVListHiddenLine(struct dm_internal *dmp, register struct
bn_vlist *vp);
-HIDDEN int ogl_draw(struct dm_internal *dmp, struct bn_vlist
*(*callback_function)(void *), void **data);
-HIDDEN int ogl_setFGColor(struct dm_internal *dmp, unsigned char r, unsigned
char g, unsigned char b, int strict, fastf_t transparency);
-HIDDEN int ogl_setBGColor(struct dm_internal *dmp, unsigned char r, unsigned
char g, unsigned char b);
-HIDDEN int ogl_setLineAttr(struct dm_internal *dmp, int width, int style);
-HIDDEN int ogl_configureWin_guts(struct dm_internal *dmp, int force);
-HIDDEN int ogl_configureWin(struct dm_internal *dmp, int force);
-HIDDEN int ogl_setLight(struct dm_internal *dmp, int lighting_on);
-HIDDEN int ogl_setTransparency(struct dm_internal *dmp, int transparency_on);
-HIDDEN int ogl_setDepthMask(struct dm_internal *dmp, int depthMask_on);
-HIDDEN int ogl_setZBuffer(struct dm_internal *dmp, int zbuffer_on);
-HIDDEN int ogl_setWinBounds(struct dm_internal *dmp, fastf_t *w);
-HIDDEN int ogl_debug(struct dm_internal *dmp, int vl);
-HIDDEN int ogl_logfile(struct dm_internal *dmp, const char *filename);
-HIDDEN int ogl_beginDList(struct dm_internal *dmp, unsigned int list);
-HIDDEN int ogl_endDList(struct dm_internal *dmp);
+struct dm *ogl_open(Tcl_Interp *vinterp, int argc, char **argv);
+HIDDEN int ogl_close(struct dm *dmp);
+HIDDEN int ogl_drawBegin(struct dm *dmp);
+HIDDEN int ogl_drawEnd(struct dm *dmp);
+HIDDEN int ogl_normal(struct dm *dmp);
+HIDDEN int ogl_loadMatrix(struct dm *dmp, fastf_t *mat, int which_eye);
+HIDDEN int ogl_loadPMatrix(struct dm *dmp, fastf_t *mat);
+HIDDEN int ogl_drawString2D(struct dm *dmp, const char *str, fastf_t x,
fastf_t y, int size, int use_aspect);
+HIDDEN int ogl_drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2,
fastf_t Y2);
+HIDDEN int ogl_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2);
+HIDDEN int ogl_drawLines3D(struct dm *dmp, int npoints, point_t *points, int
sflag);
+HIDDEN int ogl_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y);
+HIDDEN int ogl_drawPoint3D(struct dm *dmp, point_t point);
+HIDDEN int ogl_drawPoints3D(struct dm *dmp, int npoints, point_t *points);
+HIDDEN int ogl_drawVList(struct dm *dmp, register struct bn_vlist *vp);
+HIDDEN int ogl_drawVListHiddenLine(struct dm *dmp, register struct bn_vlist
*vp);
+HIDDEN int ogl_draw(struct dm *dmp, struct bn_vlist *(*callback_function)(void
*), void **data);
+HIDDEN int ogl_setFGColor(struct dm *dmp, unsigned char r, unsigned char g,
unsigned char b, int strict, fastf_t transparency);
+HIDDEN int ogl_setBGColor(struct dm *dmp, unsigned char r, unsigned char g,
unsigned char b);
+HIDDEN int ogl_setLineAttr(struct dm *dmp, int width, int style);
+HIDDEN int ogl_configureWin_guts(struct dm *dmp, int force);
+HIDDEN int ogl_configureWin(struct dm *dmp, int force);
+HIDDEN int ogl_setLight(struct dm *dmp, int lighting_on);
+HIDDEN int ogl_setTransparency(struct dm *dmp, int transparency_on);
+HIDDEN int ogl_setDepthMask(struct dm *dmp, int depthMask_on);
+HIDDEN int ogl_setZBuffer(struct dm *dmp, int zbuffer_on);
+HIDDEN int ogl_setWinBounds(struct dm *dmp, fastf_t *w);
+HIDDEN int ogl_debug(struct dm *dmp, int vl);
+HIDDEN int ogl_logfile(struct dm *dmp, const char *filename);
+HIDDEN int ogl_beginDList(struct dm *dmp, unsigned int list);
+HIDDEN int ogl_endDList(struct dm *dmp);
HIDDEN int ogl_drawDList(unsigned int list);
-HIDDEN int ogl_freeDLists(struct dm_internal *dmp, unsigned int list, int
range);
-HIDDEN int ogl_genDLists(struct dm_internal *dmp, size_t range);
-HIDDEN int ogl_getDisplayImage(struct dm_internal *dmp, unsigned char **image);
-HIDDEN int ogl_reshape(struct dm_internal *dmp, int width, int height);
-HIDDEN int ogl_makeCurrent(struct dm_internal *dmp);
+HIDDEN int ogl_freeDLists(struct dm *dmp, unsigned int list, int range);
+HIDDEN int ogl_genDLists(struct dm *dmp, size_t range);
+HIDDEN int ogl_getDisplayImage(struct dm *dmp, unsigned char **image);
+HIDDEN int ogl_reshape(struct dm *dmp, int width, int height);
+HIDDEN int ogl_makeCurrent(struct dm *dmp);
static fastf_t default_viewscale = 1000.0;
@@ -175,7 +175,7 @@
void
-ogl_fogHint(struct dm_internal *dmp, int fastfog)
+ogl_fogHint(struct dm *dmp, int fastfog)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
mvars->fastfog = fastfog;
@@ -184,7 +184,7 @@
HIDDEN int
-ogl_setBGColor(struct dm_internal *dmp, unsigned char r, unsigned char g,
unsigned char b)
+ogl_setBGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned char
b)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
@@ -222,7 +222,7 @@
* also change font size if necessary
*/
HIDDEN int
-ogl_configureWin_guts(struct dm_internal *dmp, int force)
+ogl_configureWin_guts(struct dm *dmp, int force)
{
XWindowAttributes xwa;
XFontStruct *newfontstruct;
@@ -361,7 +361,7 @@
HIDDEN int
-ogl_reshape(struct dm_internal *dmp, int width, int height)
+ogl_reshape(struct dm *dmp, int width, int height)
{
GLint mm;
@@ -398,7 +398,7 @@
HIDDEN int
-ogl_makeCurrent(struct dm_internal *dmp)
+ogl_makeCurrent(struct dm *dmp)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct ogl_vars *privars = (struct ogl_vars *)dmp->dm_vars.priv_vars;
@@ -418,7 +418,7 @@
HIDDEN int
-ogl_configureWin(struct dm_internal *dmp, int force)
+ogl_configureWin(struct dm *dmp, int force)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct ogl_vars *privars = (struct ogl_vars *)dmp->dm_vars.priv_vars;
@@ -435,7 +435,7 @@
HIDDEN int
-ogl_setLight(struct dm_internal *dmp, int lighting_on)
+ogl_setLight(struct dm *dmp, int lighting_on)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
if (dmp->dm_debugLevel)
@@ -474,7 +474,7 @@
* OpenGL
*/
HIDDEN XVisualInfo *
-ogl_choose_visual(struct dm_internal *dmp, Tk_Window tkwin)
+ogl_choose_visual(struct dm *dmp, Tk_Window tkwin)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
@@ -619,7 +619,7 @@
* Gracefully release the display.
*/
HIDDEN int
-ogl_close(struct dm_internal *dmp)
+ogl_close(struct dm *dmp)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct ogl_vars *privars = (struct ogl_vars *)dmp->dm_vars.priv_vars;
@@ -654,7 +654,7 @@
* Fire up the display manager, and the display processor.
*
*/
-struct dm_internal *
+struct dm *
ogl_open(Tcl_Interp *vinterp, int argc, char **argv)
{
static int count = 0;
@@ -676,7 +676,7 @@
struct bu_vls str = BU_VLS_INIT_ZERO;
struct bu_vls init_proc_vls = BU_VLS_INIT_ZERO;
Display *tmp_dpy = (Display *)NULL;
- struct dm_internal *dmp = (struct dm_internal *)NULL;
+ struct dm *dmp = (struct dm *)NULL;
struct modifiable_ogl_vars *mvars = NULL;
Tk_Window tkwin = (Tk_Window)NULL;
int screen_number = -1;
@@ -688,7 +688,7 @@
return DM_NULL;
}
- BU_GET(dmp, struct dm_internal);
+ BU_GET(dmp, struct dm);
*dmp = dm_ogl; /* struct copy */
dmp->dm_interp = interp;
@@ -1019,7 +1019,7 @@
int
-ogl_share_dlist(struct dm_internal *dmp1, struct dm_internal *dmp2)
+ogl_share_dlist(struct dm *dmp1, struct dm *dmp2)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp1->m_vars;
struct ogl_vars *privars = (struct ogl_vars *)dmp1->dm_vars.priv_vars;
@@ -1027,10 +1027,10 @@
GLfloat vf;
GLXContext old_glxContext;
- if (dmp1 == (struct dm_internal *)NULL)
+ if (dmp1 == (struct dm *)NULL)
return BRLCAD_ERROR;
- if (dmp2 == (struct dm_internal *)NULL) {
+ if (dmp2 == (struct dm *)NULL) {
/* create a new graphics context for dmp1 with private display lists */
old_glxContext = privars->glxc;
@@ -1188,7 +1188,7 @@
* There are global variables which are parameters to this routine.
*/
HIDDEN int
-ogl_drawBegin(struct dm_internal *dmp)
+ogl_drawBegin(struct dm *dmp)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
@@ -1277,7 +1277,7 @@
HIDDEN int
-ogl_drawEnd(struct dm_internal *dmp)
+ogl_drawEnd(struct dm *dmp)
{
struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
@@ -1357,7 +1357,7 @@
* many calls to ogl_draw().
*/
HIDDEN int
-ogl_loadMatrix(struct dm_internal *dmp, fastf_t *mat, int which_eye)
+ogl_loadMatrix(struct dm *dmp, fastf_t *mat, int which_eye)
{
fastf_t *mptr;
GLfloat gtmat[16];
@@ -1456,7 +1456,7 @@
*
*/
HIDDEN int
-ogl_loadPMatrix(struct dm_internal *dmp, fastf_t *mat)
+ogl_loadPMatrix(struct dm *dmp, fastf_t *mat)
{
fastf_t *mptr;
GLfloat gtmat[16];
@@ -1510,7 +1510,7 @@
HIDDEN int
-ogl_drawVListHiddenLine(struct dm_internal *dmp, register struct bn_vlist *vp)
+ogl_drawVListHiddenLine(struct dm *dmp, register struct bn_vlist *vp)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
struct ogl_vars *privars = (struct ogl_vars *)dmp->dm_vars.priv_vars;
@@ -1686,7 +1686,7 @@
HIDDEN int
-ogl_drawVList(struct dm_internal *dmp, struct bn_vlist *vp)
+ogl_drawVList(struct dm *dmp, struct bn_vlist *vp)
{
struct bn_vlist *tvp;
register int first;
@@ -1866,7 +1866,7 @@
HIDDEN int
-ogl_draw(struct dm_internal *dmp, struct bn_vlist *(*callback_function)(void
*), void **data)
+ogl_draw(struct dm *dmp, struct bn_vlist *(*callback_function)(void *), void
**data)
{
struct bn_vlist *vp;
if (!callback_function) {
@@ -1890,7 +1890,7 @@
* (i.e., not scaled, rotated, displaced, etc.).
*/
HIDDEN int
-ogl_normal(struct dm_internal *dmp)
+ogl_normal(struct dm *dmp)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
struct ogl_vars *privars = (struct ogl_vars *)dmp->dm_vars.priv_vars;
@@ -1947,7 +1947,7 @@
* The starting position of the beam is as specified.
*/
HIDDEN int
-ogl_drawString2D(struct dm_internal *dmp, const char *str, fastf_t x, fastf_t
y, int UNUSED(size), int use_aspect)
+ogl_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int
UNUSED(size), int use_aspect)
{
struct ogl_vars *privars = (struct ogl_vars *)dmp->dm_vars.priv_vars;
if (dmp->dm_debugLevel)
@@ -1966,7 +1966,7 @@
HIDDEN int
-ogl_drawLine2D(struct dm_internal *dmp, fastf_t X1, fastf_t Y1, fastf_t X2,
fastf_t Y2)
+ogl_drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2, fastf_t Y2)
{
return drawLine2D(dmp, X1, Y1, X2, Y2, "ogl_drawLine2D()\n");
}
@@ -1973,7 +1973,7 @@
HIDDEN int
-ogl_drawLine3D(struct dm_internal *dmp, point_t pt1, point_t pt2)
+ogl_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2)
{
return drawLine3D(dmp, pt1, pt2, "ogl_drawLine3D()\n", wireColor);
}
@@ -1980,7 +1980,7 @@
HIDDEN int
-ogl_drawLines3D(struct dm_internal *dmp, int npoints, point_t *points, int
sflag)
+ogl_drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag)
{
return drawLines3D(dmp, npoints, points, sflag, "ogl_drawLine3D()\n",
wireColor);
}
@@ -1987,7 +1987,7 @@
HIDDEN int
-ogl_drawPoint2D(struct dm_internal *dmp, fastf_t x, fastf_t y)
+ogl_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y)
{
if (dmp->dm_debugLevel) {
bu_log("ogl_drawPoint2D():\n");
@@ -2006,7 +2006,7 @@
HIDDEN int
-ogl_drawPoint3D(struct dm_internal *dmp, point_t point)
+ogl_drawPoint3D(struct dm *dmp, point_t point)
{
GLdouble dpt[3];
@@ -2033,7 +2033,7 @@
HIDDEN int
-ogl_drawPoints3D(struct dm_internal *dmp, int npoints, point_t *points)
+ogl_drawPoints3D(struct dm *dmp, int npoints, point_t *points)
{
GLdouble dpt[3];
register int i;
@@ -2061,7 +2061,7 @@
HIDDEN int
-ogl_setFGColor(struct dm_internal *dmp, unsigned char r, unsigned char g,
unsigned char b, int strict, fastf_t transparency)
+ogl_setFGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned char
b, int strict, fastf_t transparency)
{
/*if (dmp->dm_debugLevel)
bu_log("ogl_setFGColor()\n");*/
@@ -2121,7 +2121,7 @@
HIDDEN int
-ogl_setLineAttr(struct dm_internal *dmp, int width, int style)
+ogl_setLineAttr(struct dm *dmp, int width, int style)
{
/*if (dmp->dm_debugLevel)
bu_log("ogl_setLineAttr()\n");*/
@@ -2141,7 +2141,7 @@
HIDDEN int
-ogl_debug(struct dm_internal *dmp, int lvl)
+ogl_debug(struct dm *dmp, int lvl)
{
dmp->dm_debugLevel = lvl;
@@ -2149,7 +2149,7 @@
}
HIDDEN int
-ogl_logfile(struct dm_internal *dmp, const char *filename)
+ogl_logfile(struct dm *dmp, const char *filename)
{
bu_vls_sprintf(&dmp->dm_log, "%s", filename);
@@ -2157,7 +2157,7 @@
}
HIDDEN int
-ogl_setWinBounds(struct dm_internal *dmp, fastf_t *w)
+ogl_setWinBounds(struct dm *dmp, fastf_t *w)
{
GLint mm;
@@ -2184,7 +2184,7 @@
HIDDEN int
-ogl_setTransparency(struct dm_internal *dmp,
+ogl_setTransparency(struct dm *dmp,
int transparency_on)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
@@ -2208,7 +2208,7 @@
HIDDEN int
-ogl_setDepthMask(struct dm_internal *dmp,
+ogl_setDepthMask(struct dm *dmp,
int enable) {
if (dmp->dm_debugLevel)
bu_log("ogl_setDepthMask()\n");
@@ -2225,7 +2225,7 @@
HIDDEN int
-ogl_setZBuffer(struct dm_internal *dmp, int zbuffer_on)
+ogl_setZBuffer(struct dm *dmp, int zbuffer_on)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars
*)dmp->m_vars;
if (dmp->dm_debugLevel)
@@ -2251,7 +2251,7 @@
HIDDEN int
-ogl_beginDList(struct dm_internal *dmp, unsigned int list)
+ogl_beginDList(struct dm *dmp, unsigned int list)
{
if (dmp->dm_debugLevel)
bu_log("ogl_beginDList()\n");
@@ -2262,7 +2262,7 @@
HIDDEN int
-ogl_endDList(struct dm_internal *dmp)
+ogl_endDList(struct dm *dmp)
{
if (dmp->dm_debugLevel)
bu_log("ogl_endDList()\n");
@@ -2281,7 +2281,7 @@
HIDDEN int
-ogl_freeDLists(struct dm_internal *dmp, unsigned int list, int range)
+ogl_freeDLists(struct dm *dmp, unsigned int list, int range)
{
if (dmp->dm_debugLevel)
bu_log("ogl_freeDLists()\n");
@@ -2292,7 +2292,7 @@
HIDDEN int
-ogl_genDLists(struct dm_internal *dmp, size_t range)
+ogl_genDLists(struct dm *dmp, size_t range)
{
if (dmp->dm_debugLevel)
bu_log("ogl_freeDLists()\n");
@@ -2301,7 +2301,7 @@
}
HIDDEN int
-ogl_draw_obj(struct dm_internal *dmp, struct display_list *obj)
+ogl_draw_obj(struct dm *dmp, struct display_list *obj)
{
struct solid *sp;
FOR_ALL_SOLIDS(sp, &obj->dl_headSolid) {
@@ -2324,7 +2324,7 @@
}
HIDDEN int
-ogl_getDisplayImage(struct dm_internal *dmp, unsigned char **image)
+ogl_getDisplayImage(struct dm *dmp, unsigned char **image)
{
if (dmp->dm_type == DM_TYPE_WGL || dmp->dm_type == DM_TYPE_OGL) {
unsigned char *idata;
@@ -2350,7 +2350,7 @@
}
int
-ogl_openFb(struct dm_internal *dmp)
+ogl_openFb(struct dm *dmp)
{
struct fb_platform_specific *fb_ps;
struct ogl_fb_info *ofb_ps;
@@ -2373,7 +2373,7 @@
}
int
-ogl_get_internal(struct dm_internal *dmp)
+ogl_get_internal(struct dm *dmp)
{
struct modifiable_ogl_vars *mvars = NULL;
if (!dmp->m_vars) {
@@ -2386,7 +2386,7 @@
}
int
-ogl_put_internal(struct dm_internal *dmp)
+ogl_put_internal(struct dm *dmp)
{
struct modifiable_ogl_vars *mvars = NULL;
if (dmp->m_vars) {
@@ -2422,7 +2422,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
fastf_t bounds[6] = { GED_MIN, GED_MAX, GED_MIN, GED_MAX, GED_MIN, GED_MAX
};
dmp->dm_zclip = mvars->zclipping_on;
@@ -2446,7 +2446,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
dm_debug(dmp, mvars->debug);
@@ -2462,7 +2462,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
dm_logfile(dmp, bu_vls_addr(&mvars->log));
@@ -2477,7 +2477,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
dmp->dm_bound = mvars->bound;
@@ -2492,7 +2492,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
dmp->dm_boundFlag = mvars->boundFlag;
@@ -2507,7 +2507,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
(void)dm_make_current(dmp);
(void)dm_set_zbuffer(dmp, mvars->zbuffer_on);
@@ -2523,7 +2523,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
(void)dm_make_current(dmp);
(void)dm_set_light(dmp, mvars->lighting_on);
@@ -2539,7 +2539,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
(void)dm_make_current(dmp);
(void)dm_set_transparency(dmp, mvars->transparency_on);
@@ -2555,7 +2555,7 @@
void *data)
{
struct modifiable_ogl_vars *mvars = (struct modifiable_ogl_vars *)base;
- dm *dmp = mvars->this_dm;
+ struct dm *dmp = mvars->this_dm;
dm_fogHint(dmp, mvars->fastfog);
@@ -2581,7 +2581,7 @@
{"", 0, (char *)0, 0,
BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
};
-struct dm_internal dm_ogl = {
+struct dm dm_ogl = {
ogl_close,
ogl_drawBegin,
ogl_drawEnd,
Modified: brlcad/trunk/src/libdm/dm-ogl.h
===================================================================
--- brlcad/trunk/src/libdm/dm-ogl.h 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-ogl.h 2020-04-15 18:41:12 UTC (rev 75410)
@@ -17,7 +17,7 @@
* License along with this file; see the file named COPYING for more
* information.
*/
-/** @addtogroup libdm */
+/** @addtogroup libstruct dm */
/** @{ */
/** @file dm-ogl.h
*
Modified: brlcad/trunk/src/libdm/dm-osgl.cpp
===================================================================
--- brlcad/trunk/src/libdm/dm-osgl.cpp 2020-04-15 18:09:57 UTC (rev 75409)
+++ brlcad/trunk/src/libdm/dm-osgl.cpp 2020-04-15 18:41:12 UTC (rev 75410)
@@ -80,44 +80,44 @@
#define PLOTBOUND 1000.0 /* Max magnification in Rot matrix */
extern "C" {
- struct dm_internal *osgl_open(void *vinterp, int argc, char **argv);
+ struct dm *osgl_open(void *vinterp, int argc, char **argv);
}
-HIDDEN int osgl_close(struct dm_internal *dmp);
-HIDDEN int osgl_drawBegin(struct dm_internal *dmp);
-HIDDEN int osgl_drawEnd(struct dm_internal *dmp);
-HIDDEN int osgl_normal(struct dm_internal *dmp);
-HIDDEN int osgl_loadMatrix(struct dm_internal *dmp, fastf_t *mat, int
which_eye);
-HIDDEN int osgl_loadPMatrix(struct dm_internal *dmp, fastf_t *mat);
-HIDDEN int osgl_drawString2D(struct dm_internal *dmp, const char *str, fastf_t
x, fastf_t y, int size, int use_aspect);
-HIDDEN int osgl_drawLine2D(struct dm_internal *dmp, fastf_t X1, fastf_t Y1,
fastf_t X2, fastf_t Y2);
-HIDDEN int osgl_drawLine3D(struct dm_internal *dmp, point_t pt1, point_t pt2);
-HIDDEN int osgl_drawLines3D(struct dm_internal *dmp, int npoints, point_t
*points, int sflag);
-HIDDEN int osgl_drawPoint2D(struct dm_internal *dmp, fastf_t x, fastf_t y);
-HIDDEN int osgl_drawPoint3D(struct dm_internal *dmp, point_t point);
-HIDDEN int osgl_drawPoints3D(struct dm_internal *dmp, int npoints, point_t
*points);
-HIDDEN int osgl_drawVList(struct dm_internal *dmp, register struct bn_vlist
*vp);
-HIDDEN int osgl_drawVListHiddenLine(struct dm_internal *dmp, register struct
bn_vlist *vp);
-HIDDEN int osgl_draw(struct dm_internal *dmp, struct bn_vlist
*(*callback_function)(void *), void **data);
-HIDDEN int osgl_setFGColor(struct dm_internal *dmp, unsigned char r, unsigned
char g, unsigned char b, int strict, fastf_t transparency);
-HIDDEN int osgl_setBGColor(struct dm_internal *dmp, unsigned char r, unsigned
char g, unsigned char b);
-HIDDEN int osgl_setLineAttr(struct dm_internal *dmp, int width, int style);
-HIDDEN int osgl_configureWin_guts(struct dm_internal *dmp, int force);
-HIDDEN int osgl_configureWin(struct dm_internal *dmp, int force);
-HIDDEN int osgl_setLight(struct dm_internal *dmp, int lighting_on);
-HIDDEN int osgl_setTransparency(struct dm_internal *dmp, int transparency_on);
-HIDDEN int osgl_setDepthMask(struct dm_internal *dmp, int depthMask_on);
-HIDDEN int osgl_setZBuffer(struct dm_internal *dmp, int zbuffer_on);
-HIDDEN int osgl_setWinBounds(struct dm_internal *dmp, fastf_t *w);
-HIDDEN int osgl_debug(struct dm_internal *dmp, int vl);
-HIDDEN int osgl_logfile(struct dm_internal *dmp, const char *filename);
-HIDDEN int osgl_beginDList(struct dm_internal *dmp, unsigned int list);
-HIDDEN int osgl_endDList(struct dm_internal *dmp);
+HIDDEN int osgl_close(struct dm *dmp);
+HIDDEN int osgl_drawBegin(struct dm *dmp);
+HIDDEN int osgl_drawEnd(struct dm *dmp);
+HIDDEN int osgl_normal(struct dm *dmp);
+HIDDEN int osgl_loadMatrix(struct dm *dmp, fastf_t *mat, int which_eye);
+HIDDEN int osgl_loadPMatrix(struct dm *dmp, fastf_t *mat);
+HIDDEN int osgl_drawString2D(struct dm *dmp, const char *str, fastf_t x,
fastf_t y, int size, int use_aspect);
+HIDDEN int osgl_drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2,
fastf_t Y2);
+HIDDEN int osgl_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2);
+HIDDEN int osgl_drawLines3D(struct dm *dmp, int npoints, point_t *points, int
sflag);
+HIDDEN int osgl_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y);
+HIDDEN int osgl_drawPoint3D(struct dm *dmp, point_t point);
+HIDDEN int osgl_drawPoints3D(struct dm *dmp, int npoints, point_t *points);
+HIDDEN int osgl_drawVList(struct dm *dmp, register struct bn_vlist *vp);
+HIDDEN int osgl_drawVListHiddenLine(struct dm *dmp, register struct bn_vlist
*vp);
+HIDDEN int osgl_draw(struct dm *dmp, struct bn_vlist
*(*callback_function)(void *), void **data);
+HIDDEN int osgl_setFGColor(struct dm *dmp, unsigned char r, unsigned char g,
unsigned char b, int strict, fastf_t transparency);
+HIDDEN int osgl_setBGColor(struct dm *dmp, unsigned char r, unsigned char g,
unsigned char b);
+HIDDEN int osgl_setLineAttr(struct dm *dmp, int width, int style);
+HIDDEN int osgl_configureWin_guts(struct dm *dmp, int force);
+HIDDEN int osgl_configureWin(struct dm *dmp, int force);
+HIDDEN int osgl_setLight(struct dm *dmp, int lighting_on);
+HIDDEN int osgl_setTransparency(struct dm *dmp, int transparency_on);
+HIDDEN int osgl_setDepthMask(struct dm *dmp, int depthMask_on);
+HIDDEN int osgl_setZBuffer(struct dm *dmp, int zbuffer_on);
+HIDDEN int osgl_setWinBounds(struct dm *dmp, fastf_t *w);
+HIDDEN int osgl_debug(struct dm *dmp, int vl);
+HIDDEN int osgl_logfile(struct dm *dmp, const char *filename);
+HIDDEN int osgl_beginDList(struct dm *dmp, unsigned int list);
+HIDDEN int osgl_endDList(struct dm *dmp);
HIDDEN int osgl_drawDList(unsigned int list);
-HIDDEN int osgl_freeDLists(struct dm_internal *dmp, unsigned int list, int
range);
-HIDDEN int osgl_genDLists(struct dm_internal *dmp, size_t range);
-HIDDEN int osgl_getDisplayImage(struct dm_internal *dmp, unsigned char
**image);
-HIDDEN int osgl_reshape(struct dm_internal *dmp, int width, int height);
-HIDDEN int osgl_makeCurrent(struct dm_internal *dmp);
+HIDDEN int osgl_freeDLists(struct dm *dmp, unsigned int list, int range);
+HIDDEN int osgl_genDLists(struct dm *dmp, size_t range);
+HIDDEN int osgl_getDisplayImage(struct dm *dmp, unsigned char **image);
+HIDDEN int osgl_reshape(struct dm *dmp, int width, int height);
+HIDDEN int osgl_makeCurrent(struct dm *dmp);
static fastf_t default_viewscale = 1000.0;
@@ -154,7 +154,7 @@
extern "C" {
void
-osgl_fogHint(struct dm_internal *dmp, int fastfog)
+osgl_fogHint(struct dm *dmp, int fastfog)
{
struct modifiable_osgl_vars *mvars = (struct modifiable_osgl_vars
*)dmp->m_vars;
mvars->fastfog = fastfog;
@@ -163,7 +163,7 @@
}
HIDDEN int
-osgl_setBGColor(struct dm_internal *dmp, unsigned char r, unsigned char g,
unsigned char b)
+osgl_setBGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned
char b)
{
if (dmp->dm_debugLevel == 1)
bu_log("osgl_setBGColor()\n");
@@ -193,7 +193,7 @@
* other initializations of the window configuration.
*/
HIDDEN int
-osgl_configureWin_guts(struct dm_internal *dmp, int force)
+osgl_configureWin_guts(struct dm *dmp, int force)
{
int width = 0;
int height = 0;
@@ -216,7 +216,7 @@
HIDDEN int
-osgl_reshape(struct dm_internal *dmp, int width, int height)
+osgl_reshape(struct dm *dmp, int width, int height)
{
GLint mm;
@@ -276,7 +276,7 @@
HIDDEN int
-osgl_makeCurrent(struct dm_internal *dmp)
+osgl_makeCurrent(struct dm *dmp)
{
if (dmp->dm_debugLevel)
bu_log("osgl_makeCurrent()\n");
@@ -288,7 +288,7 @@
HIDDEN int
-osgl_configureWin(struct dm_internal *dmp, int force)
+osgl_configureWin(struct dm *dmp, int force)
{
((struct osgl_vars
*)dmp->dm_vars.priv_vars)->graphicsContext->makeCurrent();
@@ -297,7 +297,7 @@
HIDDEN int
-osgl_setLight(struct dm_internal *dmp, int lighting_on)
+osgl_setLight(struct dm *dmp, int lighting_on)
{
struct modifiable_osgl_vars *mvars = (struct modifiable_osgl_vars
*)dmp->m_vars;
if (dmp->dm_debugLevel)
@@ -332,7 +332,7 @@
HIDDEN void
-OSGUpdate(dm *dmp) {
+OSGUpdate(struct dm *dmp) {
struct osgl_vars *privvars = (struct osgl_vars *)dmp->dm_vars.priv_vars;
if (dmp->dm_debugLevel == 1)
bu_log("OSGUpdate()\n");
@@ -346,7 +346,7 @@
HIDDEN void
OSGEventProc(ClientData clientData, XEvent *UNUSED(eventPtr))
{
- dm *dmp = (dm *)clientData;
+ struct dm *dmp = (struct dm *)clientData;
OSGUpdate(dmp);
}
@@ -355,7 +355,7 @@
* Gracefully release the display.
*/
HIDDEN int
-osgl_close(struct dm_internal *dmp)
+osgl_close(struct dm *dmp)
{
((struct osgl_vars
*)dmp->dm_vars.priv_vars)->graphicsContext->makeCurrent();
((struct osgl_vars
*)dmp->dm_vars.priv_vars)->graphicsContext->releaseContext();
@@ -381,7 +381,7 @@
* Fire up the display manager, and the display processor.
*
*/
-extern "C" struct dm_internal *
+extern "C" struct dm *
osgl_open(void *vinterp, int argc, char **argv)
{
static int count = 0;
@@ -388,7 +388,7 @@
GLfloat backgnd[4];
struct bu_vls str = BU_VLS_INIT_ZERO;
struct bu_vls init_proc_vls = BU_VLS_INIT_ZERO;
- struct dm_internal *dmp = (struct dm_internal *)NULL;
+ struct dm *dmp = (struct dm *)NULL;
struct modifiable_osgl_vars *mvars = NULL;
Tk_Window tkwin = (Tk_Window)NULL;
Tcl_Interp *interp = (Tcl_Interp *)vinterp;
@@ -400,7 +400,7 @@
return DM_NULL;
}
- BU_GET(dmp, struct dm_internal);
+ BU_GET(dmp, struct dm);
*dmp = dm_osgl; /* struct copy */
dmp->dm_interp = interp;
@@ -709,7 +709,7 @@
int
-osgl_share_dlist(struct dm_internal *UNUSED(dmp1), struct dm_internal
*UNUSED(dmp2))
+osgl_share_dlist(struct dm *UNUSED(dmp1), struct dm *UNUSED(dmp2))
{
#if 0
struct modifiable_osgl_vars *mvars = (struct modifiable_osgl_vars
*)dmp1->m_vars;
@@ -717,10 +717,10 @@
GLfloat vf;
GLXContext old_glxContext;
- if (dmp1 == (struct dm_internal *)NULL)
+ if (dmp1 == (struct dm *)NULL)
return TCL_ERROR;
- if (dmp2 == (struct dm_internal *)NULL) {
+ if (dmp2 == (struct dm *)NULL) {
/* create a new graphics context for dmp1 with private display lists */
old_glxContext = ((struct osgl_vars *)dmp1->dm_vars.priv_vars)->glxc;
@@ -878,7 +878,7 @@
* There are global variables which are parameters to this routine.
*/
HIDDEN int
-osgl_drawBegin(struct dm_internal *dmp)
+osgl_drawBegin(struct dm *dmp)
{
struct modifiable_osgl_vars *mvars = (struct modifiable_osgl_vars
*)dmp->m_vars;
GLfloat fogdepth;
@@ -957,7 +957,7 @@
HIDDEN int
-osgl_drawEnd(struct dm_internal *dmp)
+osgl_drawEnd(struct dm *dmp)
{
if (dmp->dm_debugLevel)
bu_log("osgl_drawEnd\n");
@@ -1032,7 +1032,7 @@
* many calls to osgl_draw().
*/
HIDDEN int
-osgl_loadMatrix(struct dm_internal *dmp, fastf_t *mat, int which_eye)
+osgl_loadMatrix(struct dm *dmp, fastf_t *mat, int which_eye)
{
fastf_t *mptr;
GLfloat gtmat[16];
@@ -1165,7 +1165,7 @@
*
*/
HIDDEN int
-osgl_loadPMatrix(struct dm_internal *dmp, fastf_t *mat)
+osgl_loadPMatrix(struct dm *dmp, fastf_t *mat)
{
fastf_t *mptr;
GLfloat gtmat[16];
@@ -1249,7 +1249,7 @@
HIDDEN int
-osgl_drawVListHiddenLine(struct dm_internal *dmp, register struct bn_vlist *vp)
+osgl_drawVListHiddenLine(struct dm *dmp, register struct bn_vlist *vp)
{
struct modifiable_osgl_vars *mvars = (struct modifiable_osgl_vars
*)dmp->m_vars;
register struct bn_vlist *tvp;
@@ -1422,7 +1422,7 @@
HIDDEN int
-osgl_drawVList(struct dm_internal *dmp, struct bn_vlist *vp)
+osgl_drawVList(struct dm *dmp, struct bn_vlist *vp)
{
struct bn_vlist *tvp;
register int first;
@@ -1676,7 +1676,7 @@
HIDDEN int
-osgl_draw(struct dm_internal *dmp, struct bn_vlist *(*callback_function)(void
*), void **data)
+osgl_draw(struct dm *dmp, struct bn_vlist *(*callback_function)(void *), void
**data)
{
struct bn_vlist *vp;
if (!callback_function) {
@@ -1700,7 +1700,7 @@
* (i.e., not scaled, rotated, displaced, etc.).
*/
HIDDEN int
-osgl_normal(struct dm_internal *dmp)
+osgl_normal(struct dm *dmp)
{
struct modifiable_osgl_vars *mvars = (struct modifiable_osgl_vars
*)dmp->m_vars;
if (dmp->dm_debugLevel)
@@ -1755,7 +1755,7 @@
* The starting position of the beam is as specified.
*/
HIDDEN int
-osgl_drawString2D(struct dm_internal *dmp, const char *str, fastf_t x, fastf_t
y, int UNUSED(size), int UNUSED(use_aspect))
+osgl_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int
UNUSED(size), int UNUSED(use_aspect))
{
fastf_t font_size = dm_get_fontsize(dmp);
struct osgl_vars *privvars = (struct osgl_vars *)dmp->dm_vars.priv_vars;
@@ -1809,7 +1809,7 @@
HIDDEN int
-osgl_drawLine2D(struct dm_internal *dmp, fastf_t X1, fastf_t Y1, fastf_t X2,
fastf_t Y2)
+osgl_drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2, fastf_t Y2)
{
return drawLine2D(dmp, X1, Y1, X2, Y2, "osgl_drawLine2D()\n");
}
@@ -1816,7 +1816,7 @@
HIDDEN int
-osgl_drawLine3D(struct dm_internal *dmp, point_t pt1, point_t pt2)
+osgl_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2)
{
return drawLine3D(dmp, pt1, pt2, "osgl_drawLine3D()\n", wireColor);
}
@@ -1823,7 +1823,7 @@
HIDDEN int
-osgl_drawLines3D(struct dm_internal *dmp, int npoints, point_t *points, int
sflag)
+osgl_drawLines3D(struct dm *dmp, int npoints, point_t *points, int sflag)
{
return drawLines3D(dmp, npoints, points, sflag, "osgl_drawLine3D()\n",
wireColor);
}
@@ -1830,7 +1830,7 @@
HIDDEN int
-osgl_drawPoint2D(struct dm_internal *dmp, fastf_t x, fastf_t y)
+osgl_drawPoint2D(struct dm *dmp, fastf_t x, fastf_t y)
{
if (dmp->dm_debugLevel) {
bu_log("osgl_drawPoint2D():\n");
@@ -1847,7 +1847,7 @@
HIDDEN int
-osgl_drawPoint3D(struct dm_internal *dmp, point_t point)
+osgl_drawPoint3D(struct dm *dmp, point_t point)
{
GLdouble dpt[3];
@@ -1872,7 +1872,7 @@
HIDDEN int
-osgl_drawPoints3D(struct dm_internal *dmp, int npoints, point_t *points)
+osgl_drawPoints3D(struct dm *dmp, int npoints, point_t *points)
{
GLdouble dpt[3];
register int i;
@@ -1898,7 +1898,7 @@
HIDDEN int
-osgl_setFGColor(struct dm_internal *dmp, unsigned char r, unsigned char g,
unsigned char b, int strict, fastf_t transparency)
+osgl_setFGColor(struct dm *dmp, unsigned char r, unsigned char g, unsigned
char b, int strict, fastf_t transparency)
{
/*if (dmp->dm_debugLevel)
bu_log("osgl_setFGColor()\n");*/
@@ -1958,7 +1958,7 @@
HIDDEN int
-osgl_setLineAttr(struct dm_internal *dmp, int width, int style)
+osgl_setLineAttr(struct dm *dmp, int width, int style)
{
/*if (dmp->dm_debugLevel)
bu_log("osgl_setLineAttr()\n");*/
@@ -1978,7 +1978,7 @@
HIDDEN int
-osgl_debug(struct dm_internal *dmp, int lvl)
+osgl_debug(struct dm *dmp, int lvl)
{
dmp->dm_debugLevel = lvl;
@@ -1986,7 +1986,7 @@
}
HIDDEN int
-osgl_logfile(struct dm_internal *dmp, const char *filename)
+osgl_logfile(struct dm *dmp, const char *filename)
{
bu_vls_sprintf(&dmp->dm_log, "%s", filename);
@@ -1994,7 +1994,7 @@
}
HIDDEN int
-osgl_setWinBounds(struct dm_internal *dmp, fastf_t *w)
+osgl_setWinBounds(struct dm *dmp, fastf_t *w)
{
GLint mm;
@@ -2021,7 +2021,7 @@
HIDDEN int
-osgl_setTransparency(struct dm_internal *dmp,
+osgl_setTransparency(struct dm *dmp,
int transparency_on)
{
struct modifiable_osgl_vars *mvars = (struct modifiable_osgl_vars
*)dmp->m_vars;
@@ -2045,7 +2045,7 @@
HIDDEN int
-osgl_setDepthMask(struct dm_internal *dmp,
+osgl_setDepthMask(struct dm *dmp,
int enable) {
if (dmp->dm_debugLevel)
bu_log("osgl_setDepthMask()\n");
@@ -2062,7 +2062,7 @@
HIDDEN int
-osgl_setZBuffer(struct dm_internal *dmp, int zbuffer_on)
+osgl_setZBuffer(struct dm *dmp, int zbuffer_on)
{
struct modifiable_osgl_vars *mvars = (struct modifiable_osgl_vars
*)dmp->m_vars;
if (dmp->dm_debugLevel)
@@ Diff output truncated at 100000 characters. @@
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