[osg-users] [CubeMap with mipmaps] About loading IBL
Robert Osfield
robert.osfield at gmail.com
Mon Nov 6 00:53:31 PST 2017
HI Julien,
The code is osg/Texture.cpp has been written a long time ago so in
theory should have been exposed to testing for many years so I am
surprised the change you have found that works is required, and I'm
not confident the change you suggest won't break things. Given how
long Texture.cpp has been around it sounds like you are using a usage
case/hardware/driver combination that hasn't been tested out before.
Given this it could be errant OSG code or a driver issue, if the later
the workaround could well cause problems elsewhere. The only way to
tease this out would be to have a test case that can be tried on
different systems.
Unfortunately I don't have any cubemap mipmapped test cases myself,
could you provide one?
Robert.
On 4 November 2017 at 15:34, Julien Valentin <julienvalentin51 at gmail.com> wrote:
> 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
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
More information about the osg-users
mailing list