[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:

                   
Code:
     glTexSubImage2D( target, k,
                            0, 0,
                            width, height,
                            (GLenum)image->getPixelFormat(),
                            (GLenum)image->getDataType(),
                            dataPtr + image->getMipmapOffset(k));


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

Code:
                    glTexImage2D( target, k, _internalFormat,
                        width, height, _borderWidth,
                        (GLenum)image->getPixelFormat(),
                        (GLenum)image->getDataType(),
dataPtr + image->getMipmapOffset(k));



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

Cheers
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
[/code]

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







More information about the osg-users mailing list