diff options
Diffstat (limited to 'intern/cycles/device/device.cpp')
-rw-r--r-- | intern/cycles/device/device.cpp | 10 |
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) |