draw.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /**
  2. \file nviz/draw.cpp
  3. \brief wxNviz extension (3D view mode) - draw map objects to GLX context
  4. This program is free software under the GNU General Public
  5. License (>=v2). Read the file COPYING that comes with GRASS
  6. for details.
  7. (C) 2008-2009 by Martin Landa, and the GRASS development team
  8. \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
  9. */
  10. #include "nviz.h"
  11. /*!
  12. \brief Draw map
  13. Draw quick mode:
  14. - DRAW_QUICK_SURFACE
  15. - DRAW_QUICK_VLINES
  16. - DRAW_QUICK_VPOINTS
  17. - DRAW_QUICK_VOLUME
  18. \param quick if true draw in wiremode
  19. \param quick_mode quick mode
  20. */
  21. void Nviz::Draw(bool quick, int quick_mode)
  22. {
  23. Nviz_draw_cplane(data, -1, -1); // ?
  24. if (quick) {
  25. Nviz_draw_quick(data, quick_mode);
  26. }
  27. else {
  28. Nviz_draw_all (data);
  29. }
  30. G_debug(1, "Nviz::Draw(): quick=%d",
  31. quick);
  32. return;
  33. }
  34. /*!
  35. \brief Erase map display (with background color)
  36. */
  37. void Nviz::EraseMap()
  38. {
  39. GS_clear(data->bgcolor);
  40. G_debug(1, "Nviz::EraseMap()");
  41. return;
  42. }