[osg-users] Minor change proposal : Blacklist usage of all unsized texture internat format
Julien Valentin
julienvalentin51 at gmail.com
Mon Aug 13 06:42:16 PDT 2018
Hi,
the support for unsized internal format is quite oldish...
it's quite a miracle that calls to glTexImage2D still work with both internalformat (rawdatadescription) and format (memory layout) set to GL_RGBA
-How can GLknow what we want in that case? there's definitly a default sized internalformat for GL_RGBA ...-
In my sense
-unsized internal formats should not have been supported by osg at the first place.
-the argument 'format' in osg usage of glTexImage ( _sourceFormat ? _sourceFormat : _internalFormat) is completely wrong
(you can't substitute a format with a sizedinternalFormat, that's 2 different stuff)
In the case with image attached
we can deduce a proper _internalformat from Image::_pixelFormat (customisation of this behavior is the reason of being of _internalFormatMode),
In the case no image is setted (_internalFormatMode==USE_USER_DEFINED_FORMAT)
we only can deduce format (_sourceFormat) and type(_internalFormatType) from a sized internalformat.
internalformat concernq GPUside representation and is mandatory to be specified by user.
My proposal would be
-to black list unsized format in order user code work both with the presence or not of glTexStorage
-to force user to set its own sourceFormat when no image attached
Is it so controversal?
Cheers,
Julien[/list]
------------------------
Twirling twirling twirling toward freedom
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74505#74505
More information about the osg-users
mailing list