summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers/graphicshelpergl3_3.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-12-08 11:42:25 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-01-13 10:55:14 +0000
commit5c89a2c7e43f930758b207acb0e89cd7477c4f60 (patch)
treefd5be7ec340fd085be1beb24fdeba987a4bbef52 /src/render/graphicshelpers/graphicshelpergl3_3.cpp
parent7f308fe0a9ec54d30c886203876d765e284f3826 (diff)
Shaders: retrieve SSBO block
Change-Id: I62065d30b197367c8e5e03099c3af034892c4038 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicshelpergl3_3.cpp')
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_3.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/render/graphicshelpers/graphicshelpergl3_3.cpp b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
index e5e7c23e1..4e916755a 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
@@ -43,6 +43,25 @@
#include <private/attachmentpack_p.h>
#include <private/qgraphicsutils_p.h>
+# ifndef QT_OPENGL_3_2
+# define GL_PATCH_VERTICES 36466
+# define GL_ACTIVE_RESOURCES 0x92F5
+# define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
+# define GL_BUFFER_BINDING 0x9302
+# define GL_BUFFER_DATA_SIZE 0x9303
+# define GL_NUM_ACTIVE_VARIABLES 0x9304
+# define GL_SHADER_STORAGE_BLOCK 0x92E6
+# define GL_UNIFORM 0x92E1
+# define GL_UNIFORM_BLOCK 0x92E2
+# define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+# define GL_UNIFORM_OFFSET 0x8A3B
+# define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+# define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+# define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+# define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+# define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
+# endif
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
@@ -217,6 +236,14 @@ QVector<ShaderUniformBlock> GraphicsHelperGL3_3::programUniformBlocks(GLuint pro
return blocks;
}
+QVector<ShaderStorageBlock> GraphicsHelperGL3_3::programShaderStorageBlocks(GLuint programId)
+{
+ Q_UNUSED(programId);
+ QVector<ShaderStorageBlock> blocks;
+ qWarning() << "SSBO are not supported by OpenGL 3.3 (since OpenGL 4.3)";
+ return blocks;
+}
+
void GraphicsHelperGL3_3::vertexAttribDivisor(GLuint index, GLuint divisor)
{
m_funcs->glVertexAttribDivisor(index, divisor);