From: Mikko Rasa Date: Wed, 10 Dec 2014 16:08:09 +0000 (+0200) Subject: Add some accessors X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=fc0f53b1981436d39a27884376e852dca5671fda;p=libs%2Fgl.git Add some accessors --- diff --git a/source/lighting.cpp b/source/lighting.cpp index 239bdc19..a927d622 100644 --- a/source/lighting.cpp +++ b/source/lighting.cpp @@ -58,6 +58,11 @@ void Lighting::detach(unsigned i) Light::unbind_from(i); } +const Light *Lighting::get_attached_light(unsigned i) const +{ + return i *get_bounding_sphere() const { return &bounding_sphere; } diff --git a/source/program.h b/source/program.h index 4feb862d..53daaa76 100644 --- a/source/program.h +++ b/source/program.h @@ -90,7 +90,7 @@ public: void attach_shader(Shader &shader); void attach_shader_owned(Shader *shader); void detach_shader(Shader &shader); - const ShaderList &get_shaders() const { return shaders; } + const ShaderList &get_attached_shaders() const { return shaders; } void bind_attribute(unsigned, const std::string &); void bind_attribute(VertexComponent, const std::string &); diff --git a/source/texturing.cpp b/source/texturing.cpp index 093c602e..dff3757f 100644 --- a/source/texturing.cpp +++ b/source/texturing.cpp @@ -37,6 +37,11 @@ void Texturing::set_attachment(unsigned attch, const Texture *tex) bind_attachment(attch); } +const Texture *Texturing::get_attached_texture(unsigned i) const +{ + return i