How elliahu/hammock works
Hammock is a cross-platform C++23/Vulkan game-engine library. Its primary workflow is an application using the engine to create a window and Vulkan device, load scene assets, prepare GPU resources and graphics pipelines, and render through the engine’s rendering context. The README also documents UI, deferred physically based rendering, volumetric clouds, texture types, and image-based lighting/environment-map generation. The sampled code directly supports resource creation and environment-map generation; several runtime subsystem links are based on the documented capabilities and module boundaries, since their implementations were not sampled.
Main entry points: DeviceStorage.cpp Device storage · Device.cpp Vulkan device · main.cpp Environment map tool · hammock.h Engine API
Components 21
Platform and Vulkan
- Window
src/hammock/platform/Window.cpp - Vulkan instance
src/hammock/core/VulkanInstance.cpp - Vulkan device
src/hammock/core/Device.cpp - Swap chain
src/hammock/core/SwapChain.cpp
Scene and assets
- Camera
src/hammock/scene/Camera.cpp - Geometry
src/hammock/scene/Geometry.cpp - Asset delivery
src/hammock/scene/AssetDelivery.cpp
Rendering
- Render context
src/hammock/core/RenderContext.cpp - Graphics pipeline
src/hammock/core/GraphicsPipeline.cpp - Ray tracing
src/hammock/core/Raytracing.cpp
GPU resources
- Device storage
src/hammock/core/DeviceStorage.cpp - Buffers
src/hammock/resources/Buffer.cpp - Descriptors
src/hammock/resources/Descriptors.cpp - Textures
src/hammock/resources/Texture.cpp
UI and generation
- Map generator
src/hammock/resources/Generator.cpp - UI system
src/hammock/utils/UserInterface.cpp - ImGui Vulkan backend
external/imgui/backends/imgui_impl_vulkan.cpp - Environment map tool
tools/environment_maps_generator/main.cpp
Other components
- Application
- Engine API
include/hammock/hammock.h - Vulkan
Connections 22
- Application → Engine API: uses
- Engine API → Window: exposes
- Engine API → Vulkan device: exposes
- Window → Vulkan instance: uses
- Vulkan device → Vulkan instance: uses
- Vulkan device → Vulkan: calls
- Swap chain → Vulkan: calls
- Render context → Vulkan: records commands
- Graphics pipeline → Vulkan: creates pipeline
- Ray tracing → Vulkan: uses
- Asset delivery → Geometry: delivers assets
- Device storage → Vulkan device: uses
- Device storage → Buffers: creates
- Device storage → Descriptors: builds
- Device storage → Textures: creates
- Map generator → Device storage: creates textures
- Map generator → Graphics pipeline: renders with
- UI system → ImGui Vulkan backend: renders through
- Environment map tool → Window: creates
- Environment map tool → Vulkan device: creates
- Environment map tool → Device storage: creates resources
- Environment map tool → Map generator: generates maps