20 lines
491 B
C++
20 lines
491 B
C++
#include <QtWidgets/QApplication>
|
|
#include <QtGui/qsurfaceformat.h>
|
|
#include <iostream>
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
QApplication app(argc, argv);
|
|
QSurfaceFormat fmt;
|
|
fmt.setVersion(3, 3);
|
|
fmt.setProfile(QSurfaceFormat::CoreProfile);
|
|
fmt.setDepthBufferSize(24);
|
|
fmt.setStencilBufferSize(8);
|
|
fmt.setSamples(4);
|
|
fmt.setSwapInterval(1);
|
|
QSurfaceFormat::setDefaultFormat(fmt);
|
|
std::cout << "Hello, from qopengltest!\n";
|
|
|
|
return app.exec();
|
|
}
|