]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/parser.cpp
Support layout qualifiers on GLSL interface blocks
[libs/gl.git] / source / glsl / parser.cpp
index 9e1f1913491cf98800352d25619557a3e120bfdc..ac35216a4cdd164aeb80b1d1f597e4b1fb4803ec 100644 (file)
@@ -273,6 +273,12 @@ RefPtr<Statement> Parser::parse_global_declaration()
                        tokenizer.expect(";");
                        return iface_lo;
                }
+               else if(is_interface_qualifier(token) && tokenizer.peek_token(2)=="{")
+               {
+                       RefPtr<InterfaceBlock> iface = parse_interface_block();
+                       iface->layout = layout;
+                       return iface;
+               }
                else
                {
                        RefPtr<VariableDeclaration> var = parse_variable_declaration();