CoglTranscoder
- Replaces CoglBitamap
- deals with alpha premultiplication and format conversions.
- The difference is, it defines a pipeline of operations not a static buffer on which operations are applied. You give it a destination buffer and leave it up to the implementation to manage intermediate buffers. The idea is to support zero copy texture loading, I.e:
- alloc PBO
- read image header to know input format.
- create CoglTranscoder that converts from input format to premultiplied dest format
- point the transcoder at the PBO, and query an input pointer from the transcoder
- load the image into the transcoders given input address.
- In cases where input format == output format, no copy happens and the loader writes directly to GPU ram.
- It's not gone unnoticed that it kinda sounds like gstreamer could do some of this...
- I don't think we should rule out using gstreamer internally for some of this
- I think I'd rather design it so that gstreamer would be optional but potentially later it could be interesting to have a CoglTranscoderGstreamer subclass of some kind.
- In general the basic requirements here seem fairly simple so we don't want a complex API for the common cases.