• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bindings/cxx/include/H15-Jan-2021-1,039510

doc/H15-Jan-2021-1,5531,113

examples/H15-Jan-2021-11,2599,300

include/H15-Jan-2021-1,956697

resources/H03-May-2022-315313

scripts/H15-Jan-2021-667460

src/H15-Jan-2021-7,0565,536

test/H15-Jan-2021-1,396940

.clang-formatH A D15-Jan-2021630 2928

.clang-tidyH A D15-Jan-202155 54

.clant.jsonH A D15-Jan-2021182 1413

.editorconfigH A D15-Jan-2021296 2015

.gitattributesH A D15-Jan-202127 21

.gitignoreH A D15-Jan-202143 65

.gitlab-ci.ymlH A D15-Jan-20212.9 KiB124106

.gitmodulesH A D15-Jan-202170 43

.includes.impH A D15-Jan-2021161 54

AUTHORSH A D15-Jan-2021508 1412

COPYINGH A D15-Jan-2021752 1411

README.mdH A D15-Jan-20213.6 KiB9967

pugl.pc.inH A D15-Jan-2021210 1210

wafH A D15-Jan-2021709 2817

wscriptH A D15-Jan-202131 KiB815659

README.md

1Pugl
2====
3
4Pugl (PlUgin Graphics Library) is a minimal portable API for GUIs which is
5suitable for use in plugins.  It works on X11, MacOS, and Windows, and
6optionally supports Vulkan, OpenGL, and Cairo graphics contexts.
7
8Pugl is vaguely similar to libraries like GLUT and GLFW, but with some
9distinguishing features:
10
11 * Minimal in scope, providing only a thin interface to isolate
12   platform-specific details from applications.
13
14 * Zero dependencies, aside from standard system libraries.
15
16 * Support for embedding in native windows, for example as a plugin or
17   component within a larger application that is not based on Pugl.
18
19 * Simple and extensible event-based API that makes dispatching in application
20   or toolkit code easy with minimal boilerplate.
21
22 * Suitable not only for continuously rendering applications like games, but
23   also event-driven applications that only draw when necessary.
24
25 * Explicit context and no static data whatsoever, so that several instances
26   can be used within a single program at once.
27
28 * Small, liberally licensed Free Software implementation that is suitable for
29   vendoring and/or static linking.  Pugl can be installed as a library, or
30   used by simply copying the headers into a project.
31
32Stability
33---------
34
35Pugl is currently being developed towards a long-term stable API.  For the time
36being, however, the API may break occasionally.  Please report any relevant
37feedback, or file feature requests, so that we can ensure that the released API
38is stable for as long as possible.
39
40Documentation
41-------------
42
43Pugl is a C library that includes C++ bindings.
44Each API is documented separately:
45
46 * [C Documentation](https://lv2.gitlab.io/pugl/c/singlehtml)
47 * [C++ Documentation](https://lv2.gitlab.io/pugl/cpp/singlehtml)
48
49The documentation can also be built from the source by configuring with `--docs`.
50
51Testing
52-------
53
54There are a few unit tests included, but unfortunately manual testing is still
55required.  The tests and example programs will be built if you pass the
56`--test` option when configuring:
57
58    ./waf configure --test
59
60Then, after building, the unit tests can be run:
61
62    ./waf
63    ./waf test --gui-tests
64
65The `examples` directory contains several programs that serve as both manual
66tests and demonstrations:
67
68 * `pugl_embed_demo` shows a view embedded in another, and also tests
69   requesting attention (which happens after 5 seconds), keyboard focus
70   (switched by pressing tab), view moving (with the arrow keys), and view
71   resizing (with the arrow keys while shift is held).  This program uses only
72   very old OpenGL and should work on any system.
73
74 * `pugl_window_demo` demonstrates multiple top-level windows.
75
76 * `pugl_shader_demo` demonstrates using more modern OpenGL (version 3 or 4)
77   where dynamic loading and shaders are required.  It can also be used to test
78   performance by passing the number of rectangles to draw on the command line.
79
80 * `pugl_cairo_demo` demonstrates using Cairo on top of the native windowing
81   system (without OpenGL), and partial redrawing.
82
83 * `pugl_print_events` is a utility that prints all received events to the
84   console in a human readable format.
85
86 * `pugl_cxx_demo` is a simple cube demo that uses the C++ API.
87
88 * `pugl_vulkan_demo` is a simple example of using Vulkan in C that simply
89   clears the window.
90
91 * `pugl_vulkan_cxx_demo` is a more advanced Vulkan demo in C++ that draws many
92   animated rectangles like `pugl_shader_demo`.
93
94All example programs support several command line options to control various
95behaviours, see the output of `--help` for details.  Please file an issue if
96any of these programs do not work as expected on your system.
97
98 -- David Robillard <d@drobilla.net>
99