]> git.sesse.net Git - movit/commitdiff
Add support for 10-bit RGB framebuffers.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 27 Feb 2016 23:37:01 +0000 (00:37 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 27 Feb 2016 23:37:01 +0000 (00:37 +0100)
resource_pool.cpp
version.h

index 48f190637fd3a572bb65f2b0720fb3ba3b94c278..6939fe01d50a61131d4357858c6d82a4d9361da2 100644 (file)
@@ -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:
index 8296d8ab37871937301a836c84a1f76561407822..599f977983160e03fdee4e5275f8f37d4d602217 100644 (file)
--- 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)