Abstract
This chapter illustrates the dividing line between “core” Blender source code and one of the most fundamental of Blender’s internal support libraries called ghost. We will uncover the connection between ghost and windowmanager, the module that provides the underpinnings for Blender’s window-based application. Importantly, Blender is also an OpenGL program. We outline the required steps client programs must undertake to obtain a platform-specific window, along with an associated rendering context. Additionally, we discuss how you may write your own OpenGL application on top of ghost. Following this, we show how the windowmanager itself calls ghost. This allows the windowmanager module to abstract the windowing system, which is part of the underlying operating system.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
GLUT (Graphics Library Utility Toolkit) was an early cross-platform support library for creating operating system-specific windows and an OpenGL rendering context. The original version was written by Mark Kilgard, the author of the “Green Book,” i.e., OpenGL Programming for the X Windows System. Following Kilgard’s GLUT, freeglut was used extensively by the “Red Book” (i.e., the OpenGL Programming Guide) until its ninth edition.
- 2.
Today, most introductory texts on OpenGL development use an analog to the GLUT library called GLFW (Graphics Library Framework).
- 3.
A software “toolkit” does not require such an abstraction of the event loop. However, GLUT also maintained the event loop for applications using it, despite it generally being called a “toolkit.”
- 4.
For versions of Blender prior to 2.64, the POSIX C standard library’s interface is imported via <pwd.h> in GHOST_SystemPathsUnix.cpp, which provides access to the system file etc/passwd, a text-file database of information about the current user, including the user’s home directory.
- 5.
Formerly X Desktop Group, an open source project providing standard interfaces to desktop environments using X11 windowing systems.
- 6.
This is noted in the intern/ghost/GHOST_ISystem.h comments. See reference to abbreviated comment section in Listing 3-1.
- 7.
The graph was created using graphviz (graphviz.org) and Doxygen (doxygen.nl).
- 8.
“NDOF” is used for a 3D Mouse. It can be excluded from a build.
- 9.
It should be noted that the GHOST_C-Test.c uses immediate mode OpenGL calls and a fixed function pipeline. Thus, with OpenGL versions above 3.0, GHOST_C-Test.c will not work.
- 10.
We went over the execution path reaching WM_init() from Blender’s main entry point (source/creator/creator.c) in Chapter 2, regarding the “startup” blend file.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to APress Media, LLC , part of Springer Nature
About this chapter
Cite this chapter
Hollister, B.E. (2021). ghost: Soul of the windowmanager Module. In: Core Blender Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-6415-7_3
Download citation
DOI: https://doi.org/10.1007/978-1-4842-6415-7_3
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-6414-0
Online ISBN: 978-1-4842-6415-7
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books