aboutsummaryrefslogtreecommitdiffstats
path: root/community/krita/pure-opengles-compat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/krita/pure-opengles-compat.patch')
-rw-r--r--community/krita/pure-opengles-compat.patch142
1 files changed, 0 insertions, 142 deletions
diff --git a/community/krita/pure-opengles-compat.patch b/community/krita/pure-opengles-compat.patch
deleted file mode 100644
index 202489fe28..0000000000
--- a/community/krita/pure-opengles-compat.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-diff -urN krita-4.2.9.orig/libs/ui/opengl/kis_opengl_canvas2.cpp krita-4.2.9/libs/ui/opengl/kis_opengl_canvas2.cpp
---- krita-4.2.9.orig/libs/ui/opengl/kis_opengl_canvas2.cpp 2020-05-22 02:19:15.233324983 -0600
-+++ krita-4.2.9/libs/ui/opengl/kis_opengl_canvas2.cpp 2020-05-22 02:20:49.730356628 -0600
-@@ -46,10 +46,6 @@
- #include "KisOpenGLModeProber.h"
- #include <KoColorModelStandardIds.h>
-
--#ifndef Q_OS_MACOS
--#include <QOpenGLFunctions_2_1>
--#endif
--
- #define NEAR_VAL -1000.0
- #define FAR_VAL 1000.0
-
-@@ -104,10 +100,6 @@
- QVector3D vertices[6];
- QVector2D texCoords[6];
-
--#ifndef Q_OS_MACOS
-- QOpenGLFunctions_2_1 *glFn201;
--#endif
--
- qreal pixelGridDrawingThreshold;
- bool pixelGridEnabled;
- QColor gridColor;
-@@ -271,16 +263,6 @@
- {
- KisOpenGL::initializeContext(context());
- initializeOpenGLFunctions();
--#ifndef Q_OS_MACOS
-- if (!KisOpenGL::hasOpenGLES()) {
-- d->glFn201 = context()->versionFunctions<QOpenGLFunctions_2_1>();
-- if (!d->glFn201) {
-- warnUI << "Cannot obtain QOpenGLFunctions_2_1, glLogicOp cannot be used";
-- }
-- } else {
-- d->glFn201 = nullptr;
-- }
--#endif
-
- KisConfig cfg(true);
- d->openGLImageTextures->setProofingConfig(canvas()->proofingConfiguration());
-@@ -442,21 +424,8 @@
- modelMatrix = projectionMatrix * modelMatrix;
- d->solidColorShader->setUniformValue(d->solidColorShader->location(Uniform::ModelViewProjection), modelMatrix);
-
-- if (!KisOpenGL::hasOpenGLES()) {
-- glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
--
-- glEnable(GL_COLOR_LOGIC_OP);
--#ifndef Q_OS_MACOS
-- if (d->glFn201) {
-- d->glFn201->glLogicOp(GL_XOR);
-- }
--#else
-- glLogicOp(GL_XOR);
--#endif
-- } else {
-- glEnable(GL_BLEND);
-- glBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ZERO, GL_ONE, GL_ONE);
-- }
-+ glEnable(GL_BLEND);
-+ glBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ZERO, GL_ONE, GL_ONE);
-
- d->solidColorShader->setUniformValue(
- d->solidColorShader->location(Uniform::FragmentColor),
-@@ -497,11 +466,7 @@
- d->outlineVAO.release();
- }
-
-- if (!KisOpenGL::hasOpenGLES()) {
-- glDisable(GL_COLOR_LOGIC_OP);
-- } else {
-- glDisable(GL_BLEND);
-- }
-+ glDisable(GL_BLEND);
-
- d->solidColorShader->release();
- }
-diff -urN krita-4.2.9.orig/libs/ui/opengl/kis_opengl_image_textures.cpp krita-4.2.9/libs/ui/opengl/kis_opengl_image_textures.cpp
---- krita-4.2.9.orig/libs/ui/opengl/kis_opengl_image_textures.cpp 2020-05-22 02:19:15.233324983 -0600
-+++ krita-4.2.9/libs/ui/opengl/kis_opengl_image_textures.cpp 2020-05-22 02:36:06.923918655 -0600
-@@ -473,36 +473,16 @@
- namespace {
- void initializeRGBA16FTextures(QOpenGLContext *ctx, KisGLTexturesInfo &texturesInfo, KoID &destinationColorDepthId)
- {
-- if (KisOpenGL::hasOpenGLES() || KisOpenGL::hasOpenGL3()) {
-- texturesInfo.internalFormat = GL_RGBA16F;
-- dbgUI << "Using half (GLES or GL3)";
-- } else if (ctx->hasExtension("GL_ARB_texture_float")) {
-- texturesInfo.internalFormat = GL_RGBA16F_ARB;
-- dbgUI << "Using ARB half";
-- }
-- else if (ctx->hasExtension("GL_ATI_texture_float")) {
-- texturesInfo.internalFormat = GL_RGBA_FLOAT16_ATI;
-- dbgUI << "Using ATI half";
-- }
-+ texturesInfo.internalFormat = GL_RGBA16F;
-+ dbgUI << "Using half (GLES or GL3)";
-
- bool haveBuiltInOpenExr = false;
- #ifdef HAVE_OPENEXR
- haveBuiltInOpenExr = true;
- #endif
-
-- if (haveBuiltInOpenExr && (KisOpenGL::hasOpenGLES() || KisOpenGL::hasOpenGL3())) {
-- texturesInfo.type = GL_HALF_FLOAT;
-- destinationColorDepthId = Float16BitsColorDepthID;
-- dbgUI << "Pixel type half (GLES or GL3)";
-- } else if (haveBuiltInOpenExr && ctx->hasExtension("GL_ARB_half_float_pixel")) {
-- texturesInfo.type = GL_HALF_FLOAT_ARB;
-- destinationColorDepthId = Float16BitsColorDepthID;
-- dbgUI << "Pixel type half";
-- } else {
-- texturesInfo.type = GL_FLOAT;
-- destinationColorDepthId = Float32BitsColorDepthID;
-- dbgUI << "Pixel type float";
-- }
-+ texturesInfo.type = GL_HALF_FLOAT;
-+ destinationColorDepthId = Float16BitsColorDepthID;
- texturesInfo.format = GL_RGBA;
- }
- }
-@@ -543,16 +523,8 @@
- initializeRGBA16FTextures(ctx, m_texturesInfo, destinationColorDepthId);
- }
- else if (colorDepthId == Float32BitsColorDepthID) {
-- if (KisOpenGL::hasOpenGLES() || KisOpenGL::hasOpenGL3()) {
-- m_texturesInfo.internalFormat = GL_RGBA32F;
-- dbgUI << "Using float (GLES or GL3)";
-- } else if (ctx->hasExtension("GL_ARB_texture_float")) {
-- m_texturesInfo.internalFormat = GL_RGBA32F_ARB;
-- dbgUI << "Using ARB float";
-- } else if (ctx->hasExtension("GL_ATI_texture_float")) {
-- m_texturesInfo.internalFormat = GL_RGBA_FLOAT32_ATI;
-- dbgUI << "Using ATI float";
-- }
-+ m_texturesInfo.internalFormat = GL_RGBA32F;
-+ dbgUI << "Using float (GLES or GL3)";
-
- m_texturesInfo.type = GL_FLOAT;
- m_texturesInfo.format = GL_RGBA;