- 1Premise
- 2C, Xlib, Xrandr on Linux/Xorg
- 3VC++, WinAPI, GDI+ on Windows
- 4C, OpenGL, GLUT on Linux and Windows
- 5Qt 5 on Windows
- 6C, SDL2 on Linux
- 7Python, PyGame on Linux and Windows
- 8QuickBASIC on DOS
- 9Measuring Processing Requirements
- 10Measuring Memory Requirements
- 11Results of the Measurments
Premise
On the weekend i wanted to perform the task of drawing a yellow rectangle programmatically onto the screen of a Personal Computer:
- The program would feature a viewport that occupies the entirety of the primary display of the PC.
- On the viewport, 640 pixels could be adressed in width, 480 in height.
- The viewport would be drawn in black color by default.
- A yellow, filled rectangle would be drawn from an upper left corner at pixel coordinates 10 from the left, 20 from the top to a lower right corner at 100 from the left, 75 from the top.
- When having drawn the yellow rectangle, the program would indefinately await any keypress and then shut down.
I solved this task using several different programming languages and toolkits, having the following goals for the implementation:
- The program does a simple thing, so it should require little processing and memory resources.
- The program should still work in 24 months from now.