OES_texture_float allows OpenGL ES 2 implementations to support
GL_R32F, GL_RG32F, GL_RGB32F and GL_RGBA32F texture formats.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
OES_texture_half_float allows OpenGL ES 2 implementations to support
GL_R16F, GL_RG16F, GL_RGB16F and GL_RGBA16F texture formats.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
OpenGL ES 2 implementations support texture immutability and sized
internal formats using the GL_EXT_texture_storage extension.
Co-authored-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Use glTexImage2D() instead of glTexStorage2D() and convert coloured
sized internal formats to base formats in order to support OpenGL ES
2.
Co-authored-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Add gl_texture_is_format_supported(), gl_texture_2d_init(),
gl_texture_2d_upload() and gl_texture_fini() utilities. The creation
function accepts all the coloured sized internal format from OpenGL ES
3 using glTexStorage2D() to create immutable textures and reduce API
overhead.
Co-authored-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Validate the colour-renderable sized internal formats passed to
gl_fbo_init() using a new gl_fbo_is_format_supported() utility. Sized
internal formats are now required. More formats will progressively be
added depending on the OpenGL ES version and the supported extensions.
Support for RGBA8 FBOs is now required by the GL renderer.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
These utility functions are used (or will be used) in different source
files. This prevents gl-renderer.c from growing too much (the coming
texture utilities are quite verbose) by moving generic functions out.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>