diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-11-10 00:42:30 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-11-10 00:42:30 +0300 |
commit | 2de476c88f4268f2dcfccfe6c9ce55a8697ac83e (patch) | |
tree | 86e8f63f7a20ff4d4fde6a2f898130f2cf1b927f /source/gameengine/VideoTexture/VideoBase.cpp | |
parent | 0a8e8c8c9ea6e5acf65c2a4ee0c392328f5f96b8 (diff) |
VideoTexture: Preserve alpha channel if present in video, images and sequences. Better detection of end of video.
Diffstat (limited to 'source/gameengine/VideoTexture/VideoBase.cpp')
-rw-r--r-- | source/gameengine/VideoTexture/VideoBase.cpp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/source/gameengine/VideoTexture/VideoBase.cpp b/source/gameengine/VideoTexture/VideoBase.cpp index 038a04a55a8..10117c3af9e 100644 --- a/source/gameengine/VideoTexture/VideoBase.cpp +++ b/source/gameengine/VideoTexture/VideoBase.cpp @@ -54,22 +54,34 @@ void VideoBase::process (BYTE * sample) if (m_image != NULL && !m_avail) { // filters used - FilterRGB24 filtRGB; - FilterYV12 filtYUV; // convert video format to image switch (m_format) { + case RGBA32: + { + FilterRGBA32 filtRGBA; + // use filter object for format to convert image + filterImage(filtRGBA, sample, m_orgSize); + // finish + break; + } case RGB24: - // use filter object for format to convert image - filterImage(filtRGB, sample, m_orgSize); - // finish - break; + { + FilterRGB24 filtRGB; + // use filter object for format to convert image + filterImage(filtRGB, sample, m_orgSize); + // finish + break; + } case YV12: - // use filter object for format to convert image - filtYUV.setBuffs(sample, m_orgSize); - filterImage(filtYUV, sample, m_orgSize); - // finish - break; + { + // use filter object for format to convert image + FilterYV12 filtYUV; + filtYUV.setBuffs(sample, m_orgSize); + filterImage(filtYUV, sample, m_orgSize); + // finish + break; + } } } } |