mirror of
https://github.com/jpd002/Play-.git
synced 2025-05-07 11:13:46 +03:00
17 lines
389 B
C++
17 lines
389 B
C++
#include "openglwindow.h"
|
|
|
|
OpenGLWindow::OpenGLWindow(QWindow* parent)
|
|
: OutputWindow(parent)
|
|
{
|
|
QSurfaceFormat format;
|
|
#if defined(GLES_COMPATIBILITY)
|
|
format.setVersion(3, 0);
|
|
#else
|
|
format.setVersion(3, 2);
|
|
#endif
|
|
format.setProfile(QSurfaceFormat::CoreProfile);
|
|
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
|
|
|
|
setSurfaceType(QWindow::OpenGLSurface);
|
|
setFormat(format);
|
|
}
|