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:
authorAntony Riakiotakis <kalast@gmail.com>2015-05-11 17:40:38 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-05-11 17:41:18 +0300
commit4fc31881127786f244bc67ad45b3787c6d7917a2 (patch)
tree7577345458bd5ec6fedaf0050c915ec1ed5125b0 /intern/cycles/device
parentd30f664c0438e8378c79d5beb114b1338d0e1d94 (diff)
Cycles: Get rid of one more OpenGL matrix manipulation/push/pop.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/device.cpp10
-rw-r--r--intern/cycles/device/device.h2
-rw-r--r--intern/cycles/device/device_cuda.cpp12
-rw-r--r--intern/cycles/device/device_multi.cpp4
4 files changed, 14 insertions, 14 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index b34e0646384..a9e4284f35f 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -58,7 +58,7 @@ void Device::pixels_free(device_memory& mem)
mem_free(mem);
}
-void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dy, int width, int height, bool transparent,
+void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dx, int dy, int width, int height, bool transparent,
const DeviceDrawParams &draw_params)
{
pixels_copy_from(rgba, y, w, h);
@@ -114,22 +114,22 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dy, int w
/* texture coordinate - vertex pair */
vp[0] = 0.0f;
vp[1] = 0.0f;
- vp[2] = 0.0f;
+ vp[2] = dx;
vp[3] = dy;
vp[4] = 1.0f;
vp[5] = 0.0f;
- vp[6] = (float)width;
+ vp[6] = (float)width + dx;
vp[7] = dy;
vp[8] = 1.0f;
vp[9] = 1.0f;
- vp[10] = (float)width;
+ vp[10] = (float)width + dx;
vp[11] = (float)height + dy;
vp[12] = 0.0f;
vp[13] = 1.0f;
- vp[14] = 0.0f;
+ vp[14] = dx;
vp[15] = (float)height + dy;
if (vertex_buffer)
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index b32f7b406c7..8ac3df1797c 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -181,7 +181,7 @@ public:
/* opengl drawing */
virtual void draw_pixels(device_memory& mem, int y, int w, int h,
- int dy, int width, int height, bool transparent,
+ int dx, int dy, int width, int height, bool transparent,
const DeviceDrawParams &draw_params);
#ifdef WITH_NETWORK
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index be6a1f3502d..4b325947f0f 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -880,7 +880,7 @@ public:
}
}
- void draw_pixels(device_memory& mem, int y, int w, int h, int dy, int width, int height, bool transparent,
+ 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)
{
if(!background) {
@@ -932,22 +932,22 @@ public:
/* texture coordinate - vertex pair */
vpointer[0] = 0.0f;
vpointer[1] = 0.0f;
- vpointer[2] = 0.0f;
+ vpointer[2] = dx;
vpointer[3] = dy;
vpointer[4] = (float)w/(float)pmem.w;
vpointer[5] = 0.0f;
- vpointer[6] = (float)width;
+ vpointer[6] = (float)width + dx;
vpointer[7] = dy;
vpointer[8] = (float)w/(float)pmem.w;
vpointer[9] = (float)h/(float)pmem.h;
- vpointer[10] = (float)width;
+ vpointer[10] = (float)width + dx;
vpointer[11] = (float)height + dy;
vpointer[12] = 0.0f;
vpointer[13] = (float)h/(float)pmem.h;
- vpointer[14] = 0.0f;
+ vpointer[14] = dx;
vpointer[15] = (float)height + dy;
glUnmapBuffer(GL_ARRAY_BUFFER);
@@ -981,7 +981,7 @@ public:
return;
}
- Device::draw_pixels(mem, y, w, h, dy, width, height, transparent, draw_params);
+ Device::draw_pixels(mem, y, w, h, dx, dy, width, height, transparent, draw_params);
}
void thread_run(DeviceTask *task)
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index c0a1516f2de..c61e550151f 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -236,7 +236,7 @@ public:
mem.device_pointer = tmp;
}
- void draw_pixels(device_memory& rgba, int y, int w, int h, int dy, int width, int height, bool transparent,
+ void draw_pixels(device_memory& rgba, int y, int w, int h, int dx, int dy, int width, int height, bool transparent,
const DeviceDrawParams &draw_params)
{
device_ptr tmp = rgba.device_pointer;
@@ -251,7 +251,7 @@ public:
/* adjust math for w/width */
rgba.device_pointer = sub.ptr_map[tmp];
- sub.device->draw_pixels(rgba, sy, w, sh, sdy, width, sheight, transparent, draw_params);
+ sub.device->draw_pixels(rgba, sy, w, sh, dx, sdy, width, sheight, transparent, draw_params);
i++;
}