]> git.sesse.net Git - movit/commitdiff
Add proper formats for RGB without alpha.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 25 Mar 2014 00:21:26 +0000 (01:21 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 25 Mar 2014 00:21:26 +0000 (01:21 +0100)
Makefile.in
resource_pool.cpp

index 445f5b7dd96c858f21ca81494d5706cc141fa77d..d028c082e3514b250dcf4532f3b5d044d9af29d3 100644 (file)
@@ -6,8 +6,8 @@ GTEST_DIR ?= /usr/src/gtest
 # strive towards having a rock-stable ABI, but at least the soversion will increase
 # whenever it breaks, so that you will not have silent failures, and distribution package
 # management can run its course.
 # strive towards having a rock-stable ABI, but at least the soversion will increase
 # whenever it breaks, so that you will not have silent failures, and distribution package
 # management can run its course.
-movit_ltversion = 1:3:0
-movit_version = 1.0.3
+movit_ltversion = 2:0:0
+movit_version = 1.1
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
index a32247de63461a23f00e4585ded05aa5628a0de7..d322a1764f96ad43a8557f947127b8674262d8f6 100644 (file)
@@ -200,6 +200,12 @@ GLuint ResourcePool::create_2d_texture(GLint internal_format, GLsizei width, GLs
        case GL_SRGB8_ALPHA8:
                format = GL_RGBA;
                break;
        case GL_SRGB8_ALPHA8:
                format = GL_RGBA;
                break;
+       case GL_RGB32F_ARB:
+       case GL_RGB16F_ARB:
+       case GL_RGB8:
+       case GL_SRGB8:
+               format = GL_RGB;
+               break;
        case GL_RG32F:
        case GL_RG16F:
                format = GL_RG;
        case GL_RG32F:
        case GL_RG16F:
                format = GL_RG;
@@ -345,6 +351,16 @@ size_t ResourcePool::estimate_texture_size(const Texture2D &texture_format)
        case GL_SRGB8_ALPHA8:
                bytes_per_pixel = 4;
                break;
        case GL_SRGB8_ALPHA8:
                bytes_per_pixel = 4;
                break;
+       case GL_RGB32F_ARB:
+               bytes_per_pixel = 12;
+               break;
+       case GL_RGB16F_ARB:
+               bytes_per_pixel = 6;
+               break;
+       case GL_RGB8:
+       case GL_SRGB8:
+               bytes_per_pixel = 3;
+               break;
        case GL_RG32F:
                bytes_per_pixel = 8;
                break;
        case GL_RG32F:
                bytes_per_pixel = 8;
                break;