From: Steinar H. Gunderson Date: Wed, 24 Feb 2016 22:18:41 +0000 (+0100) Subject: Add support for some of the more esoteric minifloat formats to ResourcePool. X-Git-Tag: 1.4.0~15 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=0aefa2ba0099ef7d7c6e78db2c5c4b936ed7b94b Add support for some of the more esoteric minifloat formats to ResourcePool. --- diff --git a/resource_pool.cpp b/resource_pool.cpp index 944910b..48f1906 100644 --- a/resource_pool.cpp +++ b/resource_pool.cpp @@ -241,9 +241,11 @@ GLuint ResourcePool::create_2d_texture(GLint internal_format, GLsizei width, GLs break; case GL_RGB32F: case GL_RGB16F: + case GL_R11F_G11F_B10F: case GL_RGB8: case GL_SRGB8: case GL_RGB565: + case GL_RGB9_E5: format = GL_RGB; break; case GL_RG32F: @@ -268,6 +270,8 @@ GLuint ResourcePool::create_2d_texture(GLint internal_format, GLsizei width, GLs case GL_RGBA16F_ARB: case GL_RGB32F: case GL_RGB16F: + case GL_R11F_G11F_B10F: + case GL_RGB9_E5: case GL_RG32F: case GL_RG16F: case GL_R32F: @@ -501,6 +505,12 @@ size_t ResourcePool::estimate_texture_size(const Texture2D &texture_format) case GL_RGB16F_ARB: bytes_per_pixel = 6; break; + case GL_R11F_G11F_B10F: + bytes_per_pixel = 4; + break; + case GL_RGB9_E5: + bytes_per_pixel = 4; + break; case GL_RGBA8: case GL_SRGB8_ALPHA8: bytes_per_pixel = 4;