Commit graph

87 commits

Author SHA1 Message Date
Admin
ed062cb224 fix shader compiler state clobber 2026-03-06 17:21:17 +01:00
Admin
bb331d0eb3 split f32 + uniformbuffers 2026-03-06 17:21:17 +01:00
Admin
e6aed38950 finall fix render glitch 2026-03-02 20:16:29 +01:00
Admin
daf440ee80 wasm 2026-03-01 20:22:11 +01:00
Admin
a6a859f28d fix better errors 2026-02-28 23:19:25 +01:00
Julián Montes de Oca
5a56fe5338 Video Widget: Support on More Platforms (#867)
* Add support for Video widget on WASM

* Add support for Video widget on Linux

* Linux video:  GStreamer appsink pipeline, GL texture upload, accurate seeking

* Add support for Video widget on Windows

* Harden cross-platform video playback and error handling

* Cleanup video playback logs

* Restore wasm builds

* Restore linux builds

* Restore linux builds

* Remove unused import
2026-02-27 18:52:49 +01:00
Admin
bc3455937e implicit io markers 2026-02-27 08:36:46 +01:00
offline-ant
4116b17a9c FOOTGUN FIX: panic on nil return from script_mod! in from_script_mod (#891)
When script_mod! is used with 'let app = startup() do ...' but the
block omits the final 'app' expression, the module returns nil. This
silently creates an App with an empty WidgetRef -- no window, no UI,
no error. The app runs indefinitely doing nothing.

Panic with an actionable message instead of silently succeeding.

Co-authored-by: ant <ant@offline.click>
2026-02-26 11:32:47 +01:00
Admin
956471c1a6 counter splash example 2026-02-26 10:08:25 +01:00
admin
ddebd64601 api 2026-02-25 17:14:39 +01:00
Admin
c8ab367b14 little glitches in script engine 2026-02-24 23:32:56 +01:00
Admin
aae121f31d fix gc issues 2026-02-24 21:40:08 +01:00
Admin
582af4b271 splice out a makepad-network crate 2026-02-23 23:21:31 +01:00
offline-ant
e3eb1dab2a fix: map atan2 to atan in GLSL shader backend (#870)
Co-authored-by: ant <ant@offline.click>
2026-02-23 17:45:22 +01:00
Admin
582c675c38 fix windows 2026-02-23 17:22:39 +01:00
admin
b6c847faf2 theme cleanup 2026-02-21 15:40:12 +01:00
Admin
5c5bd9cfc4 profiler 2026-02-21 10:37:25 +01:00
offline-ant
29c1fd1de2 Fix some build issues + upgrade android to r28 ndk. (#862)
* fix: add **/* glob to Linux NDK unzip to match subdirectories

`*` alone doesn't match `/` on Linux unzip builds with WILD_STOP_AT_DIR,
causing only top-level files to be extracted. Adding `**/*` ensures bin/,
lib64/, sysroot/ subdirectories are included.

* Auto-bundle NDK shared library deps (e.g. libc++_shared.so) into APK

When libmakepad.so has NEEDED entries for shared libraries provided by
the NDK sysroot (like libc++_shared.so from C++ dependencies), those
libraries were not being included in the APK, causing runtime dlopen
failures on device.

Add bundle_ndk_shared_deps() which uses the NDK's llvm-readelf to scan
libmakepad.so for NEEDED entries, then copies any matching .so files
from the NDK sysroot base lib dir into the APK. System libraries
(present in the API-level subdirectory) are excluded since they are
provided by the Android OS at runtime.

The detection is general-purpose and not hardcoded to any specific
library name.

* fix: make SYS_GETTID arch-conditional (186 on x86_64, 178 on aarch64)

The constant was hardcoded to 178 (correct for aarch64 but maps to
query_module on x86_64), causing Android's seccomp filter to kill the
process immediately on x86_64 emulators.

* Upgrade Android NDK from r25 to r28, fix x86_64 seccomp crash

cargo_makepad:
- sdk.rs: NDK version 25.2.9519653 → 28.2.13676358, download URLs r25c → r28b
- sdk.rs: Update NDK_IN extract paths for all platforms (Windows, macOS, Linux)
- sdk.rs: macOS NDK extraction is now host-aware (darwin-aarch64 for Apple Silicon)
- compile.rs: MacosAarch64 uses native darwin-aarch64 prebuilt (no more Rosetta)
- compile.rs: ndk_prebuilt_dir() split for MacosX64 vs MacosAarch64

platform:
- libc_sys.rs: Make SYS_GETTID arch-conditional (186 on x86_64, 178 on aarch64)
  Was hardcoded to 178 which maps to query_module on x86_64, causing
  Android seccomp to kill the process on x86_64 emulators
- android.rs: Add pub display field on CxOs, pub make_current() on CxAndroidDisplay
  for Servo embedding support

* Fix GLSL struct constructor crash on Android GLES drivers

The r28 script-based shader backend (shader_glsl.rs) generates GLSL
struct constructor syntax in the vertex/fragment main() unpack code,
e.g.: vb_geom = QuadVertex(vec2(packed_geometry_0.x, ...));

Some GLES drivers (notably Android emulator ANGLE/SwiftShader) reject
this with 'Structure constructor arguments do not match structure
fields', even though it's valid per the GLES 3.0 spec.

This is a regression from r28. The old r25 shader compiler
(generate_glsl.rs) used VarUnpacker::unpack_var which generated direct
swizzle assignments (vb_geom.xy = packed_geometry_0.xy), never struct
constructors in the unpack path. The r25 branch is not affected.

Fix: generate per-sub-field assignments for struct-typed variables in
the main() geometry/instance/varying unpack code, matching the r25
behavior. Struct constructors in user shader function bodies are
unaffected.

* fix(android): Proper fullscreen support on API 30+ and FullscreenWindow/NormalizeWindow ops

Android platform changes:
- Add CxOsOp::FullscreenWindow handler: sets os.fullscreen flag and calls JNI setFullScreen
- Add CxOsOp::NormalizeWindow handler: clears os.fullscreen and exits fullscreen

MakepadActivity.java:
- onCreate: On API 30+, switch from legacy Theme.NoTitleBar.Fullscreen to
  Theme_DeviceDefault_NoActionBar to avoid FLAG_FULLSCREEN conflict
- onCreate: Call setDecorFitsSystemWindows(false) and set
  LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS before setContentView so SurfaceView
  is laid out at y=0 from the start
- Refactor setFullScreen into applyFullScreen with proper WindowInsetsController
  API on API 30+ (hide/show statusBars + navigationBars)
- Legacy path (pre-API 30) uses full immersive sticky flags
- ResizingLayout.onApplyWindowInsets: Return WindowInsets.CONSUMED to prevent
  system bar insets from offsetting child SurfaceView

* Fix Android touch radius DPI scaling and revert aggressive fullscreen inset handling

- Divide touch.radius by dpi_factor alongside touch.abs for correct touch sizing
- Return insets instead of consuming them in ResizingLayout so child views get proper insets
- Remove premature setDecorFitsSystemWindows/cutout mode override; let apps opt in via FullscreenWindow

* Make DrawImage image_scale/image_pan fields pub

Needed by external crates (e.g. servo makepad_shell) that create custom
widgets using DrawImage and need to flip the Y axis for GL render textures.

---------

Co-authored-by: ant <ant@offline.click>
2026-02-21 10:30:56 +01:00
Julián Montes de Oca
41ca84222b Restore video widget (#857) 2026-02-19 16:43:41 +01:00
Admin
539010e57d instance pbr 2026-02-17 08:27:27 +01:00
Admin
99f46c36ba cleanup 2026-02-17 08:04:42 +01:00
Admin
4f187ce1e0 opengl ok 2026-02-16 23:21:59 +01:00
Admin
548506cd9c gltf example! 2026-02-16 15:51:24 +01:00
Admin
8fb6cdff83 vulkan vendoring completed 2026-02-16 09:10:27 +01:00
Admin
11e49f0700 android vulkan otw 2026-02-15 14:18:42 +01:00
Admin
e6bf62d801 headless optimized 2026-02-15 12:31:30 +01:00
Admin
6b0baf9244 headless multithreading 2026-02-15 12:21:22 +01:00
Admin
2f1c1c3045 headless otw 2026-02-15 11:41:33 +01:00
Admin
71bee4562c headless otw 2026-02-15 09:48:28 +01:00
Admin
663c621203 webGL2 2026-02-14 22:07:26 +01:00
Admin
1ee7299f84 linux 2026-02-14 18:07:21 +01:00
Admin
8c8e25c89a x11 working 2026-02-14 16:53:27 +01:00
Admin
22a44a02ee windows runs! 2026-02-14 13:59:45 +01:00
Admin
e04d5289a2 windows runs! 2026-02-14 13:43:44 +01:00
Admin
ac73635921 image search 2026-02-12 21:56:41 +01:00
Admin
81db1516d9 todo app 2026-02-12 19:58:49 +01:00
Admin
8e6702c56b First 2.0 2026-02-12 14:52:33 +01:00