Example #1
0
 const GLuint Program::uniformLocation(const VariableDeclaration& u) const
 {
     auto it = handles_.uniforms.find(u);
     if(it == handles_.uniforms.end()) {
         std::cerr << u.name() << std::endl;
         throw Exception("unknown uniform");
     } else {
         return it->second;
     }
 }
Example #2
0
bool ASTPrinter::visit(VariableDeclaration const& _node)
{
	writeLine("VariableDeclaration \"" + _node.name() + "\"");
	*m_ostream << indentation() << (
		_node.annotation().type ?
		string("   Type: ") + _node.annotation().type->toString() :
		string("   Type unknown.")
	) << "\n";
	printSourcePart(_node);
	return goDeeper();
}