From 2524bb81a3a642830b88a4268fedc03d59a93e60 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 25 Nov 2013 17:24:18 +0200 Subject: [PATCH] Be more direct about getting uniform counts from the program object --- source/program.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/program.cpp b/source/program.cpp index 61610493..8b7bc6c7 100644 --- a/source/program.cpp +++ b/source/program.cpp @@ -101,10 +101,10 @@ void Program::link() if(!(linked = value)) throw compile_error(get_info_log()); - glGetProgramiv(id, GL_ACTIVE_UNIFORMS, &value); - unsigned count = value; + int count; + glGetProgramiv(id, GL_ACTIVE_UNIFORMS, &count); vector uniforms_by_index(count); - for(unsigned i=0; i