olofson / eel

The Extensible Embeddable Language for scripting in realtime applications
http://eelang.org/
zlib License
46 stars 4 forks source link

GUI element rendering engines #109

Open olofson opened 7 years ago

olofson commented 7 years ago

Both the old EBGUI and the "Kobo II GUI" have their rendering code mostly in dedicated modules, and the latter also adds higher level scripting as part of themes. For the new GUI toolkit to cover both OpenGL and SDL2 rendering, and possibly other options, or adaptions for applications with different needs, all rendering code, including windows, buffering, clipping etc, needs to be implemented as "engines"; EEL objects that can be provided by applications, or (for default OpenGL and SDL2 rendering) included with the toolkit.

These engines should have an interface suitable for use from theme scripts (which will serve as an intermediate level between the GUI toolkit itself, and the rendering engine), and need to implement loading and rendering of images, textures, and fonts, as well as some basic drawing primitives. There should probably also be a "gateway" to the underlying API, for GUI elements and application code that needs to deal directly with OpenGL or SDL2.