]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/sky.h
Add debug name capability to more classes
[libs/gl.git] / source / effects / sky.h
index eb4f618d9607569bcdb32a9151a44ebf7442d8bd..74580d7502a165fb1b8e1d48f8206c600ab7397d 100644 (file)
@@ -4,7 +4,7 @@
 #include "effect.h"
 #include "framebuffer.h"
 #include "programdata.h"
-#include "texture2d.h"
+#include "rendertarget.h"
 
 namespace Msp {
 namespace GL {
@@ -41,30 +41,34 @@ public:
        };
 
 private:
-       const Light &sun;
-       Texture2D transmittance_lookup;
+       Planet planet;
+       Light &sun;
+       RenderTarget transmittance_lookup;
        const Program &transmittance_shprog;
-       Framebuffer transmittance_fbo;
        bool transmittance_lookup_dirty;
-       Texture2D distant;
+       RenderTarget distant;
        const Program &distant_shprog;
-       Framebuffer distant_fbo;
        const Mesh &fullscreen_mesh;
        const Program &backdrop_shprog;
        const Sampler &sampler;
        const Sampler &wrap_sampler;
        mutable ProgramData shdata;
+       float view_height;
        bool rendered;
 
 public:
-       Sky(Resources &, Renderable &, const Light &);
+       Sky(Renderable &, Light &);
 
        void set_planet(const Planet &);
        void set_view_height(float);
 
+       Color get_transmittance(const Vector3 &);
+
        virtual void setup_frame(Renderer &);
        virtual void finish_frame();
        virtual void render(Renderer &, Tag = Tag()) const;
+
+       virtual void set_debug_name(const std::string &);
 };
 
 } // namespace GL