X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fparser.cpp;h=ac35216a4cdd164aeb80b1d1f597e4b1fb4803ec;hb=c315e77b7791fe92d42e1566b5adaddf2699a758;hp=8f2160a626674675b1f63b76ce5dc992d92451ff;hpb=2e0ed3f7d23f09de7b4b09c2f132c316ce703d9a;p=libs%2Fgl.git diff --git a/source/glsl/parser.cpp b/source/glsl/parser.cpp index 8f2160a6..ac35216a 100644 --- a/source/glsl/parser.cpp +++ b/source/glsl/parser.cpp @@ -273,6 +273,12 @@ RefPtr Parser::parse_global_declaration() tokenizer.expect(";"); return iface_lo; } + else if(is_interface_qualifier(token) && tokenizer.peek_token(2)=="{") + { + RefPtr iface = parse_interface_block(); + iface->layout = layout; + return iface; + } else { RefPtr var = parse_variable_declaration(); @@ -792,7 +798,7 @@ RefPtr Parser::parse_interface_block() if(!is_interface_qualifier(iface->interface)) throw parse_error(tokenizer.get_location(), iface->interface, "an interface qualifier"); - iface->name = expect_identifier(); + iface->block_name = expect_identifier(); iface->members = new Block; parse_block(*iface->members, true, &Parser::parse_variable_declaration_with_layout); if(!check(";"))