From fe3de788903e1c3e16d97b7b63d01f772d35727f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 28 Feb 2016 00:37:01 +0100 Subject: [PATCH] Add support for 10-bit RGB framebuffers. --- resource_pool.cpp | 6 ++++++ version.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resource_pool.cpp b/resource_pool.cpp index 48f1906..6939fe0 100644 --- a/resource_pool.cpp +++ b/resource_pool.cpp @@ -236,6 +236,7 @@ GLuint ResourcePool::create_2d_texture(GLint internal_format, GLsizei width, GLs case GL_RGBA32F_ARB: case GL_RGBA16F_ARB: case GL_RGBA8: + case GL_RGB10_A2: case GL_SRGB8_ALPHA8: format = GL_RGBA; break; @@ -243,6 +244,7 @@ GLuint ResourcePool::create_2d_texture(GLint internal_format, GLsizei width, GLs case GL_RGB16F: case GL_R11F_G11F_B10F: case GL_RGB8: + case GL_RGB10: case GL_SRGB8: case GL_RGB565: case GL_RGB9_E5: @@ -282,6 +284,8 @@ GLuint ResourcePool::create_2d_texture(GLint internal_format, GLsizei width, GLs case GL_SRGB8: case GL_RGBA8: case GL_RGB8: + case GL_RGB10_A2: + case GL_RGB10: case GL_RG8: case GL_R8: type = GL_UNSIGNED_BYTE; @@ -513,6 +517,8 @@ size_t ResourcePool::estimate_texture_size(const Texture2D &texture_format) break; case GL_RGBA8: case GL_SRGB8_ALPHA8: + case GL_RGB10_A2: + case GL_RGB10: bytes_per_pixel = 4; break; case GL_RGB8: diff --git a/version.h b/version.h index 8296d8a..599f977 100644 --- a/version.h +++ b/version.h @@ -5,6 +5,6 @@ // changes, even within git versions. There is no specific version // documentation outside the regular changelogs, though. -#define MOVIT_VERSION 20 +#define MOVIT_VERSION 21 #endif // !defined(_MOVIT_VERSION_H) -- 2.39.2