mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027899: Visualization, Ray Tracing - Provide ability to rebuild GLSL shaders on the fly
For debugging and performance analysis it is reasonable to provide the ability to rebuild ray tracing shaders on the fly. In this way, it will be possible to analyze the impact of different shaders modifications without re-launching and re-configuring the scene. This functionality can be used in the following way: > vrenderparams -rebuild
This commit is contained in:
@@ -8522,6 +8522,23 @@ static Standard_Integer VRenderParams (Draw_Interpretor& theDI,
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (aFlag == "-rebuildglsl"
|
||||
|| aFlag == "-rebuild")
|
||||
{
|
||||
if (toPrint)
|
||||
{
|
||||
theDI << (aParams.RebuildRayTracingShaders ? "on" : "off") << " ";
|
||||
continue;
|
||||
}
|
||||
|
||||
Standard_Boolean toEnable = Standard_True;
|
||||
if (++anArgIter < theArgNb
|
||||
&& !ViewerTest::ParseOnOff (theArgVec[anArgIter], toEnable))
|
||||
{
|
||||
--anArgIter;
|
||||
}
|
||||
aParams.RebuildRayTracingShaders = toEnable;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Error: wrong syntax, unknown flag '" << anArg << "'\n";
|
||||
@@ -9663,6 +9680,7 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands)
|
||||
"\n '-env on|off' Enables/disables environment map background"
|
||||
"\n '-iss on|off' Enables/disables adaptive screen sampling (PT mode)"
|
||||
"\n '-issd on|off' Shows screen sampling distribution in ISS mode"
|
||||
"\n '-rebuildGlsl on|off' Rebuild Ray-Tracing GLSL programs (for debugging)"
|
||||
"\n '-shadingModel model' Controls shading model from enumeration"
|
||||
"\n color, flat, gouraud, phong"
|
||||
"\n '-resolution value' Sets a new pixels density (PPI), defines scaling factor for parameters like text size"
|
||||
|
Reference in New Issue
Block a user