option to disable anti aliasing in gui
This commit is contained in:
parent
0d1c7118e3
commit
9b8d3b7546
@ -107,6 +107,7 @@ po::options_description CommandHandler::getGeneralOptions()
|
|||||||
general.add_options()("force,f", "keep running after errors");
|
general.add_options()("force,f", "keep running after errors");
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
general.add_options()("gui", "start gui");
|
general.add_options()("gui", "start gui");
|
||||||
|
general.add_options()("gui-no-aa", "disable anti aliasing");
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_PYTHON
|
#ifndef NO_PYTHON
|
||||||
general.add_options()("run", po::value<std::vector<std::string>>(),
|
general.add_options()("run", po::value<std::vector<std::string>>(),
|
||||||
@ -235,7 +236,7 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx)
|
|||||||
|
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
if (vm.count("gui")) {
|
if (vm.count("gui")) {
|
||||||
Application a(argc, argv);
|
Application a(argc, argv, (vm.count("gui-no-aa") > 0));
|
||||||
MainWindow w(std::move(ctx), chipArgs);
|
MainWindow w(std::move(ctx), chipArgs);
|
||||||
try {
|
try {
|
||||||
if (vm.count("json")) {
|
if (vm.count("json")) {
|
||||||
|
@ -39,9 +39,10 @@ BOOL WINAPI WinHandler(DWORD dwCtrlType)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Application::Application(int &argc, char **argv) : QApplication(argc, argv)
|
Application::Application(int &argc, char **argv, bool noantialiasing) : QApplication(argc, argv)
|
||||||
{
|
{
|
||||||
QSurfaceFormat fmt;
|
QSurfaceFormat fmt;
|
||||||
|
if (!noantialiasing)
|
||||||
fmt.setSamples(10);
|
fmt.setSamples(10);
|
||||||
fmt.setProfile(QSurfaceFormat::CoreProfile);
|
fmt.setProfile(QSurfaceFormat::CoreProfile);
|
||||||
// macOS is very picky about this version matching
|
// macOS is very picky about this version matching
|
||||||
|
@ -29,7 +29,7 @@ NEXTPNR_NAMESPACE_BEGIN
|
|||||||
class Application : public QApplication
|
class Application : public QApplication
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Application(int &argc, char **argv);
|
Application(int &argc, char **argv, bool noantialiasing);
|
||||||
bool notify(QObject *receiver, QEvent *event);
|
bool notify(QObject *receiver, QEvent *event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user