summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWieland Hagen <wieland.hagen@kdab.com>2016-01-14 18:15:31 +0100
committerWieland Hagen <wieland.hagen@kdab.com>2016-01-14 21:52:28 +0000
commit0f50b649912d44eb75e37a3f17afcefbec40fba7 (patch)
treed6d6d8610c472495e22cff8a66171ccb3d1ee53e /src
parent9d3b3d353aec6f410fef428e8104e59b9fe0c34d (diff)
Add GraphicsContext::supportsDrawBuffersBlend()
To check for availability of ARB_draw_buffers_blend Task-number: QTBUG-50005 Change-Id: I8f4e11ff401a9e1e3751f61421572cb1fc323979 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp5
-rw-r--r--src/render/graphicshelpers/graphicscontext_p.h2
-rw-r--r--src/render/graphicshelpers/graphicshelpergl4.cpp1
-rw-r--r--src/render/graphicshelpers/graphicshelperinterface_p.h3
4 files changed, 9 insertions, 2 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index d934d33af..b5b2898db 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -604,6 +604,11 @@ QGraphicsApiFilter *GraphicsContext::contextInfo() const
return m_contextInfo;
}
+bool GraphicsContext::supportsDrawBuffersBlend() const
+{
+ return m_glHelper->supportsFeature(GraphicsHelperInterface::DrawBuffersBlend);
+}
+
/*!
* Wraps an OpenGL call to glDrawElementsInstanced.
* If the call is not supported by the system's OpenGL version,
diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h
index 98ca94559..51e6c8bc4 100644
--- a/src/render/graphicshelpers/graphicscontext_p.h
+++ b/src/render/graphicshelpers/graphicscontext_p.h
@@ -208,7 +208,7 @@ public:
static GLuint byteSizeFromType(GLint type);
static GLint glDataTypeFromAttributeDataType(QAttribute::DataType dataType);
-
+ bool supportsDrawBuffersBlend() const;
bool supportsVAO() const { return m_supportsVAO; }
private:
diff --git a/src/render/graphicshelpers/graphicshelpergl4.cpp b/src/render/graphicshelpers/graphicshelpergl4.cpp
index ca83589a4..332413d69 100644
--- a/src/render/graphicshelpers/graphicshelpergl4.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl4.cpp
@@ -369,6 +369,7 @@ bool GraphicsHelperGL4::supportsFeature(GraphicsHelperInterface::Feature feature
case TextureDimensionRetrieval:
case ShaderStorageObject:
case Compute:
+ case DrawBuffersBlend:
return true;
default:
return false;
diff --git a/src/render/graphicshelpers/graphicshelperinterface_p.h b/src/render/graphicshelpers/graphicshelperinterface_p.h
index f7b5ddf8c..fe52b1607 100644
--- a/src/render/graphicshelpers/graphicshelperinterface_p.h
+++ b/src/render/graphicshelpers/graphicshelperinterface_p.h
@@ -72,7 +72,8 @@ public:
RenderBufferDimensionRetrieval,
TextureDimensionRetrieval,
ShaderStorageObject,
- Compute
+ Compute,
+ DrawBuffersBlend
};
virtual ~GraphicsHelperInterface() {}