gl/memory: store the internal format as the texture format
authorMatthew Waters <matthew@centricular.com>
Wed, 14 Mar 2018 07:12:21 +0000 (18:12 +1100)
committerMatthew Waters <matthew@centricular.com>
Sat, 5 May 2018 11:24:25 +0000 (21:24 +1000)
commit396e04cf6977f5094bc27ccd13ab48ca09b65805
tree16557a9cd27a3307b7a1274bb160f4685ea410b9
parent131f9b4e2bec723a5a8e2716b76280f93fdc64ee
gl/memory: store the internal format as the texture format

Instead of having special cases at each GL texture creation, upload,
readback or copy for all non-8-bits-per-components.
Simply store the more specific format and retrieve the generic
component/type tuple from that.

Introduce a helper function for retrieving the generic GL format (RGBA,
RGB, RG, R, L, A) and type (BYTE, SHORT, SHORT_5_6_5) from a sized
GL format enum (RGBA8, RGB565, RG8, etc).
gst-libs/gst/gl/gstglformat.c
gst-libs/gst/gl/gstglformat.h
gst-libs/gst/gl/gstglmemory.c
gst-libs/gst/gl/gstglmemorypbo.c