make the collapse window button work! now you can collapse and uncollapse windows and while they’re collapsed, their content won’t be rendered or comptued.
un-regresses cross-compilation to windows and building to android. well mostly, the android build just displays a blank screen. but it does compile.
starting on a web build. it compiles, but there’s no runner yet.
new build.zig functions for setting up an application with support for desktop, android, and web. this is interesting because web applications are a few files, not just a Compile step, and they can’t have a main loop. so something has to be done for the build.
adds ci coverage for: succesfully building & testing on linux, succesfully cross-compile building to windows (but not testing), building to web, building to android
add a util module in anywhere that has “extra stdlib functions” - functions that are useful in any module
tried to auto generate documentation but ci didn’t like it.
add a bouncy ball! it is added as an “overlay window” that is always in front of all the other windows and has no window chrome.
there is a red ball. i click and drag it to throw it around the screen. it bounces off the walls.
update blockeditor to use the new split github repos for zig-gamedev. this makes a first build of blockeditor significantly faster because it does not have to fetch a large repo full of unneeded components. also, blockeditor no longer needs to patch zig-gamedev to hack in build.zig support.
update zine (this website uses it), the new version puts width and height attributes on images so they don’t resize while loading.
update the zig version and use the self-hosted x86 backend when possible for the blockeditor test exe‽ the blockeditor benchmark runs about 3.5x slower using the self-hosted x86 backend in a debug build vs an llvm debug build.
update repositionable draw list’s ‘place’ fn to accept an options struct rather than an offset. this is to prepare for in the future having different place flags, like disabling events, applying a matrix transformation, or clipping a child rdl.
add an initial replace_whole_file operation to editor core, intended to be used if the file was updated on disk or an autoformatter was executed. it uses diffz. it’s not really useful yet because it doesn’t keep an older state of the document - the document might have edits which have not been saved to disk yet, but replace_whole_file runs on the latest version of the document.
notes on ids. currently, these are pretty expensive. we can make them into linked lists instead of continuous arrays and probably get a performance boost. and lose that by requiring them all to be looked up in hashmaps at every level.
begins on the new mouse_event_2 system which handles events between frames rather than using complicated ikeys. it has its own problems (haven’t figured out invalidation yet + it’s really annoying) but should be better maybe? it doesn’t play nice with the old mouse event system (clicks fall through, can have two click focuses at once) but those will be converted to the new system eventually and the old one removed.
fix in the file tree if you open folder A and open B inside of it, then close and reopen A. before, B would be closed, but now B stays open.
I’m not sure what the right way to implement them is but this uses the fragment shader and some extra vertex information + fwidth() to determine how far to antialias. It’s in the main shader so it adds extra cost to every vertex, not just the rounded ones.
More preperation for supporting docking windows in the window manager.
reimplement the file listing tree and make it support opening folders and files. opening a large file freezes the application, probably because it’s trying to render a huge amount in a single line?
add tracyEmitFrameImage binding but don’t use it yet, I’m not sure how to get the image texture being rendered to in order to try to use mapAsync.
switch tracy to use cImport in case stuff changes so it will be caught in an update
try to update tracy. it builds, but crashes with SIGSEGV
switch beui2 wm to provide the window chrome at the cost of no longer being theme independent. we will get it back eventually but for now it’s more important to get windows implemented with one standard theme while we figure it out.
mock up of potential window designs. render_list doesn’t support rounding yet so we’ll implement the second one with no rounding for now and add rounding later.
first mockup of a potential beui2 window design
second mockup of a potential beui2 window design. we’ll implement this, but with rounded corners coming later.
finish migration of text editor to virtual scroller
add draw list state to beui2. it keeps around data for one frame associated with an id so you can access it again. it also tells you the position you were on screen last frame.
remake text selection to be frame-perfect. the first frame we know about the inputs is the one where we visibly show selected text.
add initial draggable and resizable windows to beui2. on linux the corner resize cursors don’t show which is really confusing.
add vscode run configurations to build and launch the app into a debugger or run with tracy.
convert all of beui2 to use floats, it gets us better prepared for non integer scaling maybe. or maybe it doesn’t and we’ll switch it all back to ints.
attempt to update tracy, but their new cmake fetches dear imgui from source and applies some patches and that will take some effort to replicate in build.zig. or we could have build.zig run cmake. cmake is self-hosted unfortunately.
screenshot of a beui2 window. there’s no clipping or wrapping yet so the text is escaping its bounds, and the windows are unstyled.
not ready to implement markdown yet - we’ll wait until beui text rendering and then do manual queries in Core rather than having it be its own module
fix undoing every item at the end of the core test not working right
change TextStack to no longer require ending items
make undo preserve cursor position
batch undos for text insert operations and delete operations
automatically connect tracy when running with -Dtracy
start on the real plan for beui_experiment. this will work. and it will be soo nice. well not that nice, it’s a bit ugly and verbose. but maybe we’ll port it to qxc eventually and there it will be nice, and here it will be acceptable. it will still be so nice once text editor rendering is literally a generic virtualized list render with nothing special about it.
Create tracy package that builds tracy client and profiler with bindings
Create anywhere package that allows calling tracy methods from packages that don’t depend on tracy. They do nothing unless the root module defines anywhere_cfg containing tracy.
Add tracy traces to many functions and to allocator
Support building editor from root folder with -Dtracy which will link tracy client lib, compile tracy exe, and spawn both the editor and tracy.
Cache harfbuzz runs, speed up draw list appends, speed up (~10x) finding character syntax highlighting scope
Create idiomatic zig bindings for the portion of tree sitter we use and update to use them everywhere
Add zgui to anywhere and use this to create an inspector UI to show the current tree sitter nodes under the cursor
Add more search paths for verdana.ttf. We can’t really use fontconfig, it’s a horrible library to build.
Fix syntax highlighting not supporting //! comments and not marking the character immediately after the slashes as a comment
Add sheen_bidi package that builds sheen_bidi, exports translate-c bindings, and has a test of example usage
Load truetype font, lay out glyphs with harfbuzz, render glyphs to texture, load and update texture in gpu, switch text rendering to truetype+harfbuzz, add theme constant for cursor style, render selection and cursor again with new text, support cursor positions partway through bytes in rendering
Remove the rainbow translucency test squares
Switch from using a magic number to disable texture sampling to using any uv coordinate outside of 0.0…1.1