X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flighting.cpp;h=f5fbca6ac7ac954c5a2c63cd75590557e4245660;hb=f159ebc4120fb057c9d59efb0e5c7c36bff6f40a;hp=517530a2f128854f964f673411f11eedfc97df87;hpb=f136af6873d7409daffe262b14f632af986bd7dc;p=libs%2Fgl.git diff --git a/source/lighting.cpp b/source/lighting.cpp index 517530a2..f5fbca6a 100644 --- a/source/lighting.cpp +++ b/source/lighting.cpp @@ -41,6 +41,14 @@ void Lighting::detach(unsigned i) Light::unbind_from(i); } +void Lighting::update_shader_data(ProgramData &shdata, const Matrix &view_matrix) const +{ + shdata.uniform("ambient_color", ambient); + for(unsigned i=0; iupdate_shader_data(shdata, view_matrix, i); +} + void Lighting::bind() const { if(!set_current(this))