summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 16:25:52 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 16:25:52 +0300
commit83c2180348ae4722157e12facfa9cd70c2c955d0 (patch)
treeeb0780e0c001d6014ab175523ea55cac0dd65a97 /README.md
parent3c39c55676162f83ed2eaf2fee3ec41254abc638 (diff)
Drop the hello draw snippet from the README
The README links to examples/hello.c, so a copy of its draw callback only goes stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 2 insertions, 14 deletions
diff --git a/README.md b/README.md
index d94edb1..a02ba9e 100644
--- a/README.md
+++ b/README.md
@@ -49,20 +49,8 @@ explicit backend with `yasl_display_spec.backend`.
Include `<yasl/app.h>` and pass application callbacks to `yasl_run()`.
The complete [hello.c](examples/hello.c) describes its window in
-`yasl_app_desc.window`, lets the runner quit when it is closed, and fills every pixel
-in its frame callback:
-
-```c
-static void draw(void *ud, struct yasl_surface *surface, struct yasl_frame_context *frame)
-{
- (void)ud;
- size_t count = (size_t)frame->size.x * frame->size.y;
- for (size_t i = 0; i < count; i++)
- frame->cpu.pixels[i] = 0xff306090;
- if (!yasl_frame_present_cpu(frame, NULL, 0))
- yasl_surface_destroy(surface);
-}
-```
+`yasl_app_desc.window`, lets the runner quit when it is closed, and fills every
+pixel with an RGB gradient in its frame callback.
Toplevel creation sizes are logical pixels; drawing and input use device pixels.
Targets are borrowed for one frame callback. Keep durable content in application