GSoC/GCI Archive
Google Code-in 2012 BRL-CAD

Decouple LIBDM from LIBGED

completed by: Cezar

mentors: Sean

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.


  • include/ged.h
  • include/dm.h
  • src/libged/screengrab.h
  • src/libged/CMakeLists.txt