Skip to content

Commit

Permalink
typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
siystar authored and robertosfield committed Aug 20, 2023
1 parent c68b38a commit 2d048be
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 32 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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.
14 changes: 6 additions & 8 deletions examples/vsgqtmdi/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <QtWidgets/QMdiArea>

#include <vsgQt/Window.h>
#include <iostream>

#include <iostream>

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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});

Expand All @@ -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");
Expand All @@ -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<int>(-1, "--interval");
auto interval = arguments.value<int>(-1, "--interval");

if (arguments.errors())
return arguments.writeErrorMessages(std::cerr);
Expand All @@ -149,7 +147,7 @@ int main(int argc, char* argv[])
auto vsg_scene = vsg::read_cast<vsg::Node>(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;
Expand All @@ -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();
Expand Down
14 changes: 7 additions & 7 deletions examples/vsgqtviewer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ vsgQt::Window* createWindow(vsg::ref_ptr<vsgQt::Viewer> viewer, vsg::ref_ptr<vsg

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
Expand All @@ -35,7 +35,7 @@ vsgQt::Window* createWindow(vsg::ref_ptr<vsgQt::Viewer> viewer, vsg::ref_ptr<vsg
vsg::ref_ptr<vsg::EllipsoidModel> ellipsoidModel(vsg_scene->getObject<vsg::EllipsoidModel>("EllipsoidModel"));
vsg::ref_ptr<vsg::Camera> 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<vsg::ProjectionMatrix> perspective;
Expand Down Expand Up @@ -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");
Expand All @@ -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<int>(-1, "--interval");
auto interval = arguments.value<int>(-1, "--interval");

if (arguments.errors())
return arguments.writeErrorMessages(std::cerr);
Expand All @@ -114,7 +114,7 @@ int main(int argc, char* argv[])
auto vsg_scene = vsg::read_cast<vsg::Node>(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;
Expand All @@ -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));
Expand Down
15 changes: 7 additions & 8 deletions examples/vsgqtwindows/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <QtWidgets/QMdiArea>

#include <vsgQt/Window.h>
#include <iostream>

#include <iostream>

Expand All @@ -21,7 +20,7 @@ vsgQt::Window* createWindow(vsg::ref_ptr<vsgQt::Viewer> viewer, vsg::ref_ptr<vsg

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
Expand Down Expand Up @@ -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");
Expand All @@ -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<int>(-1, "--interval");
auto interval = arguments.value<int>(-1, "--interval");

if (arguments.errors())
return arguments.writeErrorMessages(std::cerr);
Expand All @@ -116,7 +115,7 @@ int main(int argc, char* argv[])
auto vsg_scene = vsg::read_cast<vsg::Node>(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;
Expand All @@ -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
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion include/vsgQt/Viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/vsgQt/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace vsgQt

operator vsg::ref_ptr<vsg::Window>() { return windowAdapter; }

/// Initialize the Vulkan integration using VulkanSceneGraph vkInstance/vkSurface support
/// Initialize the Vulkan integration using VulkanSceneGraph VkInstance/VkSurface support
virtual void initializeWindow();

protected:
Expand Down
6 changes: 3 additions & 3 deletions src/vsgQt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# available arguments:
#
# <target> pattern for generating macro names (<target>_DECLSPEC)
# and install pathes (include/<target>/Export.h)
# and install paths (include/<target>/Export.h)
#
# In public c++ headers the generated file must be included with
#
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/vsgQt/KeyboardMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 2d048be

Please sign in to comment.