Blender Git Loki
Git Commits -> Revision bd99046
Revision bd99046 by Benoit Bolsee (decklink) April 9, 2015, 07:41 (GMT) |
Player: new -a option to enable alpha on frame buffer. A new option '-a' can be passed to the blenderplayer. It forces the framebuffer to have an alpha channel. As the background color is applied with 0 alpha, ImageViewport will return an image with transparent background (provided alpha is set to True on the ImageViewport object). This is useful in combination with DeckLink to generate a key frame with transparent background. Without the -a option, the frame buffer has no alpha channel and ImageViewport always returns an opaque image, no matter what. This should be working in Windows and Linux, but only Windows is tested at present. Note that although the frame buffer has alpha, the player window is still rendered opaque. Transparency of the window is possible using the 'compositing' functions of Windows and the code is already there for that (look for WIN32_COMPOSITING) but is not enabled because 1) it doesn't work so well 2) it requires a DLL that is only available on Vista and up. |
Commit Details:
Full Hash: bd9904615bae8bf0002d3268d0004be72f0d5922
Parent Commit: 80f1ab3
Lines Changed: +379, -122
22 Modified Paths:
/CMakeLists.txt (+13, -0) (Diff)
/intern/ghost/CMakeLists.txt (+4, -0) (Diff)
/intern/ghost/GHOST_ISystem.h (+5, -5) (Diff)
/intern/ghost/GHOST_Types.h (+2, -1) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.cpp (+22, -1) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.h (+2, -0) (Diff)
/intern/ghost/intern/GHOST_ContextWGL.cpp (+55, -15) (Diff)
/intern/ghost/intern/GHOST_ContextWGL.h (+4, -0) (Diff)
/intern/ghost/intern/GHOST_System.cpp (+5, -3) (Diff)
/intern/ghost/intern/GHOST_System.h (+3, -3) (Diff)
/intern/ghost/intern/GHOST_SystemWin32.cpp (+6, -1) (Diff)
/intern/ghost/intern/GHOST_SystemX11.cpp (+2, -0) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.cpp (+38, -14) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.h (+3, -0) (Diff)
/intern/ghost/intern/GHOST_WindowX11.cpp (+179, -65) (Diff)
/intern/ghost/intern/GHOST_WindowX11.h (+3, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_Application.cpp (+9, -2) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_Application.h (+3, -3) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (+9, -2) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.cpp (+7, -4) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.h (+4, -2) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp (+1, -1) (Diff)
/intern/ghost/CMakeLists.txt (+4, -0) (Diff)
/intern/ghost/GHOST_ISystem.h (+5, -5) (Diff)
/intern/ghost/GHOST_Types.h (+2, -1) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.cpp (+22, -1) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.h (+2, -0) (Diff)
/intern/ghost/intern/GHOST_ContextWGL.cpp (+55, -15) (Diff)
/intern/ghost/intern/GHOST_ContextWGL.h (+4, -0) (Diff)
/intern/ghost/intern/GHOST_System.cpp (+5, -3) (Diff)
/intern/ghost/intern/GHOST_System.h (+3, -3) (Diff)
/intern/ghost/intern/GHOST_SystemWin32.cpp (+6, -1) (Diff)
/intern/ghost/intern/GHOST_SystemX11.cpp (+2, -0) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.cpp (+38, -14) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.h (+3, -0) (Diff)
/intern/ghost/intern/GHOST_WindowX11.cpp (+179, -65) (Diff)
/intern/ghost/intern/GHOST_WindowX11.h (+3, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_Application.cpp (+9, -2) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_Application.h (+3, -3) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (+9, -2) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.cpp (+7, -4) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.h (+4, -2) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp (+1, -1) (Diff)