Move BVHType and shadingsystem enums to top-level of Cycles namespace.
[blender.git] / intern / cycles / render / session.h
index 8cff64def4e8fd241953b91c22aeb557ffca4a86..2d29015863c05dbcf9e2b2ded6adac9d1ae27caa 100644 (file)
@@ -24,6 +24,7 @@
 #include "util_progress.h"
 #include "util_stats.h"
 #include "util_thread.h"
+#include "util_types.h"
 #include "util_vector.h"
 
 CCL_NAMESPACE_BEGIN
@@ -49,7 +50,7 @@ public:
        bool experimental;
        int samples;
        int2 tile_size;
-       int tile_order;
+       TileOrder tile_order;
        int start_resolution;
        int threads;
 
@@ -59,7 +60,7 @@ public:
        double reset_timeout;
        double text_timeout;
 
-       enum { OSL, SVM } shadingsystem;
+       ShadingSystem shadingsystem;
 
        SessionParams()
        {
@@ -69,7 +70,7 @@ public:
 
                progressive = false;
                experimental = false;
-               samples = INT_MAX;
+               samples = USHRT_MAX;
                tile_size = make_int2(64, 64);
                start_resolution = INT_MAX;
                threads = 0;
@@ -81,6 +82,7 @@ public:
                text_timeout = 1.0;
 
                shadingsystem = SVM;
+               tile_order = TILE_CENTER;
        }
 
        bool modified(const SessionParams& params)
@@ -99,6 +101,7 @@ public:
                && cancel_timeout == params.cancel_timeout
                && reset_timeout == params.reset_timeout
                && text_timeout == params.text_timeout
+               && tile_order == params.tile_order
                && shadingsystem == params.shadingsystem); }
 
 };
@@ -126,7 +129,7 @@ public:
        ~Session();
 
        void start();
-       bool draw(BufferParams& params);
+       bool draw(BufferParams& params, DeviceDrawParams& draw_params);
        void wait();
 
        bool ready_to_reset();
@@ -134,6 +137,7 @@ public:
        void set_samples(int samples);
        void set_pause(bool pause);
 
+       void update_scene();
        void device_free();
 protected:
        struct DelayedReset {
@@ -145,19 +149,18 @@ protected:
 
        void run();
 
-       void update_scene();
        void update_status_time(bool show_pause = false, bool show_done = false);
 
-       void tonemap();
+       void tonemap(int sample);
        void path_trace();
        void reset_(BufferParams& params, int samples);
 
        void run_cpu();
-       bool draw_cpu(BufferParams& params);
+       bool draw_cpu(BufferParams& params, DeviceDrawParams& draw_params);
        void reset_cpu(BufferParams& params, int samples);
 
        void run_gpu();
-       bool draw_gpu(BufferParams& params);
+       bool draw_gpu(BufferParams& params, DeviceDrawParams& draw_params);
        void reset_gpu(BufferParams& params, int samples);
 
        bool acquire_tile(Device *tile_device, RenderTile& tile);