Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-04-28 20:25:57 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-04-28 20:25:57 +0300
commitb868f43fd382c0497b82f29685f6280d9692a0fb (patch)
tree7fac681bd1e08283cd3168a30b5362f250bf6da2 /intern/cycles/device/device.h
parentba4f47ce8eb00284da7d6b17bf9c3f02506617e3 (diff)
Cycles support for preview on viewport with core profile
This upgrade the drawing code to use latest opengl calls. Also, it adds a fallback shader for opencolorio. Reviewers: sergey, brecht Subscribers: merwin, fclem Differential Revision: https://developer.blender.org/D2652
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r--intern/cycles/device/device.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 6051dd8b3eb..21d29a801ae 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -229,13 +229,26 @@ struct DeviceDrawParams {
class Device {
protected:
- Device(DeviceInfo& info_, Stats &stats_, bool background) : background(background), vertex_buffer(0), info(info_), stats(stats_) {}
+ enum {
+ FALLBACK_SHADER_STATUS_NONE = 0,
+ FALLBACK_SHADER_STATUS_ERROR,
+ FALLBACK_SHADER_STATUS_SUCCESS,
+ };
+
+ Device(DeviceInfo& info_, Stats &stats_, bool background) : background(background),
+ vertex_buffer(0),
+ fallback_status(FALLBACK_SHADER_STATUS_NONE), fallback_shader_program(0),
+ info(info_), stats(stats_) {}
bool background;
string error_msg;
/* used for real time display */
unsigned int vertex_buffer;
+ int fallback_status, fallback_shader_program;
+ int image_texture_location, fullscreen_location;
+
+ bool bind_fallback_display_space_shader(const float width, const float height);
public:
virtual ~Device();
@@ -300,9 +313,10 @@ public:
virtual void task_cancel() = 0;
/* opengl drawing */
- virtual void draw_pixels(device_memory& mem, int y, int w, int h,
- int dx, int dy, int width, int height, bool transparent,
- const DeviceDrawParams &draw_params);
+ virtual void draw_pixels(device_memory& mem, int y,
+ int w, int h, int width, int height,
+ int dx, int dy, int dw, int dh,
+ bool transparent, const DeviceDrawParams &draw_params);
#ifdef WITH_NETWORK
/* networking */