WhispEngine now runs in a single window and uses the render backend selected in config: DX12 or Vulkan.
- one active renderer selected through
engine/config/app.json - ECS-based scene and object rendering
- scene entities are described in JSON scene assets and config
- resource-driven DX12 mesh rendering with loaded mesh, material, texture, and shader assets
- JSON scene loading plus a runtime JSON scene snapshot
- async mesh/texture/material preloading with placeholder resources while background loads complete
- shader/resource hot-reload polling, scene/app-config hot reload, and binary
*.wmesh/*.wtexcaches - Vulkan still keeps the primitive fallback path
The active renderer is selected in engine/config/app.json with:
"activeRenderer": "dx12"Change it to "vulkan" to switch backend. The config is read on launch, so you do not need to rebuild just to change the renderer.
The ECS layer is located in engine/ecs.
EntityComponentWorldSystemPipeline
TransformComponentTagComponentMeshRendererComponentMaterialComponentVelocityComponentBoundsBounceComponent
MotionSystemBoundsBounceSystemRenderSystem
The ECS demo scene is usually loaded from ecsDemo.sceneFile in engine/config/app.json.
The default scene is engine/assets/scenes/pz3_demo_scene.json.
Each entity can define:
tagmeshPathtexturePathshaderPathmaterialPathcolorvisiblebouncepositionrotationscalelinearVelocityangularVelocity
color is treated as material tint for the entity. The engine writes a runtime
snapshot to assets/scenes/pz3_runtime_snapshot.json in the build output.
WhispEngine now has a small centralized resource path for Practical Work #3:
ResourceManagerlives inengine/resources, is owned byApplication, and provides typedLoad<T>(),LoadAsync<T>(),Get<T>(),Reload<T>(), and fallback caching forMeshResource,TextureResource,ShaderResource, andMaterialResource.MeshLoaderuses Assimp to load CPU mesh data with positions, normals, UVs, indices, and submesh metadata.MeshLoaderalso writes/reads a small Whisp binary CPU mesh cache (*.wmesh) next to the runtime asset after the first import.TextureLoaderusesstb_imagefor common images and a lightweight DDS DXT5 path for the demo texture, normalizing uploads to RGBA8TextureData, and writes/reads binary texture caches (*.wtex).ShaderLoaderloads shader source files; DX12 currently creates the textured shader pipeline from HLSL source.MaterialLoaderreads JSON material files withshaderPath,texturePath, andbaseColor.IRenderAdapterexposes opaque render handles for meshes, textures, and shaders. DX12 implements upload, bind, draw, and destroy for the resource-driven path.MeshRendererComponentowns geometry assignment, whileMaterialComponentowns the material resource reference plus optional per-entity tint and overrides.RenderSystemreceivesResourceManagerby explicit injection, uploads GPU resources once, reuses the handles, and swaps placeholder GPU data to final assets after async completion.ResourceManager::WatchForHotReload()/PollHotReload()reload changed resources, andApplicationhot-reloads JSON scene/config files.RenderSystemtracks resource versions and recreates GPU handles when reloaded CPU resources change.
Resource-driven rendering is implemented for DX12 only. Vulkan still keeps the primitive ECS path.
Example resource-driven entity config:
{
"tag": "AfricanHead_Left",
"meshPath": "models/african_head.obj",
"materialPath": "materials/african_head.material.json",
"color": [1.0, 1.0, 1.0, 1.0],
"position": [-0.6, -0.1, 0.0],
"rotation": [0.0, 2.72, 0.0],
"scale": [0.32, 0.32, 0.32],
"bounce": false
}ENTERinMenuswitches toGameplayESCinGameplayswitches back toMenuSPACEspawns a new ECS entityBACKSPACEdestroys the last ECS entity
- ECS objects are created during application initialization.
- Scene assets can be edited during runtime: JSON scene changes rebuild the ECS demo scene, and shader/resource edits are hot-reloaded without restarting the application.
- Rendering goes through
RenderSystemand the existingRenderAdapter. - DX12 is the full PZ3 resource-driven path; Vulkan remains the primitive fallback backend.