[Interest] OpenGL — using glDispatchComputeGroupSizeARB

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Thu Jun 6 19:14:13 CEST 2019


On 06/06/2019 17:05, Pieter Barendrecht wrote:
> I'm trying to figure out exactly what to include to be able to use the 
> OpenGL command glDispatchComputeGroupSizeARB (which I'm positive is 
> supported on my machine/system). Unfortunately, the typical extension 
> workflow (i.e. #include <QtOpenGLExtensions> in the relevant header file 
> and QT += openglextensions in the .pro file) does not seem to work — it 
> still results in an 'use of undeclared identifier' error upon compiling 
> the code. Any thoughts? I'm on Linux (64bit), using Qt 5.12.

I believe the QtOpenGLExtensions hasn't been regenerated for quite a 
while, and thus does not cover this extension (Khronos changed the 
extension database format or somesuch).

An easy workaround is to resolve the entry point manually. Include 
qopengl.h and do something like this:

> if (ctx->hasExtension("GL_ARB_compute_variable_group_size")) {
>     entry = reinterpret_cast<PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC>(ctx->getProcAddress("glDispatchComputeGroupSizeARB");
>     // use it
> }


Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190606/bb54fdcb/attachment.bin>

More information about the Interest mailing list