main.cpp (mathmod-11.0-source) | : | main.cpp (mathmod-11.1-source) | ||
---|---|---|---|---|
skipping to change at line 42 | skipping to change at line 42 | |||
#endif | #endif | |||
int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | |||
{ | { | |||
// QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); | // QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); | |||
QApplication app(argc, argv); | QApplication app(argc, argv); | |||
QSurfaceFormat fmt; | QSurfaceFormat fmt; | |||
fmt.setDepthBufferSize(24); | fmt.setDepthBufferSize(24); | |||
QSurfaceFormat::setDefaultFormat(fmt); | QSurfaceFormat::setDefaultFormat(fmt); | |||
// Request OpenGL 3.3 core or OpenGL ES 3.0. | ||||
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) { | ||||
qDebug("Requesting 3.3 core context"); | ||||
//app.setVersion(3, 3); | ||||
//fmt.setProfile(QSurfaceFormat::CoreProfile); | ||||
} else { | ||||
qDebug("Requesting 3.0 context"); | ||||
//fmt.setVersion(3, 0); | ||||
} | ||||
Parametersoptions Parameters; | Parametersoptions Parameters; | |||
Parameters.fileconfig2= app.applicationDirPath(); | ||||
Parameters.MainApp = &app; | Parameters.MainApp = &app; | |||
Parameters.LoadConfig(app, argc, argv); | Parameters.LoadConfig(app, argc, argv); | |||
// Creation of the two most important objects: | // Creation of the two most important objects: | |||
MathMod mm(nullptr, uint(Parameters.Threads[0]), | MathMod mm(nullptr, uint(Parameters.Threads[0]), | |||
uint(Parameters.InitParGrid), uint(Parameters.InitIsoGrid), | uint(Parameters.InitParGrid), uint(Parameters.InitIsoGrid), | |||
uint(Parameters.CalculFactor[0]), uint(Parameters.CalculFactor[1] ), | uint(Parameters.CalculFactor[0]), uint(Parameters.CalculFactor[1] ), | |||
uint(Parameters.CalculFactor[2])); | uint(Parameters.CalculFactor[2])); | |||
DrawingOptions drawingopt; | DrawingOptions drawingopt; | |||
// save references: | // save references: | |||
drawingopt.Parameters = &Parameters; | drawingopt.Parameters = &Parameters; | |||
End of changes. 2 change blocks. | ||||
10 lines changed or deleted | 1 lines changed or added |