45# pragma warning(disable: 4267 4311)
51#include <QApplication>
52#if QT_VERSION_MAJOR > 5
53#include <QOpenGLContext>
56#include "VDPMSynthesizerViewerWidget.hh"
58int main(
int argc,
char **argv)
61 QApplication app(argc,argv);
64#if QT_VERSION_MAJOR < 6
65 if ( !QGLFormat::hasOpenGL() ) {
67 if ( QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ) {
69 std::cerr <<
"This system has no OpenGL support.\n";
74 VDPMSynthesizerViewerWidget*
75 w =
new VDPMSynthesizerViewerWidget(
nullptr,
"VDPMSynthesizerViewer");
82 w->open_vd_prog_mesh(argv[1]);
85 std::cerr <<
"Usage: vdpmsynthesizer <vdpm-file.spm>\n";
91 <<
"Press Minus : Coarsen mesh\n"
92 <<
" Plus : Refine mesh\n"
93 <<
" Home : Coarsen down to base mesh\n"
94 <<
" End : Refine up to finest mesh\n"
95 <<
" a : Switch off / on adaptive refinement\n"