[Bf-gamedev] VideoTexture internal image format
Benoit Bolsee
benoit.bolsee at online.be
Thu Oct 15 13:22:31 CEST 2015
Yes, everything else will just be as before. The change in the internal
representation will be reflected in all internal OGL & ffmpeg, calls so
that there is no visual change.
On Thu, 2015-10-15 at 08:06 -0300, Dalai Felinto wrote:
> 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
> _______________________________________________
> Bf-gamedev mailing list
> Bf-gamedev at blender.org
> http://lists.blender.org/mailman/listinfo/bf-gamedev
More information about the Bf-gamedev
mailing list