remove redondant variable and test
This commit is contained in:
parent
29e87780f5
commit
274b6894af
@ -2310,22 +2310,21 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
|
||||
int width = inwidth;
|
||||
int height = inheight;
|
||||
|
||||
bool useTexStorage = extensions->isTextureStorageEnabled && extensions->isTexStorage2DSupported() && (_borderWidth==0);
|
||||
GLenum sizedInternalFormat = useTexStorage ? selectSizedInternalFormat(image) : 0;
|
||||
OSG_NOTICE<<"New path useTexStorage="<<useTexStorage<<", sizedInternalFormat="<<sizedInternalFormat<<std::endl;
|
||||
GLenum texStoragesizedInternalFormat = extensions->isTextureStorageEnabled && extensions->isTexStorage2DSupported() && (_borderWidth==0) ? selectSizedInternalFormat(image) : 0;
|
||||
|
||||
if (useTexStorage && sizedInternalFormat!=0)
|
||||
if (texStoragesizedInternalFormat!=0)
|
||||
{
|
||||
if (getTextureTarget()==GL_TEXTURE_CUBE_MAP)
|
||||
{
|
||||
if (target==GL_TEXTURE_CUBE_MAP_POSITIVE_X)
|
||||
{
|
||||
extensions->glTexStorage2D(GL_TEXTURE_CUBE_MAP, numMipmapLevels, sizedInternalFormat, width, height);
|
||||
// only allocate on first face image
|
||||
extensions->glTexStorage2D(GL_TEXTURE_CUBE_MAP, numMipmapLevels, texStoragesizedInternalFormat, width, height);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
extensions->glTexStorage2D(target, numMipmapLevels, sizedInternalFormat, width, height);
|
||||
extensions->glTexStorage2D(target, numMipmapLevels, texStoragesizedInternalFormat, width, height);
|
||||
}
|
||||
|
||||
if( !compressed_image )
|
||||
|
Loading…
Reference in New Issue
Block a user