Blender Git Loki
Git Commits -> Revision 7455298
Revision 7455298 by Benoit Bolsee (decklink) October 19, 2015, 22:23 (GMT) |
BGE: Image source refresh() accepts pixel format argument. All image source objects now accept a pixel format argument in addition to the buffer argument in the refresh() method. This can be used to change the format of the image copied in the buffer. The only allowed values are "RGBA" and "BGRA". This is useful when transferring images to external application that do not support the RGBA format. Ex: im = bge.texture.ImageRender(...) im.refresh(buffer, "BGRA") Note: the transfer is optimal (i.e. no intermediate copy) for ImageRender and ImageViewport objects when no processing of the image is needed in VideoTexture. This is the case if no filter is set and the attributes are set as follow: flip=False, alpha=True, scale=False, depth=False, zbuff=False. |
Commit Details:
Full Hash: 7455298f8c6b21535f5b7cc2f158792b868b80b4
Parent Commit: 1be95bb
Lines Changed: +204, -43
12 Modified Paths:
/doc/python_api/rst/bge.texture.rst (+44, -16) (Diff)
/source/gameengine/VideoTexture/Exception.cpp (+13, -0) (Diff)
/source/gameengine/VideoTexture/Exception.h (+15, -1) (Diff)
/source/gameengine/VideoTexture/FilterBase.h (+7, -0) (Diff)
/source/gameengine/VideoTexture/FilterSource.h (+23, -0) (Diff)
/source/gameengine/VideoTexture/ImageBase.cpp (+52, -10) (Diff)
/source/gameengine/VideoTexture/ImageBase.h (+6, -1) (Diff)
/source/gameengine/VideoTexture/ImageRender.cpp (+2, -2) (Diff)
/source/gameengine/VideoTexture/ImageRender.h (+4, -1) (Diff)
/source/gameengine/VideoTexture/ImageViewport.cpp (+21, -8) (Diff)
/source/gameengine/VideoTexture/ImageViewport.h (+5, -2) (Diff)
/source/gameengine/VideoTexture/VideoBase.cpp (+12, -2) (Diff)
/source/gameengine/VideoTexture/Exception.cpp (+13, -0) (Diff)
/source/gameengine/VideoTexture/Exception.h (+15, -1) (Diff)
/source/gameengine/VideoTexture/FilterBase.h (+7, -0) (Diff)
/source/gameengine/VideoTexture/FilterSource.h (+23, -0) (Diff)
/source/gameengine/VideoTexture/ImageBase.cpp (+52, -10) (Diff)
/source/gameengine/VideoTexture/ImageBase.h (+6, -1) (Diff)
/source/gameengine/VideoTexture/ImageRender.cpp (+2, -2) (Diff)
/source/gameengine/VideoTexture/ImageRender.h (+4, -1) (Diff)
/source/gameengine/VideoTexture/ImageViewport.cpp (+21, -8) (Diff)
/source/gameengine/VideoTexture/ImageViewport.h (+5, -2) (Diff)
/source/gameengine/VideoTexture/VideoBase.cpp (+12, -2) (Diff)