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 445f5b7..d028c08 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.
-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@
index a32247d..d322a17 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_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;
@@ -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_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;