Files
kryon/tests/scene_gpu_padding.zi
T
waozi 7baf863221 Commit pending scene, input, export and asset work
- GPU scene renderer: moved, turned or scaled nodes re-send only their own
  triangles instead of rebuilding the scene; per-node matrices are reused;
  FreezeGeometry skips geometry comparisons; lights carry projected
  textures (LightCookie) in the CPU and GLES renderers.
- One ordered per-session key and text delivery path across Desktop,
  Canvas and Raylib.
- Context-menu rows show accelerator labels and checked state.
- Bundle apps keep extracted assets that already match instead of
  rewriting and syncing all of them on every open.
- Image and PDF export modules, hosted box tests, brand assets, plans,
  and the ZX changelog entry.
2026-11-14 16:27:22 -03:00

31 lines
1.2 KiB
Ziran

// Change only representation padding, leaving every public material field
// identical. Padding is unspecified across native call/compilation contexts.
#import "kryon/scene"
MaterialFillPadding :: (material: *SceneMaterial,pattern: u8) {
saved:=material[0]
bytes:=cast(*u8)material
for at:0..cast(s64)size_of(SceneMaterial)-1 {bytes[at]=pattern}
material.kind=saved.kind
material.color=saved.color
material.roughness=saved.roughness
material.metalness=saved.metalness
material.glow=saved.glow
material.glow_strength=saved.glow_strength
material.opacity=saved.opacity
material.transparent=saved.transparent
material.double_sided=saved.double_sided
material.flat=saved.flat
material.vertex_colors=saved.vertex_colors
material.texture=saved.texture
material.texture_projection=saved.texture_projection
material.texture_filter=saved.texture_filter
material.texture_wrap=saved.texture_wrap
material.texture_scale=saved.texture_scale
material.texture_offset=saved.texture_offset
material.alpha_test=saved.alpha_test
material.exact_color=saved.exact_color
material.shader=saved.shader
material.shader_uniforms=saved.shader_uniforms
material.shader_samplers=saved.shader_samplers
}