feat: add image/texture infrastructure for visualization#4
Open
mtao wants to merge 2 commits intofeature/meshdata-quiver-refactorfrom
Open
feat: add image/texture infrastructure for visualization#4mtao wants to merge 2 commits intofeature/meshdata-quiver-refactorfrom
mtao wants to merge 2 commits intofeature/meshdata-quiver-refactorfrom
Conversation
Add VulkanTexture (RAII GPU texture with full/partial upload), ImageData (CPU pixel buffer scene graph feature with dirty tracking), ImagePipelineManager (descriptor sets, UBOs, fullscreen triangle pipeline), VulkanImageDrawable (per-frame sync from ImageData to GPU texture), ImageScene (orthographic 2D viewer with pan/zoom/fit-to-window), image shaders (fullscreen triangle + HDR tone mapping fragment shader), ImGui image controls panel (exposure/gamma/channel/zoom/pan), PPM I/O (P6 binary reader/writer, RGB->RGBA expansion), image_viewer_glfw standalone tool (CLI11, scroll-zoom, middle-drag pan), and unit tests for ImageData and PPM I/O (15 new test cases). This lays the foundation for ART ray tracer live preview and the MultiscreenManga comic reader port.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
image_viewer_glfwtool with scroll-zoom and middle-drag panNew Files (21 files, ~3000 LOC)
Headers
visualization/include/balsa/visualization/vulkan/texture.hpp— VulkanTexture RAII wrappervisualization/include/balsa/scene_graph/ImageData.hpp— CPU pixel buffer feature (RGBA8/RGBAF32, dirty tracking)visualization/include/balsa/visualization/vulkan/image_pipeline.hpp— Pipeline manager + UBO structsvisualization/include/balsa/visualization/vulkan/vulkan_image_drawable.hpp— Per-frame GPU sync drawablevisualization/include/balsa/visualization/vulkan/image_scene.hpp— Orthographic 2D image scenevisualization/include/balsa/visualization/vulkan/imgui/image_controls_panel.hpp— ImGui controlsvisualization/include/balsa/visualization/image_io.hpp— PPM I/O declarationsImplementations
visualization/src/vulkan/texture.cpp— Full VulkanTexture (create, upload, update_region, layout transitions)visualization/src/scene_graph/ImageData.cpp— Pixel buffer management with dirty region mergingvisualization/src/vulkan/image_pipeline.cpp— Descriptor layout, pool, pipeline creation, shader compilationvisualization/src/vulkan/vulkan_image_drawable.cpp— Version-tracked sync, partial texture updatesvisualization/src/vulkan/image_scene.cpp— Scene lifecycle, orthographic projection, pan/zoomvisualization/src/vulkan/imgui/image_controls_panel.cpp— Exposure/gamma/channel/zoom/pan controlsvisualization/src/image_io.cpp— PPM P6 reader/writer (RGB→RGBA expansion)Shaders
visualization/resources/glsl/image.vert— Fullscreen triangle via gl_VertexIndexvisualization/resources/glsl/image.frag— HDR tone mapping + channel isolationTools
visualization/tools/image_viewer_glfw.cpp— Standalone viewer with CLI11, ImGui overlayTests
test_scene_graph.cppcovering ImageData (creation, RGBA8/RGBAF32 pixels, version tracking, partial updates, dirty region merging, display parameters, error cases) and PPM I/O (round-trip, error handling)Motivation
This lays the foundation for:
Testing
All 8 balsa test suites pass (44 scene_graph test cases, 312 assertions total).