X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.cpp;h=2ff751946528f75e2a39f6a512565231ed10ce8c;hb=3a675b53b811f50ab965405fbbf91282cab7f3cd;hp=ce1283721d6f7b0796e40808b3425acd49d49b64;hpb=d684e9f3007a0113c65c016ceb694eeac56a128c;p=libs%2Fgl.git diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index ce128372..2ff75194 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -986,6 +986,15 @@ void FunctionResolver::visit(FunctionDeclaration &func) vector &decls = declarations[key]; if(func.definition==&func) { + if(stage_decl && stage_decl->definition) + { + if(!func.overrd) + stage->diagnostics.push_back(Diagnostic(Diagnostic::WARN, func.source, func.line, + format("Overriding function '%s' without the override keyword is deprecated", key))); + if(!stage_decl->definition->virtua) + stage->diagnostics.push_back(Diagnostic(Diagnostic::WARN, func.source, func.line, + format("Overriding function '%s' not declared as virtual is deprecated", key))); + } stage_decl = &func; // Set all previous declarations to use this definition. @@ -1224,7 +1233,8 @@ void InterfaceGenerator::visit(VariableDeclaration &var) } else if(var.interface=="in" && current_block==&stage->content) { - declared_inputs.push_back(&var); + if(var.name.compare(0, 3, "gl_")) + declared_inputs.push_back(&var); /* Try to link input variables in global scope with output variables from previous stage. */