Eric Streit 6d3ed22daf correction de fichiers před 3 týdny
..
examples 6d3ed22daf correction de fichiers před 3 týdny
ANALYSIS.md ad62e8dca3 Make the microui demo window properly resizable (TIGR_AUTO) před 3 týdny
MICROUI-PORT.md ad62e8dca3 Make the microui demo window properly resizable (TIGR_AUTO) před 3 týdny
README.md 46785a9bf0 Port microui v2.02 to GNU Modula-2 with a tigr demo před 3 týdny
helper.def 9a83b7ca75 first commit před 9 měsíci
helper.mod 9a83b7ca75 first commit před 9 měsíci
helper.o 02efb0bdda Fix tigr Modula-2 binding and complete the examples před 3 týdny
microui.def 46785a9bf0 Port microui v2.02 to GNU Modula-2 with a tigr demo před 3 týdny
microui.mod 46785a9bf0 Port microui v2.02 to GNU Modula-2 with a tigr demo před 3 týdny
microui.o 46785a9bf0 Port microui v2.02 to GNU Modula-2 with a tigr demo před 3 týdny
microuiHelpers.def 46785a9bf0 Port microui v2.02 to GNU Modula-2 with a tigr demo před 3 týdny
microuiHelpers.mod 46785a9bf0 Port microui v2.02 to GNU Modula-2 with a tigr demo před 3 týdny
microuiHelpers.o 46785a9bf0 Port microui v2.02 to GNU Modula-2 with a tigr demo před 3 týdny
tigr.def 02efb0bdda Fix tigr Modula-2 binding and complete the examples před 3 týdny
tigr.h 9a83b7ca75 first commit před 9 měsíci
tigr.o c4fe812d4d Add a Pong game example (no assets) před 3 týdny

README.md

A GNU Modula-2 binding of the tigr graphic library

I did this because I needed a graphic library to follow the UI tutorial here :

https://nakst.gitlab.io/tutorial/ui-part-1.html

The tigr library repository is here:

https://github.com/erkkah/tigr/tree/master

I used also the h2d utility found in the XDS distribution, to check my choices when I tralslated the C headers into Modula-2 ones.

Instructions

To compile the examples, use this command :

  • Compiling tigr.o

gcc -c tigr.c

  • Compiling helper.o

gm2 -fiso -c helper.mod

  • Compiling an example

gm2 -fiso -I ../../ ../../tigr.o ../../helper.o program.mod -o program -s -lGL -lX11

microui port

This repository also contains an ISO Modula-2 port of microui v2.02 (immediate-mode UI, by rxi) together with a tigr-rendered demo.

  • Compiling the microui modules (from modula2/)

gcc -c ../tigr-master/tigr.c -o tigr.o gm2 -fiso -c helper.mod gm2 -fiso -I. -c microuiHelpers.mod gm2 -fiso -I. -c microui.mod

  • Building the interactive demo (from modula2/examples/microui-demo/)

gm2 -fiso -I ../../ ../../tigr.o ../../helper.o

   ../../microuiHelpers.o ../../microui.o \
   microui-demo.mod -o microui-demo -lGL -lX11

./microui-demo

  • Building the off-screen smoke test (writes microui-demo.png)

gm2 -fiso -I ../../ ../../tigr.o ../../helper.o

   ../../microuiHelpers.o ../../microui.o \
   microui-headless.mod -o microui-headless -lGL -lX11

./microui-headless

microui-demo shows windows, headers, tree nodes, buttons, a popup, checkboxes, sliders, a text box and a log panel; press ESC to quit. See ANALYSIS.md for the GM2-specific adaptations and bugs worked around.