Fix Qt GLES builds

This commit is contained in:
Mahmood - Zer0xFF 2019-10-23 12:32:32 +01:00
parent ee06ce30cd
commit ac702fb96c
2 changed files with 11 additions and 0 deletions

View File

@ -1,7 +1,14 @@
#if !defined(GLES_COMPATIBILITY)
#include "GSH_OpenGLQt.h"
#endif
#include <QWindow>
#include <QOpenGLContext>
#if defined(GLES_COMPATIBILITY)
#include "GSH_OpenGLQt.h"
#endif
CGSH_OpenGLQt::CGSH_OpenGLQt(QWindow* renderWindow)
: m_renderWindow(renderWindow)
{

View File

@ -5,7 +5,11 @@ OpenGLWindow::OpenGLWindow(QWindow* parent)
: QWindow(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);