From 798703e937da6b4bbbc4a33f6670ca6fa61e47c3 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 25 Nov 2013 17:25:22 +0200 Subject: [PATCH] Check and report the use of legacy built-in variables in a program --- source/program.cpp | 15 +++++++++++++++ source/program.h | 3 +++ 2 files changed, 18 insertions(+) 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