Ticket #13351: 0215-enable-opengl-GLES.patch

File 0215-enable-opengl-GLES.patch, 2.1 KB (added by warpme, 19 months ago)

patch to get working gles

  • mythtv/libs/libmythui/mythrender_opengl.cpp

    diff -Naur mythtv-master-20181124-gb89d3b6-old/mythtv/libs/libmythui/mythrender_opengl.cpp mythtv-master-20181124-gb89d3b6-new/mythtv/libs/libmythui/mythrender_opengl.cpp
    old new  
    128128    LOG(VB_GENERAL, LOG_INFO, "OpenGL ES2 forced for Android");
    129129#elif defined USE_OPENGL_QT5 && defined USING_OPENGLES
    130130    int openGLVersionFlags = QGLFormat::OpenGL_ES_Version_2_0;
     131    LOG(VB_GENERAL, LOG_INFO, "Opening OpenGL ES2");
    131132#else
    132133    // Check OpenGL version supported
    133134    QGLWidget *dummy = new QGLWidget;
     
    282283            m_window = w->windowHandle();
    283284    }
    284285
    285 #ifdef ANDROID
     286#ifdef USING_OPENGLES
    286287    // change all window surfacetypes to OpenGLSurface
    287288    // otherwise the raster gets painted on top of the GL surface
    288289    m_window->setSurfaceType(QWindow::OpenGLSurface);
     
    306307{
    307308    setDevice(w);
    308309
    309 #ifdef ANDROID
     310#ifdef USING_OPENGLES
    310311    // change all window surfacetypes to OpenGLSurface
    311312    // otherwise the raster gets painted on top of the GL surface
    312313    m_window->setSurfaceType(QWindow::OpenGLSurface);
  • mythtv/libs/libmythui/mythrender_opengl.h

    diff -Naur mythtv-master-20181124-gb89d3b6-old/mythtv/libs/libmythui/mythrender_opengl.h mythtv-master-20181124-gb89d3b6-new/mythtv/libs/libmythui/mythrender_opengl.h
    old new  
    1010// will exclude it for Raspberry Pi. With this commented, all
    1111// code that depends on USE_OPENGL_QT5 will be bypassed and maybe can
    1212// be removed later.
    13 #if defined USING_OPENGLES && QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) && defined(ANDROID)
     13#if defined USING_OPENGLES && QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
    1414#define USE_OPENGL_QT5
    1515#include <QOpenGLContext>
    1616#else