From 2d048be26c5a6dbe2e61290d0bb2611d75c79547 Mon Sep 17 00:00:00 2001 From: siystar Date: Sun, 20 Aug 2023 14:18:30 +0100 Subject: [PATCH] typo fixes --- CMakeLists.txt | 2 +- README.md | 4 ++-- examples/vsgqtmdi/main.cpp | 14 ++++++-------- examples/vsgqtviewer/main.cpp | 14 +++++++------- examples/vsgqtwindows/main.cpp | 15 +++++++-------- include/vsgQt/Viewer.h | 2 +- include/vsgQt/Window.h | 2 +- src/vsgQt/CMakeLists.txt | 6 +++--- src/vsgQt/KeyboardMap.cpp | 2 +- 9 files changed, 29 insertions(+), 32 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index afdcc79..a49e426 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ find_package(vsg 1.0.8) vsg_setup_dir_vars() vsg_setup_build_vars() -find_package(vsgXchange) # only used by exanples +find_package(vsgXchange) # only used by examples # if Qt5 then we need 5.10 or later find_package(${QT_PACKAGE_NAME} COMPONENTS Widgets REQUIRED) diff --git a/README.md b/README.md index 3dd7452..70f6405 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # vsgQt Open Source ([MIT Licensed](LICENSE.md)), cross platform C++ library providing integration of VulkanSceneGraph with Qt windowing. Supports Windows, Linux and macOS. -vsgQt provides full Vulkan support through the VulkanSceneGraph's built in Windows/vkSurface support rather than the limited Vulkan support that Qt-5.10 or later provide. Using the VulkanSceneGraph for providing Vulkan supports avoids the restriction that Qt's VulkanWindow has with not being able to share vkDevice between windows, and provides compatiblity with Qt versions prior to it adding Vulkan support. Sharing vsg::Device/vkDevice between Windows is crucial for providing multiple windows without blowing up GPU memory usage. +vsgQt provides full Vulkan support through the VulkanSceneGraph's built in Window/VkSurface support rather than the limited Vulkan support that Qt-5.10 or later provide. Using the VulkanSceneGraph for providing Vulkan support avoids the restriction that Qt's VulkanWindow has with not being able to share VkDevice between windows, and provides compatibility with Qt versions prior to it adding Vulkan support. Sharing vsg::Device/VkDevice between Windows is crucial for providing multiple windows without blowing up GPU memory usage. ## Checking out vsgQt @@ -28,5 +28,5 @@ make -j 8 ## Examples * [vsgqtviewer](examples/vsgqtviewer/main.cpp) - example of QApplication/QMainWindow usage with single vsgQt::Window. -* [vsgqtmdi](examples/vsgqtmdi/main.cpp) - example of QQMdiArea usage with multiple vsgQt::Window. +* [vsgqtmdi](examples/vsgqtmdi/main.cpp) - example of QMdiArea usage with multiple vsgQt::Window. * [vsgqtwindows](examples/vsgqtwindows/main.cpp) - example of multiple vsgQt::Window. diff --git a/examples/vsgqtmdi/main.cpp b/examples/vsgqtmdi/main.cpp index cc77a3c..cea6d9e 100644 --- a/examples/vsgqtmdi/main.cpp +++ b/examples/vsgqtmdi/main.cpp @@ -9,7 +9,6 @@ #include #include -#include #include @@ -49,7 +48,7 @@ class MultiViewArea : public QMdiArea window->initializeWindow(); - // if first window to be created use it's device for future window creation. + // if this is the first window to be created, use its device for future window creation. if (!traits->device) traits->device = window->windowAdapter->getOrCreateDevice(); // compute the bounds of the scene graph to help position camera @@ -97,7 +96,6 @@ class MultiViewArea : public QMdiArea auto commandGraph = vsg::createCommandGraphForView(*window, camera, vsg_scene); viewer->addRecordAndSubmitTaskAndPresentation({commandGraph}); - //viewer->assignRecordAndSubmitTaskAndPresentation({commandGraph}); views.push_back(ViewWindow{window}); @@ -112,8 +110,8 @@ int main(int argc, char* argv[]) vsg::CommandLine arguments(&argc, argv); - // set up vsg::Options to pass in filepaths and ReaderWriter's and other IO - // realted options to use when reading and writing files. + // set up vsg::Options to pass in filepaths, ReaderWriters and other IO + // related options to use when reading and writing files. auto options = vsg::Options::create(); options->fileCache = vsg::getEnv("VSG_FILE_CACHE"); options->paths = vsg::getEnvPaths("VSG_FILE_PATH"); @@ -132,7 +130,7 @@ int main(int argc, char* argv[]) if (arguments.read({"--fullscreen", "--fs"})) windowTraits->fullscreen = true; bool continuousUpdate = !arguments.read({"--event-driven", "--ed"}); - auto internval = arguments.value(-1, "--interval"); + auto interval = arguments.value(-1, "--interval"); if (arguments.errors()) return arguments.writeErrorMessages(std::cerr); @@ -149,7 +147,7 @@ int main(int argc, char* argv[]) auto vsg_scene = vsg::read_cast(filename, options); if (!vsg_scene) { - std::cout << "Failed to load a valid scenene graph, Please specify a 3d " + std::cout << "Failed to load a valid scene graph. Please specify a valid 3d " "model or image file on the command line." << std::endl; return 1; @@ -175,7 +173,7 @@ int main(int argc, char* argv[]) mdiArea->viewer->compile(); - if (internval >= 0) mdiArea->viewer->setInterval(internval); + if (interval >= 0) mdiArea->viewer->setInterval(interval); mdiArea->viewer->continuousUpdate = continuousUpdate; mainWindow->show(); diff --git a/examples/vsgqtviewer/main.cpp b/examples/vsgqtviewer/main.cpp index 05b2b19..3de035c 100644 --- a/examples/vsgqtviewer/main.cpp +++ b/examples/vsgqtviewer/main.cpp @@ -19,7 +19,7 @@ vsgQt::Window* createWindow(vsg::ref_ptr viewer, vsg::ref_ptrinitializeWindow(); - // if first window to be created use it's device for future window creation. + // if this is the first window to be created, use its device for future window creation. if (!traits->device) traits->device = window->windowAdapter->getOrCreateDevice(); // compute the bounds of the scene graph to help position camera @@ -35,7 +35,7 @@ vsgQt::Window* createWindow(vsg::ref_ptr viewer, vsg::ref_ptr ellipsoidModel(vsg_scene->getObject("EllipsoidModel")); vsg::ref_ptr camera; { -// // set up the camera + // set up the camera auto lookAt = vsg::LookAt::create(centre + vsg::dvec3(0.0, -radius * 3.5, 0.0), centre, vsg::dvec3(0.0, 0.0, 1.0)); vsg::ref_ptr perspective; @@ -77,8 +77,8 @@ int main(int argc, char* argv[]) vsg::CommandLine arguments(&argc, argv); - // set up vsg::Options to pass in filepaths and ReaderWriter's and other IO - // realted options to use when reading and writing files. + // set up vsg::Options to pass in filepaths, ReaderWriters and other IO + // related options to use when reading and writing files. auto options = vsg::Options::create(); options->fileCache = vsg::getEnv("VSG_FILE_CACHE"); options->paths = vsg::getEnvPaths("VSG_FILE_PATH"); @@ -97,7 +97,7 @@ int main(int argc, char* argv[]) if (arguments.read({"--fullscreen", "--fs"})) windowTraits->fullscreen = true; bool continuousUpdate = !arguments.read({"--event-driven", "--ed"}); - auto internval = arguments.value(-1, "--interval"); + auto interval = arguments.value(-1, "--interval"); if (arguments.errors()) return arguments.writeErrorMessages(std::cerr); @@ -114,7 +114,7 @@ int main(int argc, char* argv[]) auto vsg_scene = vsg::read_cast(filename, options); if (!vsg_scene) { - std::cout << "Failed to load a valid scenene graph, Please specify a 3d " + std::cout << "Failed to load a valid scene graph. Please specify a valid 3d " "model or image file on the command line." << std::endl; return 1; @@ -136,7 +136,7 @@ int main(int argc, char* argv[]) mainWindow->show(); - if (internval >= 0) viewer->setInterval(internval); + if (interval >= 0) viewer->setInterval(interval); viewer->continuousUpdate = continuousUpdate; viewer->addEventHandler(vsg::CloseHandler::create(viewer)); diff --git a/examples/vsgqtwindows/main.cpp b/examples/vsgqtwindows/main.cpp index 436d8cd..94a4b84 100644 --- a/examples/vsgqtwindows/main.cpp +++ b/examples/vsgqtwindows/main.cpp @@ -9,7 +9,6 @@ #include #include -#include #include @@ -21,7 +20,7 @@ vsgQt::Window* createWindow(vsg::ref_ptr viewer, vsg::ref_ptrinitializeWindow(); - // if first window to be created use it's device for future window creation. + // if this is the first window to be created, use its device for future window creation. if (!traits->device) traits->device = window->windowAdapter->getOrCreateDevice(); // compute the bounds of the scene graph to help position camera @@ -79,8 +78,8 @@ int main(int argc, char* argv[]) vsg::CommandLine arguments(&argc, argv); - // set up vsg::Options to pass in filepaths and ReaderWriter's and other IO - // realted options to use when reading and writing files. + // set up vsg::Options to pass in filepaths, ReaderWriters and other IO + // related options to use when reading and writing files. auto options = vsg::Options::create(); options->fileCache = vsg::getEnv("VSG_FILE_CACHE"); options->paths = vsg::getEnvPaths("VSG_FILE_PATH"); @@ -99,7 +98,7 @@ int main(int argc, char* argv[]) if (arguments.read({"--fullscreen", "--fs"})) windowTraits->fullscreen = true; bool continuousUpdate = !arguments.read({"--event-driven", "--ed"}); - auto internval = arguments.value(-1, "--interval"); + auto interval = arguments.value(-1, "--interval"); if (arguments.errors()) return arguments.writeErrorMessages(std::cerr); @@ -116,7 +115,7 @@ int main(int argc, char* argv[]) auto vsg_scene = vsg::read_cast(filename, options); if (!vsg_scene) { - std::cout << "Failed to load a valid scenene graph, Please specify a 3d " + std::cout << "Failed to load a valid scene graph. Please specify a valid 3d " "model or image file on the command line." << std::endl; return 1; @@ -127,7 +126,7 @@ int main(int argc, char* argv[]) // create the viewer that will manage all the rendering of the views auto viewer = vsgQt::Viewer::create(); - // add close handler to respond the close window button and pressing escape + // add close handler to respond to the close window button and pressing escape viewer->addEventHandler(vsg::CloseHandler::create(viewer)); // create the windows @@ -144,7 +143,7 @@ int main(int argc, char* argv[]) thirdWindow->setGeometry(1360, 0, 640, 480); thirdWindow->show(); - if (internval >= 0) viewer->setInterval(internval); + if (interval >= 0) viewer->setInterval(interval); viewer->continuousUpdate = continuousUpdate; viewer->compile(); diff --git a/include/vsgQt/Viewer.h b/include/vsgQt/Viewer.h index 41b9c78..7fe3ac9 100644 --- a/include/vsgQt/Viewer.h +++ b/include/vsgQt/Viewer.h @@ -35,7 +35,7 @@ namespace vsgQt std::atomic_uint requests; bool continuousUpdate = true; - /// override pollEvents to prevent the window->pollEvents() being called by vsg::Viewer + /// override pollEvents to prevent the window->pollEvents() from being called by vsg::Viewer bool pollEvents(bool discardPreviousEvents = true) override; /// increment the requests count to signal that a new frame should be rendered on the next timer call. diff --git a/include/vsgQt/Window.h b/include/vsgQt/Window.h index 69c0d19..dd8ccb3 100644 --- a/include/vsgQt/Window.h +++ b/include/vsgQt/Window.h @@ -43,7 +43,7 @@ namespace vsgQt operator vsg::ref_ptr() { return windowAdapter; } - /// Initialize the Vulkan integration using VulkanSceneGraph vkInstance/vkSurface support + /// Initialize the Vulkan integration using VulkanSceneGraph VkInstance/VkSurface support virtual void initializeWindow(); protected: diff --git a/src/vsgQt/CMakeLists.txt b/src/vsgQt/CMakeLists.txt index 533d6b4..e0c3ef1 100644 --- a/src/vsgQt/CMakeLists.txt +++ b/src/vsgQt/CMakeLists.txt @@ -4,7 +4,7 @@ # available arguments: # # pattern for generating macro names (_DECLSPEC) -# and install pathes (include//Export.h) +# and install paths (include//Export.h) # # In public c++ headers the generated file must be included with # @@ -44,8 +44,8 @@ set(HEADERS ../../include/vsgQt/Viewer.h ) -# shared mode is automatically choosed by setting BUILD_SHARED_LIBS=ON -# POSITION_INDEPENDENT_CODE ON is set be default in shared mode +# shared mode is automatically chosen by setting BUILD_SHARED_LIBS=ON +# POSITION_INDEPENDENT_CODE ON is set by default in shared mode add_library(vsgQt ${SOURCES} ${HEADERS}) # add definitions to enable building vsgQt as part of submodule diff --git a/src/vsgQt/KeyboardMap.cpp b/src/vsgQt/KeyboardMap.cpp index d312eac..1750922 100644 --- a/src/vsgQt/KeyboardMap.cpp +++ b/src/vsgQt/KeyboardMap.cpp @@ -135,7 +135,7 @@ KeyboardMap::KeyboardMap() : #endif /* * Auxiliary Functions; note the duplicate definitions for left and right - * function keys; Sun keyboards and a few other manufactures have such + * function keys; Sun keyboards and a few other manufacturers have such * function key groups on the left and/or right sides of the keyboard. * We've not found a keyboard with more than 35 function keys total. */