From: Mikko Rasa Date: Mon, 25 Nov 2013 15:25:22 +0000 (+0200) Subject: Check and report the use of legacy built-in variables in a program X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=798703e937da6b4bbbc4a33f6670ca6fa61e47c3 Check and report the use of legacy built-in variables in a program --- diff --git a/source/program.cpp b/source/program.cpp index 111cf64b..ffdd3b63 100644 --- a/source/program.cpp +++ b/source/program.cpp @@ -94,6 +94,7 @@ void Program::link() (*i)->compile(); uniforms.clear(); + legacy_vars = false; glLinkProgram(id); int value; @@ -127,6 +128,20 @@ void Program::link() info.type = type; uniforms_by_index[i] = &info; } + else + legacy_vars = true; + } + + glGetProgramiv(id, GL_ACTIVE_ATTRIBUTES, &count); + for(int i=0; i