[Bf-gamedev] VideoTexture internal image format

Dalai Felinto dfelinto at gmail.com
Thu Oct 15 13:06:56 CEST 2015


Hi Benoit,

Apart from the API change would everything else just work as before?

For example, if I was using video texture to swap a texture from one in the
HD,  or by data from imagerender would they keep working?
On Oct 15, 2015 05:38, "Benoit Bolsee" <benoit.bolsee at online.be> wrote:

> Hi All,
>
> As you know, the internal image format used in VideoTexture is RGBA.
> During the developments that I'm carrying in the decklink branch, it
> came up several times that this format is badly chosen and that BGRA
> would be a better choice. The points in favor to the change are:
> - the real native OGL format for frame buffer and texture is BGRA,
> transferring images with the GPU is faster if the host is also BGRA.
> - the Decklink video cards do not support RGBA for the keying frame,
> only BGRA.
> - Qt does not have a RGBA format, only BGRA
>
> So the change seems necessary. It can mostly be done without changing
> the API except for the 'image' attribute of the image source objects
> that returns the internal buffer. So the change will break some scripts
> but there is already the bge.texture.imageToArray() method that accepts
> a mode format. The scripts that require RGBA can be updated by using
> this function.
> Another solution would be to keep 'image' to return RGBA (via an
> inefficient byte swapping) but have another attribute (.e.g 'buffer') to
> return internal BGRA buffer.
>
> I would rather break the compatibility but I thought I'd ask the list
> first as I have the ambition to bring the decklink branch into trunk.
>
> Benoit
>
>
>
> _______________________________________________
> Bf-gamedev mailing list
> Bf-gamedev at blender.org
> http://lists.blender.org/mailman/listinfo/bf-gamedev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-gamedev/attachments/20151015/48f67ff8/attachment.htm 


More information about the Bf-gamedev mailing list