matdbg: opt-in via environment variable.
This commit is contained in:
@@ -10,8 +10,9 @@ A new header is inserted each time a *tag* is created.
|
||||
- gltfio: Fixed several limitations with ubershader mode.
|
||||
- gltfio: Fixed a transforms issue with non-uniform scale.
|
||||
- webgl: Fixed an issue with JPEG textures.
|
||||
- Windows: fix link error in debug builds.
|
||||
- The web-based material inspector now allows editing GLSL and MSL code.
|
||||
- Windows: Fix link error in debug builds.
|
||||
- matdbg: Web server must now be enabled with an environment variable.
|
||||
- matdbg: Added support for editing GLSL and MSL code.
|
||||
|
||||
## v1.3.2
|
||||
|
||||
|
||||
@@ -401,9 +401,10 @@ int FEngine::loop() {
|
||||
}
|
||||
|
||||
#if FILAMENT_ENABLE_MATDBG
|
||||
// Disable the web server for regression tests that occur in hermetic environments.
|
||||
if (mBackend != backend::Backend::NOOP) {
|
||||
debug.server = new matdbg::DebugServer(mBackend, 8080);
|
||||
const char* portString = getenv("FILAMENT_MATDBG_PORT");
|
||||
if (portString != nullptr) {
|
||||
const int port = atoi(portString);
|
||||
debug.server = new matdbg::DebugServer(mBackend, port);
|
||||
|
||||
// Sometimes the server can fail to spin up (e.g. if the above port is already in use).
|
||||
// When this occurs, carry onward, developers can look at civetweb.txt for details.
|
||||
|
||||
@@ -12,7 +12,11 @@
|
||||
|
||||
## User Instructions
|
||||
|
||||
Simply launch any app that links against a debug build of a Filament, and point your web browser to
|
||||
First set an environment variable as follows. In Windows, use `set` instead of `export`.
|
||||
|
||||
export FILAMENT_MATDBG_PORT=8080
|
||||
|
||||
Next, launch any app that links against a debug build of a Filament and point your web browser to
|
||||
http://localhost:8080.
|
||||
|
||||
After selecting a material and shader variant, you can view the GLSL, MSL, and SPIR-V code that was
|
||||
@@ -167,8 +171,6 @@ they appear in the package, where each API (GL / VK / Metal) has its own list.
|
||||
|
||||
## Wish List
|
||||
|
||||
- Allow disabling the server at run time when using a build that has FILAMENT_ENABLE_MATDBG.
|
||||
- Maybe this can be an environment variable (extern char \*\*environ) that also controls the port number.
|
||||
- Allow SPIR-V edits.
|
||||
- Allow viewing GLSL transpiled from SPIR-V.
|
||||
- Also stop piggybacking on `type=glsl` for Metal Shading Language.
|
||||
|
||||
Reference in New Issue
Block a user