diff --git a/draw/draw_qr/draw_qr.odin b/draw/draw_qr/draw_qr.odin index e5b1d84..3567092 100644 --- a/draw/draw_qr/draw_qr.odin +++ b/draw/draw_qr/draw_qr.odin @@ -3,10 +3,6 @@ package draw_qr import draw ".." import "../../qrcode" -// ----------------------------------------------------------------------------- -// Layer 1 — pure: encoded QR buffer → RGBA pixels + descriptor -// ----------------------------------------------------------------------------- - // Returns the number of bytes to_texture will write for the given encoded // QR buffer. Equivalent to size*size*4 where size = qrcode.get_size(qrcode_buf). texture_size :: #force_inline proc(qrcode_buf: []u8) -> int { @@ -59,10 +55,6 @@ to_texture :: proc( true } -// ----------------------------------------------------------------------------- -// Layer 2 — raw: pre-encoded QR buffer → registered GPU texture -// ----------------------------------------------------------------------------- - // Allocates pixel buffer via temp_allocator, decodes qrcode_buf into it, and // registers with the GPU. The pixel allocation is freed before return. // @@ -91,10 +83,6 @@ register_texture_from_raw :: proc( return draw.register_texture(desc, pixels) } -// ----------------------------------------------------------------------------- -// Layer 3 — text → registered GPU texture -// ----------------------------------------------------------------------------- - // Encodes text as a QR Code and registers the result as an RGBA texture. // // Returns ok=false when: @@ -134,10 +122,6 @@ register_texture_from_text :: proc( return register_texture_from_raw(qrcode_buf, dark, light, temp_allocator) } -// ----------------------------------------------------------------------------- -// Layer 4 — binary → registered GPU texture -// ----------------------------------------------------------------------------- - // Encodes arbitrary binary data as a QR Code and registers the result as an RGBA texture. // // Returns ok=false when: @@ -177,10 +161,6 @@ register_texture_from_binary :: proc( return register_texture_from_raw(qrcode_buf, dark, light, temp_allocator) } -// ----------------------------------------------------------------------------- -// Clay integration helper -// ----------------------------------------------------------------------------- - // Default fit=.Fit preserves the QR's square aspect; override as needed. clay_image :: #force_inline proc( texture: draw.Texture_Id,