Skip to content

Commit badd038

Browse files
committed
Added --log-level <level> and --sync command line options to help with debugging.
1 parent 218b45b commit badd038

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

examples/app/vsgviewer/vsgviewer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ int main(int argc, char** argv)
106106
arguments.read("--screen", windowTraits->screenNum);
107107
arguments.read("--display", windowTraits->display);
108108
arguments.read("--samples", windowTraits->samples);
109+
if (int log_level = 0; arguments.read("--log-level", log_level)) vsg::Logger::instance()->level = vsg::Logger::Level(log_level);
109110
auto numFrames = arguments.value(-1, "-f");
110111
auto pathFilename = arguments.value<vsg::Path>("", "-p");
111112
auto loadLevels = arguments.value(0, "--load-levels");
@@ -120,8 +121,6 @@ int main(int argc, char** argv)
120121
windowTraits->deviceExtensionNames.push_back(VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME);
121122
}
122123

123-
if (int log_level = 0; arguments.read("--log-level", log_level)) vsg::Logger::instance()->level = vsg::Logger::Level(log_level);
124-
125124
vsg::ref_ptr<vsg::Instrumentation> instrumentation;
126125
if (arguments.read({"--gpu-annotation", "--ga"}) && vsg::isExtensionSupported(VK_EXT_DEBUG_UTILS_EXTENSION_NAME))
127126
{

examples/nodes/vsgpagedlod/vsgpagedlod.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ int main(int argc, char** argv)
3535
windowTraits->windowTitle = "vsgpagedlod";
3636
windowTraits->debugLayer = arguments.read({"--debug", "-d"});
3737
windowTraits->apiDumpLayer = arguments.read({"--api", "-a"});
38+
windowTraits->synchronizationLayer = arguments.read("--sync");
3839
if (arguments.read("--IMMEDIATE")) windowTraits->swapchainPreferences.presentMode = VK_PRESENT_MODE_IMMEDIATE_KHR;
3940
if (arguments.read({"--fullscreen", "--fs"})) windowTraits->fullscreen = true;
4041
if (arguments.read({"--window", "-w"}, windowTraits->width, windowTraits->height)) { windowTraits->fullscreen = false; }
4142
arguments.read("--screen", windowTraits->screenNum);
4243
arguments.read("--display", windowTraits->display);
4344
arguments.read("--samples", windowTraits->samples);
45+
if (int log_level = 0; arguments.read("--log-level", log_level)) vsg::Logger::instance()->level = vsg::Logger::Level(log_level);
4446
auto outputFilename = arguments.value<vsg::Path>("", "-o");
4547
auto numFrames = arguments.value(-1, "-f");
4648
auto pathFilename = arguments.value<vsg::Path>("", "-p");
@@ -49,6 +51,7 @@ int main(int argc, char** argv)
4951
auto horizonMountainHeight = arguments.value(0.0, "--hmh");
5052
bool useEllipsoidPerspective = !arguments.read({"--disble-EllipsoidPerspective", "--dep"});
5153
if (arguments.read("--rgb")) options->mapRGBtoRGBAHint = false;
54+
5255
arguments.read("--file-cache", options->fileCache);
5356
bool osgEarthStyleMouseButtons = arguments.read({"--osgearth", "-e"});
5457

examples/nodes/vsgtiledatabase/vsgtiledatabase.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ int main(int argc, char** argv)
2626
windowTraits->windowTitle = "vsgtiledatabase";
2727
windowTraits->debugLayer = arguments.read({"--debug", "-d"});
2828
windowTraits->apiDumpLayer = arguments.read({"--api", "-a"});
29+
windowTraits->synchronizationLayer = arguments.read("--sync");
2930
if (arguments.read("--IMMEDIATE")) windowTraits->swapchainPreferences.presentMode = VK_PRESENT_MODE_IMMEDIATE_KHR;
3031
if (arguments.read({"--fullscreen", "--fs"})) windowTraits->fullscreen = true;
3132
if (arguments.read({"--window", "-w"}, windowTraits->width, windowTraits->height)) { windowTraits->fullscreen = false; }
3233
arguments.read("--screen", windowTraits->screenNum);
3334
arguments.read("--display", windowTraits->display);
3435
arguments.read("--samples", windowTraits->samples);
36+
if (int log_level = 0; arguments.read("--log-level", log_level)) vsg::Logger::instance()->level = vsg::Logger::Level(log_level);
3537
auto outputFilename = arguments.value<vsg::Path>("", "-o");
3638
auto numFrames = arguments.value(-1, "-f");
3739
auto pathFilename = arguments.value<vsg::Path>("", "-p");

0 commit comments

Comments
 (0)