How to Load SPIR-V Shaders in OpenGL | Geeks3D

General News

Summary

The only requirement is the support of OpenGL 4.6, which is usually the case on Windows with latest drivers from AMD, NVIDIA and Intel. On Linux, if I’m not wrong, proprietary drivers are required to get GL 4.6 support. This can be done with the glslangValidator command line utility (shipped with the Vulkan SDK): The -G option allows to create a binary under OpenGL semantics. We can now load this SPIR-V module in OpenGL thanks to the following functions: – – where vs_buf is the SPIR-V binary buffer in memory, vs_buf_len its length in bytes and program_id an existing program created with glCreateProgram(). I have no C/C++ example to give you, but if you want to play with SPIR-V shaders in OpenGL, two GeeXLab demos (a RGB triangle and a textured quad) are available HERE.

Classifications

industries
Entertainment
applications
Networking and Cloud

AskAI Classifications

Labels
Software Development 3D Graphics Software GPU Benchmarking Software

Linked Companies

Geeks3D
up to $1M