Commit graph

6646 commits

Author SHA1 Message Date
alexei-zebra
1dbd445027
give Window::getTitle a default implementation
Keeps the interface non-breaking for other window backends: the
decoration height and hovered button already have defaults, and now so
does the title.
2026-10-10 12:23:31 +03:00
alexei-zebra
14fa7e5fd2
fix building without the Wayland backend
The backend sources live in window/wayland and were picked up by the
global source glob, so a build with VOXELENGINE_WAYLAND=OFF (and any
non-Linux build, where the option is skipped entirely) tried to compile
them and failed on the generated protocol headers.

They are now collected separately and added to the target only when the
backend is enabled.

Also restores the CRLF line endings of Engine.cpp, GUI.hpp and
input.cpp, which were rewritten with LF and made their diffs look like
whole-file rewrites.
2026-10-10 12:23:31 +03:00
alexei-zebra
3b337241f5
draw window decorations with the engine GUI
The bar used to be drawn by the Wayland backend with its own shader,
bitmap font and textures, straight into the engine's GL frame. That
leaked GL state (the batch caches bound textures, so the engine kept
sampling the backend texture and all text turned into solid white
rectangles) and it duplicated fonts and styling.

Now the backend only owns the behaviour: hit zones, cursor shapes,
click interception and the compositor requests (move, resize,
minimize, maximize/restore, close). The bar itself is drawn by the
engine in WindowBar.cpp through the regular Batch2D/Font path, so it
looks like the rest of the UI.

Window gained getTitle(), getDecorationHeight() and
getDecorationHoveredButton(); GLFW keeps the defaults, so X11 and
Windows are unaffected. The backend's decoration drawing (bitmap font,
shader, quad batches) is removed: WaylandBar.cpp went from 630 to 140
lines.

Fixes found while debugging:
- GlStateGuard was defined but never used after the file split, so the
  stretched frame left its texture bound and broke text rendering after
  a window mode change; it is now applied around the cache capture and
  the stretched frame;
- takeScreenshot() now reads the front buffer and restores the read
  buffer afterwards.
2026-10-10 12:23:18 +03:00
alexei-zebra
b934e033b3
split the rest of the Wayland backend
WaylandWindow.cpp kept the window class with all methods defined in
place, the decorations, the free event listeners and the initialization
in one file. Now:

- WaylandWindow.hpp: the class declaration;
- WaylandWindow.cpp: surface, EGL, resize and frame pacing;
- WaylandBar.cpp: the window decorations (bar, font, buttons, dragging,
  edge resizing);
- WaylandListeners.cpp/.hpp: the free Wayland event handlers;
- WaylandInit.cpp: wayland_window_initialize.

No functional change.
2026-10-10 12:23:18 +03:00
alexei-zebra
cf92ebba76
split the Wayland backend into files
WaylandWindow.cpp held the protocol bindings, the shared compositor
state, the input implementation, the window itself, the free event
listeners and the initialization code in one 2400-line file.

Moved out of it:
- WaylandCommon.hpp/.cpp: shared compositor state, the display event
  loop, keysym mapping and the window logger;
- WaylandInput.hpp: the input implementation (keyboard, clipboard,
  cursors, key repeat).

No functional change.
2026-10-10 12:23:18 +03:00
alexei-zebra
1e689e88b1
add native Wayland window backend
Wayland support was missing a proper windowing layer: the GLFW backend
leaves the known platform gaps (cursor themes, window icon, window
position, fullscreen output selection).

The new backend talks to the compositor directly:
- xdg-shell, EGL, xkbcommon (keyboard, repeat, layout) instead of GLFW;
- cursors through wp_cursor_shape_manager_v1, so no cursor theme lookup
  is required and no "standard cursor shape unavailable" errors appear;
- window icon and title are drawn by the engine itself, since Wayland
  has no window icon protocol and GNOME provides no server-side
  decorations;
- fullscreen requests the current output (set_fullscreen with NULL), so
  the window no longer jumps to another monitor;
