Skip to content

OpenECS-std 0.5.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 28 Oct 12:56
· 350 commits to dev since this release
c7d787b

OpenECS-std 0.5.0 adds cglm, a plugin that gives cglm's vectors, matrices and quaternions to Lua and C. gpu compiles shaders from GLSL, on every system, with nothing to download. The release has the plugins built for Linux and Windows.

It comes out with OpenECS 0.5.0, which ships these plugins built, in its plugins/ folder. The examples of OpenECS-examples 0.5.0 use them.

What you can do

Do 3D math in Lua. cglm binds the cglm library: vectors, matrices, quaternions, cameras and noise. Each vector, quaternion and matrix is a buffer of floats, as shaders take them, and each function is named as cglm's: glm_mat4_mul is cglm.mat4Mul. C plugins call the same functions through cglm.h.

Write shaders in GLSL. gpu.shader takes glsl source, version 450, which glslang compiles to SPIR-V. On Windows, where Direct3D 12 does not take SPIR-V, gpu turns it into HLSL with SPIRV-Cross and compiles that with Windows' own compiler.

  • gpu.compile(source, stage) gives the SPIR-V of a GLSL source, or glslang's message, so a plugin can show a shader's errors.
  • gpu counts a shader's uniform blocks and textures from its SPIR-V when the description leaves them out.

Clip a part of a draw. draw.clip(surface, x, y, width, height, body) clips while body runs. Clips nest, and a clip ends when body returns, also when it fails.

Watch folders on Windows as on Linux. fs uses the system's own notifications on Windows, ReadDirectoryChangesW, as it uses inotify on Linux. Other systems read the folders again every half second.

Install the plugins from the release. openecs-std-0.5.0-linux-x86_64.tar.gz and openecs-std-0.5.0-windows-x86_64.zip hold plugins/, presets/ and the plugins' definition files in include/. Unpack one into an OpenECS 0.5.0 folder.

Small fixes

  • Lists in ui handle Up, Down and Return themselves, and trees Left and Right too. ui's separator vertical works.
  • ui's C header has every element that Lua's ui has, such as UI_TABLE, UI_SORTED and UI_TREE.
  • draw's "ui" font follows ecs.font when it changes, and a ring from circle is at least a pixel thick.
  • textgrid's put and print no longer write control characters into cells.
  • draw.newImage and mixer.newSound no longer crash when memory runs out.
  • gpu frees a buffer whose upload failed; audio says why a stream cannot be opened.
  • net trusts the certificates of a file that it can read, and warns about the others. A UDP host whose name failed to resolve is looked up again on the next send.
  • web's done callbacks run in the order of the requests.
  • Every function says what its parameters and its result are.

What will break

Manifests and native plugins. The plugins use plugin API version 2, as OpenECS 0.5.0 says. They need OpenECS 0.5.0.

Renamed and removed.

  • kind is type in ui's descriptions, the launcher's entries and web.socketReceive.
  • ui.tip is ui.tooltip. ui.focus and ui.tooltip give value<string?>.
  • ui.move, ui.activate, ui.expand, settings.edit and draw.unclip are removed.
  • cglm.project's parameters are named position and viewport.

Building. glslang and SPIRV-Cross are C++, so std's build compiles them with CMake and a C++ compiler, once. A first build takes about 90 seconds more.

Downloads

  • openecs-std-0.5.0-linux-x86_64.tar.gz and openecs-std-0.5.0-windows-x86_64.zip: the plugins built, as above, with the licenses of the libraries in them.
  • openecs-std-0.5.0-source.tar.gz: the source with the libraries it compiles in. Build it inside a checkout of OpenECS, as README.md says.
  • SHA256SUMS: checksums of the archives.

The standard plugins are under the zlib license. The libraries in dependencies/ keep their own licenses, which OpenECS's release lists.