added an option for choosing between OpenGL/Angle at building time

This commit is contained in:
Luis Ángel San Martín
2015-06-09 19:19:04 +02:00
parent 0461509765
commit ba8892f344
8 changed files with 113 additions and 41 deletions

View File

@ -19,6 +19,7 @@
#include "db_helper.h"
#include "yacreader_libraries.h"
#include "exit_check.h"
#include "opengl_checker.h"
#include "QsLog.h"
#include "QsLogDest.h"
@ -127,12 +128,16 @@ void logSystemAndConfig()
else
QLOG_INFO() << "OpenGL : disabled";
OpenGLChecker checker;
QLOG_INFO() << "OpenGL version : " << checker.textVersionDescription();
QLOG_INFO() << "Libraries: " << DBHelper::getLibraries().getLibraries();
QLOG_INFO() << "--------------------------------------------";
}
int main( int argc, char ** argv )
{
//fix for misplaced text in Qt4.8 and Mavericks
#ifdef Q_OS_MAC
#if QT_VERSION < 0x050000
@ -144,9 +149,13 @@ int main( int argc, char ** argv )
QApplication app( argc, argv );
#ifdef FORCE_ANGLE
app.setAttribute(Qt::AA_UseOpenGLES);
#endif
app.setApplicationName("YACReaderLibrary");
app.setOrganizationName("YACReader");
qApp->setAttribute(Qt::AA_UseHighDpiPixmaps);
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
//simple command line parser
//will be replaced by QCommandLineParser in the future
//TODO: --headless, --server=[on|off], support for file and directory arguments
@ -212,7 +221,6 @@ int main( int argc, char ** argv )
if(settings->value(SERVER_ON,true).toBool())
{
s->start();
}
#endif