- interactive resize presents a cached frame scaled to the new size
  while the pointer is down and refreshes the real frame when the drag
  pauses, keeping the window glued to the cursor.

libdecor is not used: libdecor_frame_commit() redraws the whole
decoration and acks the configure in the same call, and mutter sends
200-330 configures per second during an interactive resize, so the
decoration was redrawn hundreds of times per second (measured: 2 s of
work per second, loop stalls up to 6 s). The decorations are drawn by
the engine instead, which measured 2.3 ms average configure-to-present
latency during a real drag.

GLFW stays the backend for X11 and Windows; VOXEL_WINDOW_BACKEND=x11
forces it on Wayland sessions.
2026-10-10 12:23:18 +03:00
MihailRis
1dd1af1a72
Merge pull request #1023 from MihailRis/remove-incorrect-fix
remove incorrect fix
2026-10-10 12:11:43 +03:00
MihailRis
521ebf43ab remove incorrect fix 2026-10-10 11:36:31 +03:00
MihailRis
f036979dc0
Merge pull request #1007 from Astazium/ui-fixes
ui fixes
2026-10-10 11:34:34 +03:00
MihailRis
7130a62593
Merge pull request #1022 from MihailRis/rename-voxelengine-to-voxelcore-in-cmake
complete the rename of voxelengine to voxelcore
2026-10-10 11:27:37 +03:00
MihailRis
8962042627 complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
MihailRis
a875630cd8
Merge pull request #1021 from DIvan2K/main
flake.nix fix program filename
2026-10-10 10:47:23 +03:00
MihailRis
50de0afb62
Merge pull request #1019 from ostermine/fix/reload-module-env
fix reload_module ignoring pack environment
2026-10-10 10:42:59 +03:00
DIvan2000
a2321e0e28 fix program filename 2026-10-10 05:04:14 +04:00
ostermine
d8017ff995 fix reload_module ignoring pack environment
reload_module loaded the new module code with the global environment,
while require runs modules in their pack environment. After reload,
PACK_ID and other pack globals were nil in the module.
2026-10-10 00:52:23 +03:00
MihailRis
e8a83423d8 fix outdated doc/*/scripting/builtins/libgfx-skeletons.md
Some checks failed
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Has been cancelled
Build / Build (push) Has been cancelled
Macos Build / build-dmg (push) Has been cancelled
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Has been cancelled
MSVC Build / build-windows (windows-2022) (push) Has been cancelled
2026-10-09 00:09:48 +03:00
MihailRis
05c0a1868d
Merge pull request #1014 from MihailRis/patch-0.32.2
Some checks are pending
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Waiting to run
Build / Build (push) Waiting to run
Macos Build / build-dmg (push) Waiting to run
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Waiting to run
MSVC Build / build-windows (windows-2022) (push) Waiting to run
0.32.2 patch
2026-10-07 23:31:28 +03:00
MihailRis
5060a8635d fix locked cursor if world was closed with menu hidden 2026-10-07 23:09:40 +03:00
MihailRis
cf35023adf fix 'mouse:' input prefix is not available 2026-10-06 12:53:50 +03:00
MihailRis
99a62710b8
Merge pull request #1013 from MihailRis/patch-0.32.1
Some checks failed
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Has been cancelled
Build / Build (push) Has been cancelled
Macos Build / build-dmg (push) Has been cancelled
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Has been cancelled
MSVC Build / build-windows (windows-2022) (push) Has been cancelled
0.32.1 patch
2026-10-05 23:18:48 +03:00
MihailRis
cdc32173c3 update doc/*/xml-ui-layouts.md 2026-10-05 22:26:04 +03:00
MihailRis
76e5e5b6f8 fix vca 'configure' directive parsing 2026-10-05 22:11:21 +03:00
MihailRis
446b6edd03 update doc/*/scripting/ecs.md 2026-10-05 21:57:16 +03:00
MihailRis
3c7755f61b fix 'selectable' with static entities 2026-10-05 21:39:18 +03:00
MihailRis
ef85592e21 fix chunks render limits 2026-10-05 21:21:33 +03:00
MihailRis
09b427be1e
Merge pull request #1011 from ostermine/docs/readme-openssl
Some checks are pending
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Waiting to run
Build / Build (push) Waiting to run
Macos Build / build-dmg (push) Waiting to run
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Waiting to run
MSVC Build / build-windows (windows-2022) (push) Waiting to run
docs: add OpenSSL to Linux build dependencies in README
2026-10-05 19:15:04 +03:00
ostermine
a9069dd22e docs: add OpenSSL to Linux build dependencies in README
src/CMakeLists.txt requires OpenSSL 3.0 (Crypto) since the crypto
library was added, but the README install commands did not list it,
so configuring on a clean system fails with "Could NOT find OpenSSL".
CI workflows and the Dockerfile already install libssl-dev.
2026-10-05 04:03:17 +03:00
MihailRis
dacebf94bc 0.32 release 2026-10-03 11:13:27 +03:00
MihailRis
f6a7a99a74 revert "update shadows.glsl"
This reverts commit 19a952a3be.
2026-10-03 11:10:56 +03:00
MihailRis
2f4fff264f update CHANGELOG.md 2026-10-03 02:29:40 +03:00
MihailRis
d6583e0334 Merge branch 'main' into release-0.32 2026-10-03 02:28:48 +03:00
MihailRis
00425c4175
Merge pull request #1005 from MihailRis/vca-fixes
vca fixes
2026-10-03 02:28:12 +03:00
MihailRis
ef4207aed0 fixes 2026-10-02 17:44:48 +03:00
nogitsune-youkai
d062c28376
Fix: correct luajit lookup on Windows (#1006)
* Fix: correct luajit paths

* fixed comment

* removed unnecessary comments
2026-10-02 17:23:49 +03:00
MihailRis
fc16c1ebcd Merge branch 'main' into vca-fixes 2026-10-01 21:53:30 +03:00
MihailRis
e802753f06
Merge pull request #997 from MihailRis/update-deferred-lighting
update advanced shading
2026-10-01 21:52:56 +03:00
MihailRis
f90750c066
Merge pull request #1002 from nogitsune-youkai/integer-overflow-assert
Fix: Add asserts to prevent undefined behavior on empty containers
2026-10-01 12:13:03 +03:00
Astazium
5a0a1cf326 ui fixes 2026-09-30 20:43:43 +03:00
MihailRis
0e0034ce56
Merge pull request #1003 from nogitsune-youkai/improve-vs-CMake-presets
Improve Windows presets
2026-09-30 12:58:22 +03:00
MihailRis
7e572d620f
Merge pull request #1004 from boolean-false/fix/vector-font-textbox-metrics
Исправил расчёт ширины текста и положение каретки
2026-09-29 22:16:01 +03:00
MihailRis
e4eae0416e fix the 2026-09-29 18:59:28 +03:00
MihailRis
dd577dd080 cleanup 2026-09-29 18:44:19 +03:00
MihailRis
d3de449b7b fix absolute bezier keyframes 2026-09-29 18:41:02 +03:00
MihailRis
ea63d29221 fix custom curves 2026-09-29 18:39:46 +03:00
boolean-false
7211e99bc8 fix text width and caret positioning in text boxes 2026-09-29 20:31:14 +07:00
nogitsune-youkai
ca68ddc03a Improve Windows presets 2026-09-29 01:20:54 +03:00
nogitsune-youkai
3378001b9b Fix: Add asserts to prevent undefined behavior on empty containers 2026-09-28 22:02:08 +03:00
MihailRis
ac3d4a5148
Merge pull request #998 from nogitsune-youkai/stack_vector-refactoring
Refactor: Use size_type for sizes and indices
2026-09-28 01:56:18 +03:00
MihailRis
19a952a3be update shadows.glsl 2026-09-28 01:47:23 +03:00
MihailRis
ffba11e87f update clouds shader 2026-09-28 01:40:48 +03:00