[osg-users] Problems with assumeSizedInternalFormat

Paul Zimmons pzimmons at mak.com
Thu Sep 8 08:04:01 PDT 2016


Hello everyone,

So, in this particular case, the solution is changing to a sized format for textures:

    void check_format(trpgTexture::ImageType type, int depth, GLenum& internalFormat, GLenum& pixelFormat, GLenum&)
    {
        switch(type)
        {
        case trpgTexture::trpg_RGB8:
            internalFormat = GL_RGB8;   <-- 8
            pixelFormat    = GL_RGB;
            break;
        case trpgTexture::trpg_RGBA8:
            internalFormat = GL_RGBA8;   <-- 8
            pixelFormat    = GL_RGBA;
            break;
...
}

This sends it down a different path in texture.cpp which assigns the format for mipmaps to the internal format.

However, the assumeSizedInternalFormat function is still wonky and can return the wrong format since multiple formats can match the criteria it is using to search.

Cheers,
Paul

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68557#68557








More information about the osg-users mailing list