Decouple LIBDM from LIBGEDBRL-CAD
Status: ClosedTime to complete: 48 hrs Mentors: SeanTags: C, 3D, library, dependency

BRL-CAD has a 3D display manager library (LIBDM) and a geometry editor command library (LIBGED). For clean encapsulation and library management, it's desirable to keep library dependencies to a minimum. LIBGED presently makes direct calls to LIBDM for a "screengrab" command. Properly fixed, it should be possible to remove the LIBDM linkage from LIBGED's build file and the command still work as expected.

This task involves breaking the dependency of LIBGED on LIBDM by making LIBGED not directly call any LIBDM functions. To do this, LIBGED will need to introduce a callback mechanism in the "ged" struct so that the screengrab command can capture an image without directly calling a LIBDM function. This task is a little tricky, so you'll need to be somewhat proficient with C if you want any chance of completing this within a couple hours.

Code:

  • include/ged.h
  • include/dm.h
  • src/libged/screengrab.h
  • src/libged/CMakeLists.txt
Uploaded Work
File name/URLFile sizeDate submitted
libged.patch5.1 KBDecember 01 2012 02:37 UTC
Comments
Cezaron November 30 2012 16:48 UTCTask Claimed

I would like to work on this task.

Harmanpreet Singh on November 30 2012 16:49 UTCTask Assigned

This task has been assigned to Cezar. You have 48 hours to complete this task, good luck!

Cezaron December 1 2012 02:37 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 2 2012 02:27 UTCwow, perfect

That's perfect, Cezar -- *exactly* what I was looking for, couldn't have done it better myself.

Sean on December 2 2012 02:29 UTCTask Closed

Congratulations, this task has been completed successfully.