diff --git a/README.rst b/README.rst index b5fc1f34..3c163220 100644 --- a/README.rst +++ b/README.rst @@ -87,6 +87,7 @@ Various things which would be nice to do, in no particular order * Threaded rendering for better responsiveness * Autotune simplification quality based on total points * Approximate ambient occlusion (?) + * Fix GLSL deprecation warnings for builtin variables * GUI diff --git a/config.h.in.cmake b/config.h.in.cmake index 86ab2b19..e9df21ce 100644 --- a/config.h.in.cmake +++ b/config.h.in.cmake @@ -1 +1,2 @@ +#define DISPLAZ_VERSION_STRING "0.1" #define DISPLAZ_SHADER_BASE_PATH "@DISPLAZ_SHADER_BASE_PATH@" diff --git a/main.cpp b/main.cpp index 99e3bb4f..362f626b 100644 --- a/main.cpp +++ b/main.cpp @@ -35,6 +35,7 @@ #include #include "argparse.h" +#include "config.h" QStringList g_initialFileNames; @@ -51,13 +52,17 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); ArgParse::ArgParse ap; + bool printVersion = false; + bool printHelp = false; int maxPointCount = 200000000; ap.options( "displaz - view a LAS point cloud\n" - "Usage: displaz [opts] file1.las [file2.las ...]", + "Usage: displaz [opts] [file1.las ...]", "%*", storeFileName, "", - "-maxpoints %d", &maxPointCount, "Maximum number of points to load at a time", + "--maxpoints %d", &maxPointCount, "Maximum number of points to load at a time", + "--version", &printVersion, "Print version number", + "--help", &printHelp, "Print command line usage help", NULL ); @@ -68,6 +73,17 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } + if (printVersion) + { + std::cout << "version " DISPLAZ_VERSION_STRING "\n"; + return EXIT_SUCCESS; + } + if (printHelp) + { + ap.usage(); + return EXIT_SUCCESS; + } + // Turn on multisampled antialiasing - this makes rendered point clouds // look much nicer. QGLFormat f = QGLFormat::defaultFormat(); diff --git a/mainwindow.cpp b/mainwindow.cpp index 83e3f408..154967e9 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -316,7 +316,10 @@ void PointViewerMainWindow::helpDialog() void PointViewerMainWindow::aboutDialog() { - QString message = tr("Displaz - a qt-based las viewer\nversion 0.0.1"); + QString message = tr( + "

Displaz - a LiDAR viewer for geographic data

" + "

version " DISPLAZ_VERSION_STRING "

" + ); QMessageBox::information(this, tr("About displaz"), message); }