(*i)->compile();
uniforms.clear();
+ legacy_vars = false;
glLinkProgram(id);
int value;
info.type = type;
uniforms_by_index[i] = &info;
}
+ else
+ legacy_vars = true;
+ }
+
+ glGetProgramiv(id, GL_ACTIVE_ATTRIBUTES, &count);
+ for(int i=0; i<count; ++i)
+ {
+ char name[128];
+ int len = 0;
+ int size;
+ GLenum type;
+ glGetActiveAttrib(id, i, sizeof(name), &len, &size, &type, name);
+ if(len && !strncmp(name, "gl_", 3))
+ legacy_vars = true;
}
if(ARB_uniform_buffer_object)
UniformBlockMap uniform_blocks;
UniformMap uniforms;
unsigned uniform_layout_hash;
+ bool legacy_vars;
public:
Program();
const UniformInfo &get_uniform_info(const std::string &) const;
int get_uniform_location(const std::string &) const;
+ bool uses_legacy_variables() const { return legacy_vars; }
+
void bind() const;
static void unbind();
};