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 14:10:19 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-05-11 14:10:19 +0300
commit5588a51c9cb89878588c8130a02d76e04a53aae2 (patch)
treea871b9f6965d7d45a07c4d69e8177463d3c65eb2 /intern/cycles/device/device.cpp
parentdfbb876d4660481a980e18b66a3f8d11b5f55b23 (diff)
Cycles OpenGL: Don't use full matrix transform when we can just use
simple addition.
Diffstat (limited to 'intern/cycles/device/device.cpp')
-rw-r--r--intern/cycles/device/device.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index 3a33b8fb68b..839f35116fa 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -83,24 +83,19 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dy, int w
draw_params.bind_display_space_shader_cb();
}
- glPushMatrix();
- glTranslatef(0.0f, (float)dy, 0.0f);
-
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
- glVertex2f(0.0f, 0.0f);
+ glVertex2f(0.0f, dy);
glTexCoord2f(1.0f, 0.0f);
- glVertex2f((float)width, 0.0f);
+ glVertex2f((float)width, dy);
glTexCoord2f(1.0f, 1.0f);
- glVertex2f((float)width, (float)height);
+ glVertex2f((float)width, (float)height + dy);
glTexCoord2f(0.0f, 1.0f);
- glVertex2f(0.0f, (float)height);
+ glVertex2f(0.0f, (float)height + dy);
glEnd();
- glPopMatrix();
-
if(draw_params.unbind_display_space_shader_cb) {
draw_params.unbind_display_space_shader_cb();
}