X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.cpp;h=751043d9231a64d4c72af4894ec29c39b8143d48;hb=8799ec430edae1211dcebf9868e5aec58f951dce;hp=e037e0a5bb09ee7ee26cb1bee9eb62155d41a2c3;hpb=c6d59d1b35ee981c10ee8b9870338ffbaaa23e19;p=libs%2Fgl.git diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index e037e0a5..751043d9 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -78,16 +78,6 @@ void BlockResolver::enter(Block &block) block.parent = current_block; } -void BlockResolver::visit(InterfaceBlock &iface) -{ - /* Block names can't be used for any other identifiers so we can put them - in the same map with instance names. */ - current_block->interfaces[iface.name] = &iface; - if(!iface.instance_name.empty()) - current_block->interfaces[iface.instance_name] = &iface; - TraversingVisitor::visit(iface); -} - VariableResolver::VariableResolver(): builtins(0), @@ -268,6 +258,12 @@ void VariableResolver::visit(VariableDeclaration &var) void VariableResolver::visit(InterfaceBlock &iface) { + /* Block names can't be used for any other identifiers so we can put them + in the same map with instance names. */ + current_block->interfaces[iface.name] = &iface; + if(!iface.instance_name.empty()) + current_block->interfaces[iface.instance_name] = &iface; + SetForScope set_iface(block_interface, iface.interface); TraversingVisitor::visit(iface); }