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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-08-28 17:55:59 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-08-28 17:55:59 +0400
commitbae896691aa3d7bb2a75292da3cc490894996b01 (patch)
tree9c3703f11ccdf76c575c2ea18b70dee1ff665913 /intern/cycles/device/device.cpp
parentd48e4fc92be346810baa8cac595ab0a735882a87 (diff)
Cycles:
* Add alpha pass output, to use set Transparent option in Film panel. * Add Holdout closure (OSL terminology), this is like the Sky option in the internal renderer, objects with this closure show the background / zero alpha. * Add option to use Gaussian instead of Box pixel filter in the UI. * Remove camera response curves for now, they don't really belong here in the pipeline, should be moved to compositor. * Output full float values for rendering now, previously was only byte precision. * Add a patch from Thomas to get a preview passes option, but still disabled because it isn't quite working right yet. * CUDA: don't compile shader graph evaluation inline. * Convert tabs to spaces in python files.
Diffstat (limited to 'intern/cycles/device/device.cpp')
-rw-r--r--intern/cycles/device/device.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index cd0d64f37dd..2f2d34dcef2 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -86,10 +86,15 @@ void Device::pixels_free(device_memory& mem)
mem_free(mem);
}
-void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int width, int height)
+void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int width, int height, bool transparent)
{
pixels_copy_from(rgba, y, w, h);
+ if(transparent) {
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ }
+
glPixelZoom((float)width/(float)w, (float)height/(float)h);
glRasterPos2f(0, y);
@@ -97,6 +102,9 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int width, in
glRasterPos2f(0.0f, 0.0f);
glPixelZoom(1.0f, 1.0f);
+
+ if(transparent)
+ glDisable(GL_BLEND);
}
Device *Device::create(DeviceType type, bool background, int threads)