From fc0f53b1981436d39a27884376e852dca5671fda Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 10 Dec 2014 18:08:09 +0200 Subject: [PATCH] Add some accessors --- source/lighting.cpp | 5 +++++ source/lighting.h | 4 ++++ source/object.h | 1 + source/program.h | 2 +- source/texturing.cpp | 5 +++++ source/texturing.h | 4 ++++ 6 files changed, 20 insertions(+), 1 deletion(-) 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