Abstract
OpenGL is the most widely used API and programming language in college-level computer graphics courses. However, OpenGL programs are difficult to comprehend and debug because they involve programming for both CPU and GPU and the data transfer between them. Modern OpenGL is a complex data flow machine with multiple programmable stages, and it is difficult to trace the partially hidden data flows in the source code written in C++, OpenGL, and OpenGL Shading Language. We have developed a web-based data visualization tool to analyze OpenGL source code and generate interactive data flow diagrams from the source code. The diagrams can help novice programmers build clear mental images of complex data flows. The source code viewer and the data flow diagram are synchronized so that a user can select an OpenGL API call, and the corresponding component in the data flow diagram is highlighted, and vice versa. A programmer can visually step through the data flows and detect specific bugs that are otherwise difficult to find. The main contribution of this paper is an interactive learning tool for computer graphics education.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
diagrams.net (2022). https://github.com/jgraph/drawio. Accessed July 2022
Angel, E., Shreiner, D.: Interactive Computer Graphics: A Top-Down Approach with Shader-Based OpenGL, 6 edn. Pearson (2011)
Apple: Metal (2022). https://developer.apple.com/documentation/metal. Accessed July 2022
Asenov, D., Hilliges, O., Müller, P.: The effect of richer visualizations on code comprehension. In: Proceedings of the Conference on Human Factors in Computing Systems, pp. 5040–5045. ACM (2016)
Bacher, I., Namee, B.M., Kelleher, J.D.: On using tree visualisation techniques to support source code comprehension. In: Proceedings of the 2016 IEEE Working Conference on Software Visualization (VISSOFT), pp. 91–95. IEEE (2016)
Balreira, D.G., Walter, M., Fellner, D.W.: A survey of the contents in introductory computer graphics courses. Comput. Graph. 77, 88–96 (2018)
Bedu, L., Tinh, O., Petrillo, F.: A tertiary systematic literature review on software visualization. In: Proceedings of the 7th IEEE Working Conference on Software Visualization (VISSOFT), pp. 33–44. IEEE (2019)
Blackwell, A.F., Petre, M., Church, L.: Fifty years of the psychology of programming. Int. J. Hum Comput Stud. 131, 52–63 (2019)
Butler, K., et al.: Creating a user-centric data flow visualization: a case study. In: Yamamoto, S., Mori, H. (eds.) HCII 2019. LNCS, vol. 11569, pp. 174–193. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-22660-2_12
Caserta, P., Zendra, O.: Visualization of the static aspects of software: a survey. IEEE Trans. Vis. Comput. Graph. 17, 913–933 (2011)
Chotisarn, N., et al.: A systematic literature review of modern software visualization. J. Vis. 23, 539–558 (2020). https://doi.org/10.1007/s12650-020-00647-w
Cornelissen, B., Zaidman, A., Deursen, A.V.: A controlled experiment for program comprehension through trace visualization. IEEE Trans. Softw. Eng. 37, 341–355 (2011)
Cornelissen, B., Zaidman, A., Deursen, A.V., Moonen, L., Koschke, R.: A systematic survey of program comprehension through dynamic analysis. IEEE Trans. Softw. Eng. 35, 684–702 (2009)
Dias, M., Orellana, D., Vidal, S., Merino, L., Bergel, A.: Evaluating a visual approach for understanding JavaScript source code. In: Proceedings of the IEEE/ACM International Conference on Program Comprehension, vol. 20, pp. 128–138. IEEE (2020)
Duru, H.A., Çakır, M.P., İşler, V.: How does software visualization contribute to software comprehension? A grounded theory approach. Int. J. Hum.-Comput. Interact. 29(11), 743–763 (2013)
Fix, V., Wiedenbeck, S., Scholtz, J.: Mental representations of programs by novices and experts. In: Proceedings of the INTERACT 1993 and CHI 1993 Conference on Human Factors in Computing Systems, pp. 74–79. ACM (1993)
Ghaleb, T.A., Alturki, M.A., Aljasser, K.: Program comprehension through reverse-engineered sequence diagrams: a systematic review. J. Softw. Evol. Process 30, e1965 (2018)
Hendrix, D., Cross, J.H., Maghsoodloo, S.: The effectiveness of control structure diagrams in source code comprehension activities. IEEE Trans. Softw. Eng. 28, 463–477 (2002)
Jacobs, T., Musial, B.: Interactive visual debugging with UML. In: Proceedings of the 2003 ACM Symposium on Software Visualization, pp. 115–122. ACM (2003)
Klerkx, J., Verbert, K., Duval, E.: Enhancing learning with visualization techniques. In: Spector, J.M., Merrill, M.D., Elen, J., Bishop, M.J. (eds.) Handbook of Research on Educational Communications and Technology, pp. 791–807. Springer, New York (2014). https://doi.org/10.1007/978-1-4614-3185-5_64
Koschke, R.: Software visualization in software maintenance, reverse engineering, and re-engineering: a research survey. J. Softw. Maint. Evol. 15, 87–109 (2003)
Lemieux, F., Salois, M.: Visualization techniques for program comprehension - a literature review. In: Fujita, H., Mejri, M. (eds.) New Trends in Software Methodologies, Tools and Techniques, pp. 22–47. IOS Press (2006)
Lommerse, G., Nossin, F., Voinea, L., Telea, A.: The visual code navigator: an interactive toolset for source code investigation. In: Proceedings of the IEEE Symposium on Information Visualization (InfoVis), pp. 24–31. IEEE (2005)
Ma, L., Ferguson, J., Roper, M., Wood, M.: Investigating and improving the models of programming concepts held by novice programmers. Comput. Sci. Educ. 21, 57–80 (2011)
Medeiros, R.P., Ramalho, G.L., Falcao, T.P.: A systematic literature review on teaching and learning introductory programming in higher education. IEEE Trans. Educ. 62, 77–90 (2019)
Microsoft: Direct3D (2022). https://docs.microsoft.com/en-us/windows/win32/directx. Accessed July 2022
Mysore, S., Mazloom, B., Agrawal, B., Sherwood, T.: Understanding and visualizing full systems with data flow tomography. SIGOPS Oper. Syst. Rev. 42, 211–221 (2008)
Navarro-Prieto, R., Cañas, J.J.: Are visual programming languages better? The role of imagery in program comprehension. Int. J. Hum Comput Stud. 54, 799–829 (2001)
Nguyen, H.T., et al.: Visualizing hierarchical performance profiles of parallel codes using CallFlow. IEEE Trans. Vis. Comput. Graph. 27, 2455–2468 (2021)
Pancake, C.M., Utter, S.: Models for visualization in parallel debuggers. In: Proceedings of the 1989 ACM/IEEE Conference on Supercomputing, pp. 627–636 (1989)
Pennington, N.: Comprehension strategies in programming. In: Empirical Studies of Programmers: Second Workshop, pp. 100–113. Ablex Publishing Corp. (1987)
Pilskalns, O., Wallace, S., Ilas, F.: Runtime debugging using reverse-engineered UML. In: Engels, G., Opdyke, B., Schmidt, D.C., Weil, F. (eds.) MODELS 2007. LNCS, vol. 4735, pp. 605–619. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-75209-7_41
Podila, S., Zhu, Y.: A visualization tool for 3D graphics program comprehension and debugging. In: Proceedings of the IEEE Working Conference on Software Visualization (VISSOFT), pp. 111–115 (2016)
Price, B.A., Baecker, R.M., Small, I.S.: A principled taxonomy of software visualization. J. Vis. Lang. Comput. 4, 211–266 (1993)
Robins, A., Rountree, J., Rountree, N.: Learning and teaching programming: a review and discussion. Comput. Sci. Educ. 13, 137–172 (2003)
The Khronos Group: OpenGL (2022). https://www.khronos.org/opengl/. Accessed July 2022
The Khronos Group: Vulkan (2022). https://www.vulkan.org/. Accessed July 2022
The Khronos Group: WebGL (2022). https://www.khronos.org/webgl/. Accessed July 2022
Umphress, D.A., Hendrix, T.D., Cross, J.H., Maghsoodloo, S.: Software visualizations for improving and measuring the comprehensibility of source code. Sci. Comput. Program. 60, 121–133 (2006)
Šurkovský, M.: MP net as abstract model of communication for message-passing applications. In: Proceedings of the 16th ACM International Conference on Computing Frontiers, pp. 263–267. ACM (2019)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Zhu, Y. (2022). Visualizing Data Flows in Computer Graphics Programs for Code Comprehension and Debugging. In: Bebis, G., et al. Advances in Visual Computing. ISVC 2022. Lecture Notes in Computer Science, vol 13598. Springer, Cham. https://doi.org/10.1007/978-3-031-20713-6_28
Download citation
DOI: https://doi.org/10.1007/978-3-031-20713-6_28
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-20712-9
Online ISBN: 978-3-031-20713-6
eBook Packages: Computer ScienceComputer Science (R0)