Blender Git Loki
Git Commits -> Revision 8529b2f
Revision 8529b2f by Benoit Bolsee (master) June 9, 2016, 20:15 (GMT) |
BGE: alpha on frame buffer and precedence of MSAA over swap. A new option '-a' can be passed to the blenderplayer. It forces the framebuffer to have an alpha channel. This can be used in VideoTexture to return a image with alpha channel with ImageViewport (provided alpha is set to True on the ImageViewport object and that the background color alpha channel is 0, which is the default). Without the -a option, the frame buffer has no alpha channel and ImageViewport always returns an opaque image, no matter what. In Linux, the player window will be rendered transparently over the desktop. In Windows, the player window is still rendered opaque because transparency of the window is only possible using the 'compositing' functions of Windows. The code is there but not enabled (look for WIN32_COMPOSITING) because 1) it doesn't work so well 2) it requires a DLL that is only available on Vista and up. give precedence to AA over Swap copy: Certain GPU (intel) will not allow MSAA together with swap copy. Previously, swap copy had priority over MSAA: fewer AA samples would be chosen if it was the condition to get swap copy. This patch reverse the logic: swap copy will be abandonned if another swap method (undefined or exchange) will provide the number of AA samples requested. If no AA samples is requested, swap copy still has the priority of course. |
Commit Details:
Full Hash: 8529b2f925c2a0f0cfa3ffe9218519b55223107e
Parent Commit: 5da02ab
Lines Changed: +293, -95
19 Modified Paths:
/CMakeLists.txt (+13, -0) (Diff)
/intern/ghost/CMakeLists.txt (+4, -0) (Diff)
/intern/ghost/GHOST_ISystem.h (+1, -1) (Diff)
/intern/ghost/GHOST_Types.h (+2, -1) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.cpp (+18, -15) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.h (+3, -0) (Diff)
/intern/ghost/intern/GHOST_ContextWGL.cpp (+54, -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 (+1, -0) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.cpp (+38, -13) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.h (+3, -0) (Diff)
/intern/ghost/intern/GHOST_WindowX11.cpp (+114, -36) (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)
/intern/ghost/CMakeLists.txt (+4, -0) (Diff)
/intern/ghost/GHOST_ISystem.h (+1, -1) (Diff)
/intern/ghost/GHOST_Types.h (+2, -1) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.cpp (+18, -15) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.h (+3, -0) (Diff)
/intern/ghost/intern/GHOST_ContextWGL.cpp (+54, -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 (+1, -0) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.cpp (+38, -13) (Diff)
/intern/ghost/intern/GHOST_WindowWin32.h (+3, -0) (Diff)
/intern/ghost/intern/GHOST_WindowX11.cpp (+114, -36) (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)