X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Flighting.cpp;h=20c812fe58cfd3e6ee7434bef5f10707db67f01c;hb=5008778dbb1840bf7c6d479800d2b932f8386fb2;hp=0fc26ab5a7f17c921dafb54d1c8d02deb725afad;hpb=5bb193f930fb8738d099d630c4d625d82c1215b5;p=libs%2Fgl.git diff --git a/source/materials/lighting.cpp b/source/materials/lighting.cpp index 0fc26ab5..20c812fe 100644 --- a/source/materials/lighting.cpp +++ b/source/materials/lighting.cpp @@ -12,9 +12,7 @@ using namespace std; namespace Msp { namespace GL { -Lighting::Lighting(): - zenith_direction(0, 0, 1), - horizon_angle(Geometry::Angle::zero()) +Lighting::Lighting() { set_ambient(0.2f); set_fog_color(Color(0.0f, 0.0f, 0.0f, 0.0f)); @@ -27,24 +25,6 @@ void Lighting::set_ambient(const Color &a) shdata.uniform("ambient_color", ambient); } -void Lighting::set_sky_color(const Color &s) -{ - sky_color = s; - shdata.uniform("sky_color", sky_color); -} - -void Lighting::set_zenith_direction(const Vector3 &d) -{ - zenith_direction = d; - shdata.uniform("world_zenith_dir", zenith_direction); -} - -void Lighting::set_horizon_angle(const Geometry::Angle &a) -{ - horizon_angle = a; - shdata.uniform("horizon_limit", horizon_angle.radians()); -} - void Lighting::set_fog_color(const Color &c) { fog_color = c; @@ -78,33 +58,6 @@ void Lighting::detach(const Light &l) lights.erase(i); } -void Lighting::detach(unsigned i) -{ - if(i>=lights.size()) - return; - - detach(*lights[i].light); -} - -const Light *Lighting::get_attached_light(unsigned i) const -{ - return iupdate_shader_data(sd, i); -} - const ProgramData &Lighting::get_shader_data() const { for(unsigned i=0; i::from_degrees(a)); -} -#pragma GCC diagnostic pop - void Lighting::Loader::light(const string &name) { obj.attach(get_collection().get(name)); @@ -198,23 +137,5 @@ void Lighting::Loader::light_inline() obj.attach(*lgt.release()); } -void Lighting::Loader::light_inline_index(unsigned) -{ - light_inline(); -} - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -void Lighting::Loader::sky_color(float r, float g, float b) -{ - obj.set_sky_color(Color(r, g, b)); -} - -void Lighting::Loader::zenith_direction(float x, float y, float z) -{ - obj.set_zenith_direction(Vector3(x, y, z)); -} -#pragma GCC diagnostic pop - } // namespace GL } // namespace Msp