Forums

OverviewV-Play 2 Support (Qt 5)Antialiasing › Reply To: Antialiasing

OverviewV-Play 2 Support (Qt 5)Antialiasing › Reply To: Antialiasing
#9745

Tobias

Ok, maybe it was obvious but now I’ve found the solution to turn on msaa (multisampling) which brings you a slightly better result than the default vertex antialiasing.

QQmlApplicationEngine engine; // something like this should already be in your code
vplay.initialize(&engine); // something like this should already be in your code
vplay.setMainQmlFileName(QStringLiteral("qml/Main.qml")); // something like this should already be in your code
engine.load(QUrl(vplay.mainQmlFileName())); // something like this should already be in your code
QQuickWindow* window = (QQuickWindow*) m_engine.rootObjects().first();
QSurfaceFormat format;
format.setSamples(16);
window->setFormat(format);

Maybe you also have to add QSG_ANTIALIASING_METHOD to the variables of the build environment in QtCreator and assign it the value msaa. By default the value should not be in the list and therefore the value vertex will be assigned, if I’m right.

  • This reply was modified 3 years ago by  Terry86.
  • This reply was modified 3 years ago by  Terry86.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support