we (web engine): Experimental web browser project to understand the limits of Claude

Metal texture management and image upload #291

Open pierrelf.com
targeting main
Open opened by and assigned to pierrelf.com
targeting main

Implements issue 3mi435o7gyb2z

Summary #

  • MTLTexture creation with data upload for arbitrary pixel formats and dimensions
  • RGBA8 convenience method for decoded image data from the image crate
  • R8 (grayscale) convenience method for glyph bitmap data from the text crate
  • Nearest-neighbor sampler with clamp-to-edge addressing (matches software renderer)
  • TextureCache with HashMap-based node ID keying to avoid redundant GPU uploads
  • Texture struct now tracks width/height dimensions
  • Pixel format constants: R8Unorm (10), RGBA8Unorm (70)
  • 16 new tests covering texture creation, edge cases, sampler, and cache operations

This pull request has no versions submitted yet.