Skip to content

refactor(bitmap): reshape API — enum class, factory functions, BitmapConvert, .cpp split - #730

Merged
JeanPhilippeKernel merged 2 commits into
developfrom
refactor/bitmap-api
Sep 2, 2026
Merged

refactor(bitmap): reshape API — enum class, factory functions, BitmapConvert, .cpp split#730
JeanPhilippeKernel merged 2 commits into
developfrom
refactor/bitmap-api

Conversation

@JeanPhilippeKernel

Copy link
Copy Markdown
Owner

Reshapes the Bitmap API for clarity and scalability.

Changes

  • BitmapType and BitmapFormat are now enum class (uint8_t backing) — no namespace pollution
  • Depth field renamed to Layers (more accurate: 6 faces for CubeMap, 1 for Texture2D)
  • Overloaded constructors replaced by two named factory functions:
    • Bitmap::Create(w, h, layers, ch, fmt, type, slab) — allocates zeroed buffer
    • Bitmap::FromData(w, h, layers, ch, fmt, type, data, slab) — allocates and copies
  • Conversion algorithms moved to BitmapConvert namespace as free functions:
    • BitmapConvert::EquirectToCross
    • BitmapConvert::CrossToCubemap
  • BitmapPixel struct removed — FaceCoordToXYZ is now a file-local static in Bitmap.cpp
  • Implementation split into Bitmap.cpp — header is declarations only

Call sites updated

  • EnvironmentMapImporter.cpp
  • RenderResourceManager.cpp
  • AssetCodec.cpp
  • bitmap_test.cpp

@JeanPhilippeKernel JeanPhilippeKernel self-assigned this Sep 1, 2026
@JeanPhilippeKernel JeanPhilippeKernel added enhancement New feature or request area-rendering area-linux Work on Linux system area-window Work on Window system area-macOS Work on macOS system labels Sep 1, 2026
@JeanPhilippeKernel JeanPhilippeKernel added this to the Stable Core (1.0.0) milestone Sep 1, 2026
@JeanPhilippeKernel JeanPhilippeKernel moved this to In Progress in ZEngine Board Sep 2, 2026
@JeanPhilippeKernel
JeanPhilippeKernel merged commit 1bc8185 into develop Sep 2, 2026
33 of 34 checks passed
@JeanPhilippeKernel
JeanPhilippeKernel deleted the refactor/bitmap-api branch September 2, 2026 02:04
@github-project-automation github-project-automation Bot moved this from In Progress to Done in ZEngine Board Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-linux Work on Linux system area-macOS Work on macOS system area-rendering area-window Work on Window system enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant