Hi All,
I am trying to use this extension. I can use #include once as the first entry in a shader. Does anyone know how to use more than 1 include and on another line other than the first? I need this to work on both Nvidia and AMD


What happens when you try to include more than one time?

Also, are you using the correct #version and #extension declarations before the inclusion?

Oh, and AMD doesn’t support shading_language_include on any of their hardware.

Hi Alfonse,
I am using #version 400; but if I don’t include that in the #include and instead have it as a line before the #include I get a compile error about #include not being supported.

I do not have any #extension declared.

Not being supported in AMD will be a problem in the long run although most of our clients use nVidia.

That’s because NVIDIA continues to be exceedingly lax about actually following the OpenGL and GLSL specification.

Nothing can come before #version. Nothing. (except comments and whitespace).

Also, ARM_shading_language_include is an extension; it is not core in 4.00, 4.10, or 4.20. Therefore, you must explicitly activate it with a #extension definition. This must happen before any #includes.

Thanks for that. It all works now.

I checked my ATI card, and you are right it is not supported on the most recent driver.

Ah well, looks like I have to keep my old code

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.