DiligentGraphics / DiligentEngine

A modern cross-platform low-level graphics library and rendering framework
http://diligentgraphics.com/diligent-engine/
Apache License 2.0
3.63k stars 331 forks source link

GLSL includes fail without `GL_GOOGLE_include_directive` #191

Closed Sam-Izdat closed 2 years ago

Sam-Izdat commented 2 years ago

OS: Windows 10 Visual Studio 2022 17.1.0 GeForce GTX 1650

Just in case this might be worth a note in the documentation somewhere, includes in a glsl shader produce the following error:

Diligent Engine: ERROR: Failed to parse shader source: 
ERROR: 0:12: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:12: '#include' : must be followed by a header name 
ERROR: 2 compilation errors.  No code generated.

Putting #extension GL_GOOGLE_include_directive : require immediately before the includes, at the top of the shader resolves the error.