Skip to content

Latest commit

 

History

History
92 lines (50 loc) · 3.38 KB

README.md

File metadata and controls

92 lines (50 loc) · 3.38 KB

lpugl Examples

  • example01.lua

    Simple example using the Cairo rendering backend. The Cairo backend requires OOCairo.

    Screenshot example01

  • example03.lua

    A mini game demonstrating smooth animations using pre-rendered cairo surfaces.

    Screenshot example03

  • example04.lua

    Same mini game as in example03.lua but here the OpenGL backend is used. This example uses lua-nanovg as vector graphics rendering library for OpenGL.

    Screenshot example04

  • example05.lua

    An interactive demonstration for partial redrawing using the cairo rendering backend.

    Screenshot example05

  • example10.lua

    This examples demonstrates the usage of the Notify C API in a multithreading scenario.

    LPugl world objects implement the Notify C API, see src/notify_capi.h, i.e. the world object has an an associated meta table entry _capi_notify delivered by the C API function notify_get_capi() and the associated C API function toNotifier() returns a valid pointer for a given LPugl world object.

    In this example the Notify C API is used to notify the event loop by calling world:awake() each time a message is added by another thread to a mtmsg buffer object.

    This is done by connecting the LPugl world object as a notifier object to the mtmsg buffer object.

    Screenshot example10