Skip to content

win32 tool to generate shadercache - #1785

Draft
CedricGuillemet wants to merge 2 commits into
BabylonJS:masterfrom
CedricGuillemet:shaderCompilerGL
Draft

win32 tool to generate shadercache#1785
CedricGuillemet wants to merge 2 commits into
BabylonJS:masterfrom
CedricGuillemet:shaderCompilerGL

Conversation

@CedricGuillemet

@CedricGuillemet CedricGuillemet commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

I need this tool for a PoC. I'm wondering if it should be an independent tool instead (with Apple/Linux build) and NPM publishing.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Win32 headless OpenGL/ANGLE app (ShaderCacheGenerator) to render a Babylon.js scene until shaders finish compiling, then persist the resulting ShaderCache to a file for reuse (e.g., GLES cache compatibility scenarios).

Changes:

  • Introduces ShaderCacheGenerator executable that hosts a scene via Babylon::Embedding::Runtime/View, renders frames, and saves the shader cache.
  • Adds build + usage documentation for the new tool.
  • Wires the new app into the Apps CMake build under appropriate Win32/OpenGL + plugin/compiler feature gates.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
Apps/ShaderCacheGenerator/Source/Main.cpp Implements the headless Win32 window + Embedding View render loop, readiness heuristic, and shader-cache persistence.
Apps/ShaderCacheGenerator/README.md Documents purpose, usage, build, and “scene ready” heuristic.
Apps/ShaderCacheGenerator/CMakeLists.txt Adds the new executable target, links required libraries, and copies runtime/ANGLE DLLs post-build.
Apps/CMakeLists.txt Conditionally includes the ShaderCacheGenerator subdirectory for supported Win32/OpenGL configurations.

Comment thread Apps/ShaderCacheGenerator/Source/Main.cpp Outdated
Comment thread Apps/ShaderCacheGenerator/Source/Main.cpp
Comment thread Apps/ShaderCacheGenerator/CMakeLists.txt
@CedricGuillemet
CedricGuillemet marked this pull request as draft July 22, 2026 14:01
@CedricGuillemet CedricGuillemet changed the title win32 tool to generate opengl shadercache win32 tool to generate shadercache Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants