r/ProgrammingLanguages • u/ThomasMertes • Oct 29 '26
How programming languages approach graphics
Many general-purpose languages delegate graphics to third-party libraries (like SDL, Raylib, or OpenGL). Seed7 integrates portable 2-D graphics right into its standard library. This IMHO improves portability. I also thought about introducing operators / statements to do graphics, but until now I don't use operators or statements to do graphics.
29
Upvotes
View all comments
Show parent comment
1
u/ThomasMertes 29d ago edited 29d ago
In this case you need to ensure that this portable library is installed when you move your program to a new computer.
The Seed7 standard library is guaranteed to be always available.
The Seed7 graphics library is not in kernel space.
There are driver libraries written in C, which interface the graphics library of the operating system. On Linux X11 is interfaced, on Windows GDI is interfaced, and in the browser JavaScript is used.
When Seed7 is compiled the corresponding graphics driver library is used.
If a Seed7 program calls a graphic function the C function of the driver library is called, which checks parameters and then calls one or more functions from the graphics library of the operating system.
As described in the previous post a lot of maintenance work is done by the graphics driver library as well.
Edit: The X11 and GDI libraries are not in kernel space either. Kernel space would refer to the operating system kernel. None of the libraries mentioned in this discussion are in kernel space.