[osg-users] [CubeMap with mipmaps] About loading IBL

Julien Valentin julienvalentin51 at gmail.com
Sat Nov 4 08:34:29 PDT 2017

Hi all
So debugging all the night i notice the problem seams to ome from osg/Texture.cpp line 2303:

     glTexSubImage2D( target, k,
                            0, 0,
                            width, height,
                            dataPtr + image->getMipmapOffset(k));

This code seams not to do its job...Replacing It with

                    glTexImage2D( target, k, _internalFormat,
                        width, height, _borderWidth,
dataPtr + image->getMipmapOffset(k));

seams to make it works.
Is this fix valid enought to make a pr?

Good WE

mp3butcher wrote:
> Hi all
> I'm trying to load an IBL cubemap with lod but once I'm trying to set mipmapdata for log2(pow2size)+1 levels (and so override hardware mipmap generation) the cubemap appears black (even the first level that i actually validated with the autoHWMipMapGeneration(minfilter=miplinear) /: ?! )..
> Any leads?
> Thank you!
> Cheers,
> Julien

Read this topic online here:

More information about the osg-users mailing list