Repository navigation
OpenECS-examples 0.5.0
Pre-releaseOpenECS-examples 0.5.0 names its examples by what they teach: c1_hello to c13_workers the plugin interface, and s1_terminal to s10_cglm the standard plugins. s10_cglm is new, and s9_gpu_model's shaders are GLSL. The release has the examples built for Linux and Windows.
It comes out with OpenECS 0.5.0, which ships these examples, built, in its examples/ folder, and OpenECS-std 0.5.0, whose plugins they use.
Run an example from OpenECS's folder:
./OpenECS --fresh --preset examples/s10_cglm/preset.luaWhat you can learn
3D math. s10_cglm turns a cube and shows it in perspective with the cglm plugin's vectors and matrices, and draws its edges with draw. Its second workspace has the same cube in C, with the same functions. Drag to turn it.
Shaders in GLSL. s9_gpu_model gives gpu its shaders as GLSL source, which gpu compiles on every system, and makes its matrices with cglm. Its test checks gpu.compile's SPIR-V and its error message too.
GPU panels without SDL. In s8_gpu, the C plugin draws with the gpu plugin's functions, as the Lua one does.
ui in C. In c3_ui, the C panel on the second workspace shows the same controls as the Lua one, and one test checks both.
Following a setting. c4_settings follows its settings with ecs.settingChanged.
Plugins that see only the interface. The examples' C plugins include only OpenECS's include/: OpenECS.h and the plugins' headers.
Small fixes
- A test checks that Shift+1, after the prefix, moves a panel to workspace 1.
- The comments follow OpenECS's folders, named
OpenECS, and the theme's colour names,ecs.Color.
What will break
Names. The examples have new names. Update a command or a preset that names one:
| 0.4.0 | 0.5.0 |
|---|---|
1_hello … 12_sketch |
c1_hello … c12_sketch |
20_workers |
c13_workers |
13_terminal |
s1_terminal |
14_media |
s2_media |
15_network |
s3_network |
16_model |
s4_model |
17_files |
s5_files |
18_web |
s6_web |
19_first_party |
s7_first_party |
21_gpu |
s8_gpu |
22_gpu_model |
s9_gpu_model |
Plugin API. The examples' plugins use plugin API version 2, and need OpenECS 0.5.0.
Downloads
openecs-examples-0.5.0-linux-x86_64.tar.gzandopenecs-examples-0.5.0-windows-x86_64.zip: the examples built. Unpack one into an OpenECS 0.5.0 folder.openecs-examples-0.5.0-source.tar.gz: the examples' source. Build them inside a checkout of OpenECS, as README.md says.SHA256SUMS: checksums of the archives.
The examples are under the zlib license.