Home › Per LearnOpenGL (compute shaders), the WORKGROUP…
Per LearnOpenGL (compute shaders), the WORKGROUP for a GLSL compute shader is invoked via which API call?
AglDispatchCompute(x, y, z)
BglDrawArrays(GL_COMPUTE)
CglLinkProgram() then glUseProgram()
DglClear(GL_COMPUTE_BIT)
Answer & Solution
Correct answer: A. glDispatchCompute(x, y, z)
Khronos OpenGL Compute Shaders: glDispatchCompute(x,y,z) launches x×y×z workgroups; each runs gl_NumThreads-many threads. Independent of the graphics pipeline.
Related questions
For UNIFORM BUFFER OBJECTS (UBO) and SHADER STORAGE BUFFER OBJECTS (SSBO), the key differePer LearnOpenGL (Normal Mapping), normals stored in a normal map are most commonly in whicPer LearnOpenGL (Lighting), the BLINN-PHONG specular highlight uses which vector instead oIn a fragment shader, BRANCHING on a uniform vs a varying / per-fragment value differs becPer The Book of Shaders, a SDF-based circle shape in a fragment shader at point uv (centrePer Microsoft HLSL docs, a vertex shader output marked SV_POSITION corresponds to which GLPer LearnOpenGL, the CLIP space output (gl_Position) is converted to NDC by which operatioPer LearnOpenGL (Transformations), the standard order of matrix multiplication for a verte